Skip to main content
Glama
rsascha

mcp-debug-claude-desktop

by rsascha

mcp-debug-claude-desktop

Filed as anthropics/claude-code#83908.

A minimal instrumented MCP server for answering one question: when a tool call goes missing in Claude Desktop, where does it go?

Claude Desktop reports lost tool calls as "the local MCP server may be unresponsive, crashed, or not running." This repository checks that claim instead of believing it. For every message it records whether bytes arrived on stdin, whether they parsed, whether a handler ran, whether a response was written, and whether that write went through.

What it found

A tool call is dispatched only if its chat is the active chat at the moment of dispatch — which happens 5–45 seconds after you submit. Open a different chat in that window and the call is discarded: nothing reaches the server, no retry, no log entry anywhere in the client. Four minutes later the user is told the local server has crashed.

Ruled out with the measurement that refuted each: server crash, back-pressure, the approval dialog, deferred tool loading, Electron background throttling. Details in BUG_REPORT.md.

Related MCP server: my-mcp-server

Quick start

npm install
npm run build
npm run test:backpressure     # verify the instrument before trusting it

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-debug": {
      "command": "/absolute/path/to/node",
      "args": ["/absolute/path/to/mcp-debug-claude-desktop/dist/server.js"]
    }
  }
}

Both paths absolute; command is the output of which node. Restart Claude Desktop, use a tool, then npm run analyse:

rpc_id  method / tool             stdin    parsed  handler   stdout        verdict
0       initialize                245 B    yes     —         162 B ok      complete
2       tools/call echo           108 B    yes     0 ms      87 B ok       complete

pid      ppid     requests  responses  blocked  role
37265    37257    10        10         0        active — 8 tool call(s)
37270    37266    2         2          0        handshake only — no tool call ever

  4 of 12 expected tool calls never reached any server process.

PROTOCOL.md is the full reproduction procedure.

The tools

Tool

Purpose

ping

Smallest round trip. Returns a per-process sequence number — an unbroken sequence proves the server never restarted

echo

Returns its text argument, so each chat is identifiable in the capture

sized_echo

Returns size_kb kilobytes of filler

slow_echo

Returns after delay_ms, separating a slow handler from a lost message

What gets recorded

One JSON object per line in captures/. Never to stdout — stdout is the protocol channel.

Record

Contents

session

pid, ppid, argv, node version, start time

raw

Bytes in both directions, before any parsing

parsed

The JSON-RPC message those bytes became

unparseable

Bytes that never became a message

handler

Start and end of each tool handler

write

The synchronous result of process.stdout.write(), with writableNeedDrain

blocked

Emitted immediately when a write does not go through

flushed

When the write completed, and how long it waited

lifecycle

stdin end/close/error, stdout EPIPE, signals

Two details the measurement depends on. stdin is teed through a PassThrough, with the capture listener registered before the transport's, so no byte is consumed before it is recorded. process.stdout.write is replaced, not wrapped — a wrapper's own buffer would report success while the real stdout was blocked, and the blocked record is written synchronously, because a client that stopped reading never fires drain.

Verifying the instrument

npm run test:backpressure

Runs the server against a consumer that never reads, and asserts the detector fires: 24 tool calls, 24 blocked writes, 1 delivered. An instrument that has never triggered cannot be trusted when it stays silent.

Layout

src/server.ts            the MCP server and its four tools
src/capture.ts           the capture file and the record formats
src/wire.ts              stdin tee and the stdout replacement
src/analyse.ts           npm run analyse
src/test/backpressure.ts npm run test:backpressure
samples/                 a small capture, plus the reference run behind the report
issues/                  the reports as submitted

Privacy

The tools are synthetic: they return fixed strings, filler, or their own arguments. captures/ is gitignored; the committed samples have paths replaced. Claude Desktop's own logs are different — they contain organisation and conversation UUIDs, and claude_desktop_config.json may contain API keys. See PROTOCOL.md before attaching anything.

Requirements

Node ≥ 20. One dependency, @modelcontextprotocol/sdk, pinned to 1.30.0.

MIT — see LICENSE.


I am currently looking for a new position; if this is the kind of work you need, you can reach me at sascha.rose@gmail.com.

Available Tools

4 tools
echoA

Returns its text argument unchanged. Use a different text per chat window to tell the windows apart in the capture.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesText to return unchanged.

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. 'Returns its text argument unchanged' fully discloses the behavior with no hidden side effects or prerequisites. This is a complete and honest description for a simple echo tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the purpose, followed by a practical usage hint. Every word earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with one parameter and full schema coverage, the description is complete: it states the core function and gives a relevant use case. No output schema is needed, and the sibling tool names make the context clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already fully describes the single 'text' parameter with 'Text to return unchanged' (100% coverage). The tool description adds no additional semantic information beyond paraphrasing the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Returns its text argument unchanged', which is a specific verb and resource. However, it does not explicitly name sibling tools or differentiate from ping, sized_echo, or slow_echo, so it lacks explicit sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context with 'Use a different text per chat window to tell the windows apart in the capture', indicating a specific use case. However, it does not explicitly discuss when not to use this tool or suggest alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

