Debugging changeddocs/2024-11-05/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
/
from line 10
1010
1111MCP provides several tools for debugging at different levels:
1212
131. **[MCP Inspector](/docs/2024-11-05/tools/inspector)**: interactive, transport-agnostic
131. **[MCP Inspector](/docs/2024-11-05/tools/inspector.md)**: interactive, transport-agnostic
1414 testing UI. Connect to stdio or HTTP with SSE servers, invoke
15 [tools](/specification/2024-11-05/server/tools),
16 [prompts](/specification/2024-11-05/server/prompts), and
17 [resources](/specification/2024-11-05/server/resources), and watch the
15 [tools](/specification/2024-11-05/server/tools.md),
16 [prompts](/specification/2024-11-05/server/prompts.md), and
17 [resources](/specification/2024-11-05/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/2024-11-05/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/2024-11-05/basic/transports#stdio), all messages
31[stdio transport](/specification/2024-11-05/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[HTTP with SSE transport](/specification/2024-11-05/basic/transports#http-with-sse),
41[HTTP with SSE transport](/specification/2024-11-05/basic/transports.md#http-with-sse),
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 and SSE streams.
4545
46For all [transports](/specification/2024-11-05/basic/transports), you can also
46For all [transports](/specification/2024-11-05/basic/transports.md), you can also
4747provide logging to the client by sending a log message notification:
4848
4949```python Python theme={null}
from line 64
6464```
6565
6666MCP defines eight
67[RFC 5424 severity levels](/specification/2024-11-05/server/utilities/logging#log-levels)
67[RFC 5424 severity levels](/specification/2024-11-05/server/utilities/logging.md#log-levels)
6868(`debug` through `emergency`). Clients can adjust the minimum level at runtime
6969via the
7070[`logging/setLevel`](/specification/2024-11-05/server/utilities/logging#setting-log-level)
from line 162
162162
1631631. Check client logs
1641642. Verify server process is running
1653. Test standalone with [Inspector](/docs/2024-11-05/tools/inspector)
1653. Test standalone with [Inspector](/docs/2024-11-05/tools/inspector.md)
1661664. Verify
167 [protocol compatibility](/specification/2024-11-05/basic/lifecycle#version-negotiation)
167 [protocol compatibility](/specification/2024-11-05/basic/lifecycle.md#version-negotiation)
1681685. Check
169 [capability negotiation](/specification/2024-11-05/basic/lifecycle#capability-negotiation):
169 [capability negotiation](/specification/2024-11-05/basic/lifecycle.md#capability-negotiation):
170170 error [`-32602`](/specification/2024-11-05/basic/lifecycle#error-handling) is
171171 the standard JSON-RPC "Invalid params" code and is returned in many
172172 contexts. One common cause is a server sending
173 [sampling](/specification/2024-11-05/client/sampling) requests to a
173 [sampling](/specification/2024-11-05/client/sampling.md) requests to a
174174 client that hasn't declared that capability. Inspect the
175175 [`initialize` exchange](/specification/2024-11-05/basic/lifecycle#initialization)
176176 to verify both sides declared what you expect
from line 244
244244### Development cycle
245245
2462461. Initial Development
247 * Use [Inspector](/docs/2024-11-05/tools/inspector) for basic testing
247 * Use [Inspector](/docs/2024-11-05/tools/inspector.md) for basic testing
248248 * Implement core functionality
249249 * Add logging points
250250
from line 260
260260* **Configuration changes**: Restart the MCP client
261261* **Server code changes**: Restart the client (for Claude Desktop, fully quit
262262 and reopen; closing the window is not enough)
263* **Quick iteration**: Use [Inspector](/docs/2024-11-05/tools/inspector) during
263* **Quick iteration**: Use [Inspector](/docs/2024-11-05/tools/inspector.md) during
264264 development
265265
266266## Best practices
from line 300
300300 * Monitor access patterns
301301
302302For a full treatment of MCP attack vectors and mitigations, see
303[Security Best Practices](/docs/2024-11-05/tutorials/security/security_best_practices).
303[Security Best Practices](/docs/2024-11-05/tutorials/security/security_best_practices.md).
304304
305305## Getting help
306306
from line 308
308308
3093091. **First Steps**
310310 * Check server logs
311 * Test with [Inspector](/docs/2024-11-05/tools/inspector)
311 * Test with [Inspector](/docs/2024-11-05/tools/inspector.md)
312312 * Review configuration
313313 * Verify environment
314314
from line 324
324324
325325## Next steps
326326
327> **[MCP Inspector](/docs/2024-11-05/tools/inspector)**
327> **[MCP Inspector](/docs/2024-11-05/tools/inspector.md)**
328328>
329329> Learn to use the MCP Inspector
330330
331> **[Build an MCP server](/docs/2024-11-05/develop/build-server)**
331> **[Build an MCP server](/docs/2024-11-05/develop/build-server.md)**
332332>
333333> Walk through building a server from scratch
334334
335> **[Connect local servers](/docs/2024-11-05/develop/connect-local-servers)**
335> **[Connect local servers](/docs/2024-11-05/develop/connect-local-servers.md)**
336336>
337337> Full claude\_desktop\_config.json reference and troubleshooting
338338
No line in this hunk matches that.