Debugging changeddocs/2025-11-25/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 20 Oct 2026 20:07 UTC.
Upstream edited
Recorded here
Lines+46added
Lines−54removed
From line
32
where the diff opens
First seen
26 Aug 2026
this site's first read of the page
Recorded edits3to this page, all time
The whole hunk
from line 32, old and new numbered
/
from line 32
3232logged to stderr (standard error) will be captured by the host application
3333automatically.
3434
35<Warning>
36 Local MCP servers should not log messages to stdout (standard out), as this
37 will interfere with protocol operation.
38</Warning>
35> [!WARNING]
36>
37> Local MCP servers should not log messages to stdout (standard out), as this
38> will interfere with protocol operation.
3939
4040For servers using the
4141[Streamable HTTP transport](/specification/2025-11-25/basic/transports#streamable-http),
from line 48
4848For all [transports](/specification/2025-11-25/basic/transports), you can also
4949provide logging to the client by sending a log message notification:
5050
51<CodeGroup>
52 ```python Python theme={null}
53 @server.tool()
54 async def my_tool(ctx: Context) -> str:
55 await ctx.session.send_log_message(
56 level="info",
57 data="Server started successfully",
58 )
59 return "done"
60 ```
51```python Python theme={null}
52@server.tool()
53async def my_tool(ctx: Context) -> str:
54 await ctx.session.send_log_message(
55 level="info",
56 data="Server started successfully",
57 )
58 return "done"
59```
6160
62 ```typescript TypeScript theme={null}
63 await server.sendLoggingMessage({
64 level: "info",
65 data: "Server started successfully",
66 });
67 ```
68</CodeGroup>
61```typescript TypeScript theme={null}
62await server.sendLoggingMessage({
63 level: "info",
64 data: "Server started successfully",
65});
66```
6967
7068MCP defines eight
7169[RFC 5424 severity levels](/specification/2025-11-25/server/utilities/logging#log-levels)
from line 189
191189hover over the **Connectors** menu to see connected servers and available
192190tools.
193191
194<img src="https://mintcdn.com/mcp/zNouQwo2h8cbxlDS/images/available-mcp-tools.png?fit=max&auto=format&n=zNouQwo2h8cbxlDS&q=85&s=e2ace1ac88895a5fe30ebd8d01456bc3" alt="Available MCP tools" width="437" height="244" data-path="images/available-mcp-tools.png" />
192
195193
196194### Viewing logs
197195
from line 198
200198* macOS: `~/Library/Logs/Claude`
201199* Windows: `%APPDATA%\Claude\logs`
202200
203<CodeGroup>
204 ```bash macOS theme={null}
205 tail -n 20 -F ~/Library/Logs/Claude/mcp*.log
206 ```
201```bash macOS theme={null}
202tail -n 20 -F ~/Library/Logs/Claude/mcp*.log
203```
207204
208 ```powershell Windows theme={null}
209 type "$env:AppData\Claude\logs\mcp*.log"
210 ```
211</CodeGroup>
205```powershell Windows theme={null}
206type "$env:AppData\Claude\logs\mcp*.log"
207```
212208
213209The logs capture:
214210
from line 220
224220
2252211. Create a `developer_settings.json` file with `allowDevTools` set to true:
226222
227<CodeGroup>
228 ```bash macOS theme={null}
229 echo '{"allowDevTools": true}' > ~/Library/Application\ Support/Claude/developer_settings.json
230 ```
223```bash macOS theme={null}
224echo '{"allowDevTools": true}' > ~/Library/Application\ Support/Claude/developer_settings.json
225```
231226
232 ```powershell Windows theme={null}
233 '{"allowDevTools": true}' | Set-Content "$env:AppData\Claude\developer_settings.json"
234 ```
235</CodeGroup>
227```powershell Windows theme={null}
228'{"allowDevTools": true}' | Set-Content "$env:AppData\Claude\developer_settings.json"
229```
236230
2372312. Open DevTools: `Command-Option-I` (macOS) or `Ctrl+Alt+I` (Windows)
238232
from line 327
333327
334328## Next steps
335329
336<CardGroup cols={2}>
337 <Card title="MCP Inspector" icon="magnifying-glass" href="/docs/2025-11-25/tools/inspector">
338 Learn to use the MCP Inspector
339 </Card>
330> **[MCP Inspector](/docs/2025-11-25/tools/inspector)**
331>
332> Learn to use the MCP Inspector
340333
341 <Card title="Build an MCP server" icon="code" href="/docs/2025-11-25/develop/build-server">
342 Walk through building a server from scratch
343 </Card>
334> **[Build an MCP server](/docs/2025-11-25/develop/build-server)**
335>
336> Walk through building a server from scratch
344337
345 <Card title="Connect local servers" icon="plug" href="/docs/2025-11-25/develop/connect-local-servers">
346 Full claude\_desktop\_config.json reference and troubleshooting
347 </Card>
348</CardGroup>
338> **[Connect local servers](/docs/2025-11-25/develop/connect-local-servers)**
339>
340> Full claude\_desktop\_config.json reference and troubleshooting
349341
No line in this hunk matches that.