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 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[HTTP with SSE transport](/specification/2024-11-05/basic/transports#http-with-sse),
from line 46
4646For all [transports](/specification/2024-11-05/basic/transports), you can also
4747provide logging to the client by sending a log message notification:
4848
49<CodeGroup>
50 ```python Python theme={null}
51 @server.tool()
52 async def my_tool(ctx: Context) -> str:
53 await ctx.session.send_log_message(
54 level="info",
55 data="Server started successfully",
56 )
57 return "done"
58 ```
49```python Python theme={null}
50@server.tool()
51async def my_tool(ctx: Context) -> str:
52 await ctx.session.send_log_message(
53 level="info",
54 data="Server started successfully",
55 )
56 return "done"
57```
5958
60 ```typescript TypeScript theme={null}
61 await server.sendLoggingMessage({
62 level: "info",
63 data: "Server started successfully",
64 });
65 ```
66</CodeGroup>
59```typescript TypeScript theme={null}
60await server.sendLoggingMessage({
61 level: "info",
62 data: "Server started successfully",
63});
64```
6765
6866MCP defines eight
6967[RFC 5424 severity levels](/specification/2024-11-05/server/utilities/logging#log-levels)
from line 186
188186hover over the **Connectors** menu to see connected servers and available
189187tools.
190188
191<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" />
189
192190
193191### Viewing logs
194192
from line 195
197195* macOS: `~/Library/Logs/Claude`
198196* Windows: `%APPDATA%\Claude\logs`
199197
200<CodeGroup>
201 ```bash macOS theme={null}
202 tail -n 20 -F ~/Library/Logs/Claude/mcp*.log
203 ```
198```bash macOS theme={null}
199tail -n 20 -F ~/Library/Logs/Claude/mcp*.log
200```
204201
205 ```powershell Windows theme={null}
206 type "$env:AppData\Claude\logs\mcp*.log"
207 ```
208</CodeGroup>
202```powershell Windows theme={null}
203type "$env:AppData\Claude\logs\mcp*.log"
204```
209205
210206The logs capture:
211207
from line 217
221217
2222181. Create a `developer_settings.json` file with `allowDevTools` set to true:
223219
224<CodeGroup>
225 ```bash macOS theme={null}
226 echo '{"allowDevTools": true}' > ~/Library/Application\ Support/Claude/developer_settings.json
227 ```
220```bash macOS theme={null}
221echo '{"allowDevTools": true}' > ~/Library/Application\ Support/Claude/developer_settings.json
222```
228223
229 ```powershell Windows theme={null}
230 '{"allowDevTools": true}' | Set-Content "$env:AppData\Claude\developer_settings.json"
231 ```
232</CodeGroup>
224```powershell Windows theme={null}
225'{"allowDevTools": true}' | Set-Content "$env:AppData\Claude\developer_settings.json"
226```
233227
2342282. Open DevTools: `Command-Option-I` (macOS) or `Ctrl+Alt+I` (Windows)
235229
from line 324
330324
331325## Next steps
332326
333<CardGroup cols={2}>
334 <Card title="MCP Inspector" icon="magnifying-glass" href="/docs/2024-11-05/tools/inspector">
335 Learn to use the MCP Inspector
336 </Card>
327> **[MCP Inspector](/docs/2024-11-05/tools/inspector)**
328>
329> Learn to use the MCP Inspector
337330
338 <Card title="Build an MCP server" icon="code" href="/docs/2024-11-05/develop/build-server">
339 Walk through building a server from scratch
340 </Card>
331> **[Build an MCP server](/docs/2024-11-05/develop/build-server)**
332>
333> Walk through building a server from scratch
341334
342 <Card title="Connect local servers" icon="plug" href="/docs/2024-11-05/develop/connect-local-servers">
343 Full claude\_desktop\_config.json reference and troubleshooting
344 </Card>
345</CardGroup>
335> **[Connect local servers](/docs/2024-11-05/develop/connect-local-servers)**
336>
337> Full claude\_desktop\_config.json reference and troubleshooting
346338
No line in this hunk matches that.