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 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/draft/tools/inspector)**: interactive, transport-agnostic
131. **[MCP Inspector](/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),
16 [prompts](/specification/latest/server/prompts), and
17 [resources](/specification/latest/server/resources), and watch the
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
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) over the protocol
21 [Logging](/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), all messages
32[stdio transport](/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),
42[Streamable HTTP transport](/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), record what the
53For all [transports](/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#log-levels)
81[RFC 5424 severity levels](/specification/latest/server/utilities/logging.md#log-levels)
8282(`debug` through `emergency`). Clients opt in to log messages per request by
8383setting the
8484[`io.modelcontextprotocol/logLevel`](/specification/draft/server/utilities/logging#per-request-log-level)
from line 177
177177
1781781. Check client logs
1791792. Verify server process is running
1803. Test standalone with [Inspector](/docs/draft/tools/inspector)
1803. Test standalone with [Inspector](/docs/draft/tools/inspector.md)
1811814. Verify
182 [protocol compatibility](/docs/draft/learn/versioning#negotiation): call
182 [protocol compatibility](/docs/draft/learn/versioning.md#negotiation): call
183183 [`server/discover`](/specification/draft/server/discover) to see which
184184 protocol versions the server supports. An
185185 `UnsupportedProtocolVersionError` (`-32022`) lists the server's supported
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), it returns a
195 [elicitation](/specification/draft/client/elicitation.md), it returns a
196196 `MissingRequiredClientCapabilityError` (`-32021`) naming the missing
197197 capabilities. Inspect the request's `_meta` and the
198198 [`server/discover`](/specification/draft/server/discover) response to
from line 267
267267### Development cycle
268268
2692691. Initial Development
270 * Use [Inspector](/docs/draft/tools/inspector) for basic testing
270 * Use [Inspector](/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) during
286* **Quick iteration**: Use [Inspector](/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).
326[Security Best Practices](/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)
334 * Test with [Inspector](/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)**
350> **[MCP Inspector](/docs/draft/tools/inspector.md)**
351351>
352352> Learn to use the MCP Inspector
353353
354> **[Build an MCP server](/docs/draft/develop/build-server)**
354> **[Build an MCP server](/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)**
358> **[Connect local servers](/docs/draft/develop/connect-local-servers.md)**
359359>
360360> Full claude\_desktop\_config.json reference and troubleshooting
361361
No line in this hunk matches that.