pingA

Smallest possible round trip. Returns a fixed string and the sequence number of this call.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the disclosure burden. It reveals the return payload (fixed string and sequence number) and implies a lightweight, safe operation, but doesn't explicitly state side-effect freedom or auth needs. Adequate for a simple ping, but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences front-load the core concept. Every word adds value, with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and lack of required input, the description adequately covers purpose and return behavior. It could mention sequence number semantics (e.g., increments per call), but this is not essential for a basic ping.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema confirms this. With no parameters, the baseline is 4, and the description correctly omits parameter details as they are unnecessary.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs a minimal round trip and returns a fixed string and sequence number. It distinguishes from siblings like echo and slow_echo by emphasizing 'smallest possible round trip'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when minimal latency is desired via 'smallest possible round trip'. It doesn't explicitly name alternatives, but the sibling context makes the intended use clear, earning a 4.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

sized_echoA

Returns size_kb kilobytes of filler. For probing buffer and message size effects.

ParametersJSON Schema
NameRequiredDescriptionDefault
size_kbYesSize of the reply in kilobytes (0-8192).

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the basic behavior (returns filler of given size) but does not specify the nature of the filler (e.g., random, repeating), whether size is exact, or any performance characteristics. The read-only and safe nature is implied but not explicitly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core action, followed by the purpose. Every word earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool, the description covers the basic function and purpose. However, without an output schema, it omits details about the exact format of the returned filler, which could be relevant for buffer probing. Still adequate for a test utility.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema fully documents the size_kb parameter with range 0-8192. The description only repeats the parameter name without adding new meaning, so it does not surpass the baseline of 3 given high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns a specified number of kilobytes of filler, and its purpose of probing buffer/message size effects distinguishes it from siblings like echo and ping. The verb 'returns' and the resource 'filler' are specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The second sentence explicitly says the tool is 'for probing buffer and message size effects', providing clear context for when to use it. It doesn't mention alternatives or exclusions, but the purpose is clearly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

slow_echoA

Returns its text argument after delay_ms milliseconds. Separates a slow handler from a lost message.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesText to return.
delay_msYesDelay before returning, in milliseconds.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the delay behavior and adds contextual meaning about isolating slow handlers. For a simple read-only echo tool, this is sufficient transparency; no side effects or permissions are mentioned but none are expected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences: the first states the core function, the second adds rationale. No wasted words, and the most important information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with no output schema, the description fully explains what it does, how it works, and why it exists. The behavior is completely disclosed and the schema covers inputs, making this a complete package.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema covers both parameters with clear descriptions (text and delay_ms). The tool description confirms the role of text and delay but does not add meaning beyond what the schema already provides. Baseline is appropriate given 100% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action: returning the text argument after a delay. It distinguishes itself from siblings like echo and sized_echo by highlighting the delay feature. The phrase 'Separates a slow handler from a lost message' provides additional purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies a use case (simulating slow handlers) but does not explicitly compare with siblings or state when not to use it. The context is clear enough for an agent to infer when this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.0
    • First observedecho
    • First observedping
    • First observedsized_echo
    • First observedslow_echo

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a distinct, non-overlapping purpose: ping for round-trip verification, echo for text return, sized_echo for size effects, and slow_echo for delay effects. There is no ambiguity between them.

Naming Consistency4/5

Names are clear and follow a consistent style: all lowercase with underscores. The echo variants (sized_echo, slow_echo) follow a clear adjective_echo pattern, though ping and echo are simpler bare verb forms.

Tool Count5/5

Four tools is an ideal size for a debug server, covering essential test scenarios without bloat. Each tool earns its place.

Completeness4/5

The set covers basic connectivity, text echo, size testing, and latency testing. A potential gap is error injection or message corruption testing, but for the stated debug purpose, coverage is solid.

Maintenance

ActivityMaintained
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Machine Context Protocol server that enables Claude AI to interact with tools through a structured communication interface, following standard MCP patterns with server initialization and stdio transport.
    2,013
    2
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that allows integration with Claude Desktop by creating and managing custom tools that can be executed through the MCP framework.
    88
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Node.js/TypeScript MCP server template with sample tools (ping and system_info) that demonstrates how to build custom tools for Claude Desktop using stdio transport.
    13
    ISC

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rsascha/mcp-debug-claude-desktop'

If you have feedback or need assistance with the MCP directory API, please join our Discord server