HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
bjoaquinc
mcp-error-formatter
JavaScript2025–2025
bjoaquinc / mcp-error-formatter

mcp-error-formatter

Format MCP tool errors exactly like Cursor's style for better LLM understanding.

2Distinct people
2Mentions
0Explicit recommenders
3GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Format MCP tool errors exactly like Cursor's style for better LLM understanding.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by 3-hour interval2 dated mentions

Observed mentions: 2025-08-03 19:20:34 UTC to 2025-08-05 03:12:19 UTC.

012025-08-03 18:00:00 UTC to 2025-08-03 21:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsAug 3, 18:002025-08-03 21:00:00 UTC to 2025-08-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-04 00:00:00 UTC to 2025-08-04 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-04 03:00:00 UTC to 2025-08-04 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-04 06:00:00 UTC to 2025-08-04 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-04 09:00:00 UTC to 2025-08-04 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsAug 4, 09:002025-08-04 12:00:00 UTC to 2025-08-04 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-04 15:00:00 UTC to 2025-08-04 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-04 18:00:00 UTC to 2025-08-04 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-04 21:00:00 UTC to 2025-08-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-05 00:00:00 UTC to 2025-08-05 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-05 03:00:00 UTC to 2025-08-05 06:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsAug 5, 03:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Aug 3, 18:002025-08-03 18:00:00 UTC2025-08-03 21:00:00 UTC110
Aug 3, 21:002025-08-03 21:00:00 UTC2025-08-04 00:00:00 UTC000
Aug 4, 00:002025-08-04 00:00:00 UTC2025-08-04 03:00:00 UTC000
Aug 4, 03:002025-08-04 03:00:00 UTC2025-08-04 06:00:00 UTC000
Aug 4, 06:002025-08-04 06:00:00 UTC2025-08-04 09:00:00 UTC000
Aug 4, 09:002025-08-04 09:00:00 UTC2025-08-04 12:00:00 UTC000
Aug 4, 12:002025-08-04 12:00:00 UTC2025-08-04 15:00:00 UTC000
Aug 4, 15:002025-08-04 15:00:00 UTC2025-08-04 18:00:00 UTC000
Aug 4, 18:002025-08-04 18:00:00 UTC2025-08-04 21:00:00 UTC000
Aug 4, 21:002025-08-04 21:00:00 UTC2025-08-05 00:00:00 UTC000
Aug 5, 00:002025-08-05 00:00:00 UTC2025-08-05 03:00:00 UTC000
Aug 5, 03:002025-08-05 03:00:00 UTC2025-08-05 06:00:00 UTC101

What Hacker News says

2 sources
Hey thanks for the comment, the work from https://github.com/bjoaquinc/mcp-error-formatter is great. I will definitely put some version of this into one of the next releases. Just opened an issue mentioning this thread. The problem with the package above is that it is server side, and I think it should be. Server is the one that knows (has responsibility to know) if a tool is retryable and has informations about the error, and fairly so. I see though how some sort of improved error formatting could be introduced in the client as well, but it shouldn't contain any logic about the error, rather format the error in the best way possible (in the direction in which it is best understandable by LLMs).
In Show HN: Mcp-use – Connect any LLM to any MCP

Show HN: Mcp-error-formatter – Cursor-style JSON errors for any MCP/LLM tool

Hi HN! Author here. When an LLM-powered tool call blows up, the model usually sees an opaque stack trace. It can’t tell whether to retry, give up, or suggest a fix, so users get “Something went wrong” or infinite retry loops. Cursor’s editor solved this by wrapping errors in a small, structured JSON envelope: ``` Request ID: c90e… {"error":"ERROR_USER_ABORTED_REQUEST", "details":{"title":"User aborted request.", "isRetryable":false}, "isExpected":true} ``` That single structure lets the agent reason correctly (“don’t retry; the user cancelled”). I wanted the same behavior in standalone MCP servers and LangChain tools, so I extracted it into a tiny package: ``` npm i @bjoaquinc/mcp-error-formatter ``` ```ts import { formatMCPError } from "@bjoaquinc/mcp-error-formatter"; export async function githubTool(args) { try { co
Read the rest
nst data = await github.repos.get(args.repo); return { content: [{ type: "text", text: JSON.stringify(data) }] }; } catch (err) { return formatMCPError(err, { title: "GitHub API failed", isRetryable: true, // optional flags }); } } ``` * Supports both structured and unstructured content * Zero deps (aside from `uuid`), \~3 kB min+gzip * Adds `isRetryable`, `isExpected`, `errorType`, `requestId`, and free-form `additionalInfo` * Returns a standard `CallToolResult`, so it slots into marimo, LangChain, FastMCP, or plain MCP SDK * Apache-2.0 (OSS) Repo: [https://github.com/bjoaquinc/mcp-error-formatter](https://github.com/bjoaquinc/mcp-error-formatter) I’d love feedback on the format, naming, or edge-cases I’ve missed. PRs and issues welcome—happy to iterate.
4 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.