DEV Community

NexusCore
NexusCore

Posted on

How I Debug MCP Server Issues — A Practical Guide

If you use Claude Desktop, Cursor, or any AI tool that talks to MCP servers, you have probably hit the silent-failure wall: your MCP server is running but Claude keeps saying 'Failed to call tool' with zero detail.

The Problem

MCP servers communicate over stdio using JSON-RPC. When something goes wrong, the error messages are cryptic or nonexistent. You get:

Failed to call tool
Enter fullscreen mode Exit fullscreen mode

...and nothing else. No stack trace. No HTTP error.

A Debugging Approach

I created a lightweight proxy that sits between Claude Desktop and any stdio-based MCP server. It intercepts every JSON-RPC message and records:

  • Full session log with microsecond timing
  • Per-method latency breakdown
  • Complete request/response pairs

How It Works

pip install mcp-debug-proxy
mcp-debug --out session.json -- python my_server.py
Enter fullscreen mode Exit fullscreen mode

Then connect Claude Desktop to mcp-debug instead of your server directly. Every RPC call gets logged.

Key Finding

Using this on the recent Claude Desktop v1.24012.0 issue (where local MCP tool calls return 404), I confirmed:

  1. The MCP server receives the tools/call request correctly
  2. The server returns a valid JSON-RPC response
  3. The response never reaches Claude - lost in the stdio delivery layer

Get the Tool

Free and open source on GitHub:
https://github.com/ZachDreamZ/mcp-debug-proxy

Also available as a $1 package for convenience:
https://shadowcraft41.gumroad.com/l/ypnsof

Happy debugging!

Top comments (0)