Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · mcp

Debugging changeddocs/2025-03-26/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+19added
Lines−19removed
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
/
lines
from line 10
1010 
1111MCP provides several tools for debugging at different levels:
1212 
131. **[MCP Inspector](/docs/2025-03-26/tools/inspector)**: interactive, transport-agnostic
131. **[MCP Inspector](/docs/2025-03-26/tools/inspector.md)**: interactive, transport-agnostic
1414 testing UI. Connect to stdio or Streamable HTTP servers, invoke
15 [tools](/specification/2025-03-26/server/tools),
16 [prompts](/specification/2025-03-26/server/prompts), and
17 [resources](/specification/2025-03-26/server/resources), and watch the
15 [tools](/specification/2025-03-26/server/tools.md),
16 [prompts](/specification/2025-03-26/server/prompts.md), and
17 [resources](/specification/2025-03-26/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-03-26/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-03-26/basic/transports#stdio), all messages
31[stdio transport](/specification/2025-03-26/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-03-26/basic/transports#streamable-http),
41[Streamable HTTP transport](/specification/2025-03-26/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-03-26/basic/transports#session-management),
4646and SSE streams.
4747 
48For all [transports](/specification/2025-03-26/basic/transports), you can also
48For all [transports](/specification/2025-03-26/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-03-26/server/utilities/logging#log-levels)
69[RFC 5424 severity levels](/specification/2025-03-26/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-03-26/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-03-26/tools/inspector)
1673. Test standalone with [Inspector](/docs/2025-03-26/tools/inspector.md)
1681684. Verify
169 [protocol compatibility](/specification/2025-03-26/basic/lifecycle#version-negotiation)
169 [protocol compatibility](/specification/2025-03-26/basic/lifecycle.md#version-negotiation)
1701705. Check
171 [capability negotiation](/specification/2025-03-26/basic/lifecycle#capability-negotiation):
171 [capability negotiation](/specification/2025-03-26/basic/lifecycle.md#capability-negotiation):
172172 error [`-32602`](/specification/2025-03-26/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-03-26/client/sampling) requests to a
175 [sampling](/specification/2025-03-26/client/sampling.md) requests to a
176176 client that hasn't declared that capability. Inspect the
177177 [`initialize` exchange](/specification/2025-03-26/basic/lifecycle#initialization)
178178 to verify both sides declared what you expect
from line 246
246246### Development cycle
247247 
2482481. Initial Development
249 * Use [Inspector](/docs/2025-03-26/tools/inspector) for basic testing
249 * Use [Inspector](/docs/2025-03-26/tools/inspector.md) for basic testing
250250 * Implement core functionality
251251 * Add logging points
252252 
from line 262
262262* **Configuration changes**: Restart the MCP client
263263* **Server code changes**: Restart the client (for Claude Desktop, fully quit
264264 and reopen; closing the window is not enough)
265* **Quick iteration**: Use [Inspector](/docs/2025-03-26/tools/inspector) during
265* **Quick iteration**: Use [Inspector](/docs/2025-03-26/tools/inspector.md) during
266266 development
267267 
268268## Best practices
from line 302
302302 * Monitor access patterns
303303 
304304For a full treatment of MCP attack vectors and mitigations, see
305[Security Best Practices](/docs/2025-03-26/tutorials/security/security_best_practices).
305[Security Best Practices](/docs/2025-03-26/tutorials/security/security_best_practices.md).
306306 
307307## Getting help
308308 
from line 310
310310 
3113111. **First Steps**
312312 * Check server logs
313 * Test with [Inspector](/docs/2025-03-26/tools/inspector)
313 * Test with [Inspector](/docs/2025-03-26/tools/inspector.md)
314314 * Review configuration
315315 * Verify environment
316316 
from line 326
326326 
327327## Next steps
328328 
329> **[MCP Inspector](/docs/2025-03-26/tools/inspector)**
329> **[MCP Inspector](/docs/2025-03-26/tools/inspector.md)**
330330>
331331> Learn to use the MCP Inspector
332332 
333> **[Build an MCP server](/docs/2025-03-26/develop/build-server)**
333> **[Build an MCP server](/docs/2025-03-26/develop/build-server.md)**
334334>
335335> Walk through building a server from scratch
336336 
337> **[Connect local servers](/docs/2025-03-26/develop/connect-local-servers)**
337> **[Connect local servers](/docs/2025-03-26/develop/connect-local-servers.md)**
338338>
339339> Full claude\_desktop\_config.json reference and troubleshooting
340340 
Feedback