Follow Discord
Sweep 20 Nov 2026 · 19:55Z Build v2.1.330 547 read Stable v2.1.323 Latest v2.1.330 Next v2.1.330 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · mcp

Debugging changeddocs/draft/tools/debugging

Upstream edited this page at 11 Oct 2026 04:39 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 24 Oct 2026 11:07 UTC.

Upstream edited
Recorded here
Lines+24added
Lines−24removed
From line 10 where the diff opens
First seen 26 Aug 2026 this site's first read of the page
Recorded edits10to this page, all time

The whole hunk

from line 10, old and new numbered
/
lines
from line 10
1010 
1111MCP provides several tools for debugging at different levels:
1212 
131. **[MCP Inspector](/docs/draft/tools/inspector.md)**: interactive, transport-agnostic
131. **[MCP Inspector](https://modelcontextprotocol.io/docs/draft/tools/inspector.md)**: interactive, transport-agnostic
1414 testing UI. Connect to stdio or Streamable HTTP servers, invoke
15 [tools](/specification/latest/server/tools.md),
16 [prompts](/specification/latest/server/prompts.md), and
17 [resources](/specification/latest/server/resources.md), and watch the
15 [tools](https://modelcontextprotocol.io/specification/latest/server/tools.md),
16 [prompts](https://modelcontextprotocol.io/specification/latest/server/prompts.md), and
17 [resources](https://modelcontextprotocol.io/specification/latest/server/resources.md), and watch the
1818 notification stream. This should be your first stop.
19192. **Server logging**: structured logs to stderr (stdio transport) or via
2020 [OpenTelemetry](https://opentelemetry.io/) (all transports).
21 [Logging](/specification/draft/server/utilities/logging.md) over the protocol
21 [Logging](https://modelcontextprotocol.io/specification/draft/server/utilities/logging.md) over the protocol
2222 (`notifications/message`) is deprecated as of protocol version `2026-07-28`.
23233. **Client developer tools**: most MCP clients expose logs and connection
2424 state. See [Debugging in Claude Desktop](#debugging-in-claude-desktop)
from line 29
2929### Server-side logging
3030 
3131When building a server that uses the local
32[stdio transport](/specification/draft/basic/transports/stdio.md), all messages
32[stdio transport](https://modelcontextprotocol.io/specification/draft/basic/transports/stdio.md), all messages
3333logged to stderr (standard error) will be captured by the host application
3434automatically.
3535 
from line 39
3939> will interfere with protocol operation.
4040 
4141For servers using the
42[Streamable HTTP transport](/specification/draft/basic/transports/streamable-http.md),
42[Streamable HTTP transport](https://modelcontextprotocol.io/specification/draft/basic/transports/streamable-http.md),
4343stderr is not captured by the client. Use your own server-side log aggregation
4444or [OpenTelemetry](https://opentelemetry.io/) for logs, and standard HTTP
4545tooling (curl, browser DevTools Network panel) to inspect requests and SSE
from line 50
5050> The `notifications/message` mechanism below is deprecated as of protocol
5151> version `2026-07-28`. It remains available during the deprecation window.
5252 
53For all [transports](/specification/latest/basic/transports.md), record what the
53For all [transports](https://modelcontextprotocol.io/specification/latest/basic/transports.md), record what the
5454server is doing as it runs:
5555 
5656```python Python theme={null}
from line 78
7878```
7979 
8080MCP defines eight
81[RFC 5424 severity levels](/specification/latest/server/utilities/logging.md#log-levels)
81[RFC 5424 severity levels](https://modelcontextprotocol.io/specification/latest/server/utilities/logging.md#log-levels)
8282(`debug` through `emergency`). Clients opt in to log messages per request by
8383setting the
84[`io.modelcontextprotocol/logLevel`](/specification/draft/server/utilities/logging#per-request-log-level)
84[`io.modelcontextprotocol/logLevel`](https://modelcontextprotocol.io/specification/draft/server/utilities/logging#per-request-log-level)
8585field in the request's `_meta`. Servers must not send `notifications/message`
8686for requests that omit this field.
8787 
from line 96
9696## Common issues
9797 
9898The examples below use Claude Desktop's
99[`claude_desktop_config.json`](/docs/draft/develop/connect-local-servers); the same
99[`claude_desktop_config.json`](https://modelcontextprotocol.io/docs/draft/develop/connect-local-servers); the same
100100principles apply to any stdio-based MCP client.
101101 
102102### Working directory
from line 177
177177 
1781781. Check client logs
1791792. Verify server process is running
1803. Test standalone with [Inspector](/docs/draft/tools/inspector.md)
1803. Test standalone with [Inspector](https://modelcontextprotocol.io/docs/draft/tools/inspector.md)
1811814. Verify
182 [protocol compatibility](/docs/draft/learn/versioning.md#negotiation): call
183 [`server/discover`](/specification/draft/server/discover) to see which
182 [protocol compatibility](https://modelcontextprotocol.io/docs/draft/learn/versioning.md#negotiation): call
183 [`server/discover`](https://modelcontextprotocol.io/specification/draft/server/discover) to see which
184184 protocol versions the server supports. An
185185 `UnsupportedProtocolVersionError` (`-32022`) lists the server's supported
186186 versions in its `data` field
1871875. Check the
188 [per-request `_meta` fields](/specification/draft/basic/index#meta):
188 [per-request `_meta` fields](https://modelcontextprotocol.io/specification/draft/basic/index#meta):
189189 every request must carry `io.modelcontextprotocol/protocolVersion` and
190190 `io.modelcontextprotocol/clientCapabilities`, and clients should also
191191 include `io.modelcontextprotocol/clientInfo`. A request missing either
from line 192
192192 required field is rejected with error `-32602` (Invalid params), the same
193193 code returned for many other malformed inputs. If the server needs a
194194 capability the request's `clientCapabilities` did not declare, such as
195 [elicitation](/specification/draft/client/elicitation.md), it returns a
195 [elicitation](https://modelcontextprotocol.io/specification/draft/client/elicitation.md), it returns a
196196 `MissingRequiredClientCapabilityError` (`-32021`) naming the missing
197197 capabilities. Inspect the request's `_meta` and the
198 [`server/discover`](/specification/draft/server/discover) response to
198 [`server/discover`](https://modelcontextprotocol.io/specification/draft/server/discover) response to
199199 verify both sides declared what you expect
200200 
201201## Debugging in Claude Desktop
from line 267
267267### Development cycle
268268 
2692691. Initial Development
270 * Use [Inspector](/docs/draft/tools/inspector.md) for basic testing
270 * Use [Inspector](https://modelcontextprotocol.io/docs/draft/tools/inspector.md) for basic testing
271271 * Implement core functionality
272272 * Add logging points
273273 
from line 283
283283* **Configuration changes**: Restart the MCP client
284284* **Server code changes**: Restart the client (for Claude Desktop, fully quit
285285 and reopen; closing the window is not enough)
286* **Quick iteration**: Use [Inspector](/docs/draft/tools/inspector.md) during
286* **Quick iteration**: Use [Inspector](https://modelcontextprotocol.io/docs/draft/tools/inspector.md) during
287287 development
288288 
289289## Best practices
from line 323
323323 * Monitor access patterns
324324 
325325For a full treatment of MCP attack vectors and mitigations, see
326[Security Best Practices](/docs/draft/tutorials/security/security_best_practices.md).
326[Security Best Practices](https://modelcontextprotocol.io/docs/draft/tutorials/security/security_best_practices.md).
327327 
328328## Getting help
329329 
from line 331
331331 
3323321. **First Steps**
333333 * Check server logs
334 * Test with [Inspector](/docs/draft/tools/inspector.md)
334 * Test with [Inspector](https://modelcontextprotocol.io/docs/draft/tools/inspector.md)
335335 * Review configuration
336336 * Verify environment
337337 
from line 347
347347 
348348## Next steps
349349 
350> **[MCP Inspector](/docs/draft/tools/inspector.md)**
350> **[MCP Inspector](https://modelcontextprotocol.io/docs/draft/tools/inspector.md)**
351351>
352352> Learn to use the MCP Inspector
353353 
354> **[Build an MCP server](/docs/draft/develop/build-server.md)**
354> **[Build an MCP server](https://modelcontextprotocol.io/docs/draft/develop/build-server.md)**
355355>
356356> Walk through building a server from scratch
357357 
358> **[Connect local servers](/docs/draft/develop/connect-local-servers.md)**
358> **[Connect local servers](https://modelcontextprotocol.io/docs/draft/develop/connect-local-servers.md)**
359359>
360360> Full claude\_desktop\_config.json reference and troubleshooting
361361 
Feedback