Debugging changeddocs/2025-06-18/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 22 Oct 2026 20:37 UTC.
Upstream edited
Recorded here
Lines+20added
Lines−20removed
From line
10
where the diff opens
First seen
26 Aug 2026
this site's first read of the page
Recorded edits4to this page, all time
The whole hunk
from line 10, old and new numbered
/
from line 10
1010
1111MCP provides several tools for debugging at different levels:
1212
131. **[MCP Inspector](/docs/2025-06-18/tools/inspector)**: interactive, transport-agnostic
131. **[MCP Inspector](/docs/2025-06-18/tools/inspector.md)**: interactive, transport-agnostic
1414 testing UI. Connect to stdio or Streamable HTTP servers, invoke
15 [tools](/specification/2025-06-18/server/tools),
16 [prompts](/specification/2025-06-18/server/prompts), and
17 [resources](/specification/2025-06-18/server/resources), and watch the
15 [tools](/specification/2025-06-18/server/tools.md),
16 [prompts](/specification/2025-06-18/server/prompts.md), and
17 [resources](/specification/2025-06-18/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 [`notifications/message`](/specification/2025-06-18/server/utilities/logging#log-message-notifications)
from line 28
2828### Server-side logging
2929
3030When building a server that uses the local
31[stdio transport](/specification/2025-06-18/basic/transports#stdio), all messages
31[stdio transport](/specification/2025-06-18/basic/transports.md#stdio), all messages
3232logged to stderr (standard error) will be captured by the host application
3333automatically.
3434
from line 38
3838> will interfere with protocol operation.
3939
4040For servers using the
41[Streamable HTTP transport](/specification/2025-06-18/basic/transports#streamable-http),
41[Streamable HTTP transport](/specification/2025-06-18/basic/transports.md#streamable-http),
4242stderr is not captured by the client. Use the log message notifications below,
4343your own server-side log aggregation, or standard HTTP tooling (curl, browser
4444DevTools Network panel) to inspect requests,
from line 45
4545[`Mcp-Session-Id` headers](/specification/2025-06-18/basic/transports#session-management),
4646and SSE streams.
4747
48For all [transports](/specification/2025-06-18/basic/transports), you can also
48For all [transports](/specification/2025-06-18/basic/transports.md), you can also
4949provide logging to the client by sending a log message notification:
5050
5151```python Python theme={null}
from line 66
6666```
6767
6868MCP defines eight
69[RFC 5424 severity levels](/specification/2025-06-18/server/utilities/logging#log-levels)
69[RFC 5424 severity levels](/specification/2025-06-18/server/utilities/logging.md#log-levels)
7070(`debug` through `emergency`). Clients can adjust the minimum level at runtime
7171via the
7272[`logging/setLevel`](/specification/2025-06-18/server/utilities/logging#setting-log-level)
from line 164
164164
1651651. Check client logs
1661662. Verify server process is running
1673. Test standalone with [Inspector](/docs/2025-06-18/tools/inspector)
1673. Test standalone with [Inspector](/docs/2025-06-18/tools/inspector.md)
1681684. Verify
169 [protocol compatibility](/specification/2025-06-18/basic/lifecycle#version-negotiation)
169 [protocol compatibility](/specification/2025-06-18/basic/lifecycle.md#version-negotiation)
1701705. Check
171 [capability negotiation](/specification/2025-06-18/basic/lifecycle#capability-negotiation):
171 [capability negotiation](/specification/2025-06-18/basic/lifecycle.md#capability-negotiation):
172172 error [`-32602`](/specification/2025-06-18/basic/lifecycle#error-handling) is
173173 the standard JSON-RPC "Invalid params" code and is returned in many
174174 contexts. One common cause is a server sending
175 [sampling](/specification/2025-06-18/client/sampling) or
176 [elicitation](/specification/2025-06-18/client/elicitation) requests to a
175 [sampling](/specification/2025-06-18/client/sampling.md) or
176 [elicitation](/specification/2025-06-18/client/elicitation.md) requests to a
177177 client that hasn't declared that capability. Inspect the
178178 [`initialize` exchange](/specification/2025-06-18/basic/lifecycle#initialization)
179179 to verify both sides declared what you expect
from line 247
247247### Development cycle
248248
2492491. Initial Development
250 * Use [Inspector](/docs/2025-06-18/tools/inspector) for basic testing
250 * Use [Inspector](/docs/2025-06-18/tools/inspector.md) for basic testing
251251 * Implement core functionality
252252 * Add logging points
253253
from line 263
263263* **Configuration changes**: Restart the MCP client
264264* **Server code changes**: Restart the client (for Claude Desktop, fully quit
265265 and reopen; closing the window is not enough)
266* **Quick iteration**: Use [Inspector](/docs/2025-06-18/tools/inspector) during
266* **Quick iteration**: Use [Inspector](/docs/2025-06-18/tools/inspector.md) during
267267 development
268268
269269## Best practices
from line 303
303303 * Monitor access patterns
304304
305305For a full treatment of MCP attack vectors and mitigations, see
306[Security Best Practices](/docs/2025-06-18/tutorials/security/security_best_practices).
306[Security Best Practices](/docs/2025-06-18/tutorials/security/security_best_practices.md).
307307
308308## Getting help
309309
from line 311
311311
3123121. **First Steps**
313313 * Check server logs
314 * Test with [Inspector](/docs/2025-06-18/tools/inspector)
314 * Test with [Inspector](/docs/2025-06-18/tools/inspector.md)
315315 * Review configuration
316316 * Verify environment
317317
from line 327
327327
328328## Next steps
329329
330> **[MCP Inspector](/docs/2025-06-18/tools/inspector)**
330> **[MCP Inspector](/docs/2025-06-18/tools/inspector.md)**
331331>
332332> Learn to use the MCP Inspector
333333
334> **[Build an MCP server](/docs/2025-06-18/develop/build-server)**
334> **[Build an MCP server](/docs/2025-06-18/develop/build-server.md)**
335335>
336336> Walk through building a server from scratch
337337
338> **[Connect local servers](/docs/2025-06-18/develop/connect-local-servers)**
338> **[Connect local servers](/docs/2025-06-18/develop/connect-local-servers.md)**
339339>
340340> Full claude\_desktop\_config.json reference and troubleshooting
341341
No line in this hunk matches that.