mcp-python-debugger
Provides Python debugging capabilities via debugpy and the Debug Adapter Protocol, enabling launching Python scripts, setting breakpoints, stepping through code, inspecting stack frames and variables, and evaluating expressions.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-python-debugger
MCP server that gives Claude Code access to a real Python debugger (debugpy + DAP protocol).
Instead of spamming print() statements, Claude can now set breakpoints, step through code, inspect variables, and evaluate expressions — just like a developer in VS Code.
Architecture
Claude Code ──► MCP tools ──► FastMCP Server ──► DAP protocol ──► debugpy ──► your scriptThe server launches your Python script under debugpy, connects via the Debug Adapter Protocol (DAP), and exposes debugger operations as MCP tools.
Related MCP server: MCP Debugger
Installation
# Clone and install
cd mcp-python-debugger
pip install -e .
# debugpy is installed as a dependencyClaude Code Configuration
Add to your .claude/settings.json:
{
"mcpServers": {
"python-debugger": {
"command": "mcp-python-debugger"
}
}
}Or in your project's .mcp.json:
{
"mcpServers": {
"python-debugger": {
"command": "mcp-python-debugger",
"type": "stdio"
}
}
}Available Tools
Tool | Description |
| Launch a script with debugpy attached |
| Set breakpoints at specific lines |
| Resume until next breakpoint |
| Execute current line, stop at next |
| Step into a function call |
| Run until current function returns |
| Show the call stack with frame IDs |
| Inspect locals/globals in a frame |
| Evaluate a Python expression at breakpoint |
| Check session state |
| Terminate the debug session |
Example Workflow
What Claude Code would do when debugging an issue:
1. debug_launch(program="/app/main.py")
→ Session started, paused on entry
2. debug_set_breakpoints(file="/app/main.py", lines=[42, 67])
→ Breakpoints set at lines 42, 67
3. debug_continue()
→ Stopped: breakpoint at process_data(), main.py:42 [frame 1]
4. debug_variables(frame_id=1, scope="locals")
→ data: [1, 2, None, 4] (list)
→ index: 2 (int)
5. debug_evaluate(expression="data[index]", frame_id=1)
→ None (NoneType)
6. # Claude now sees the bug: None in the data at index 2
debug_stop()How It Works
debug_launch starts
python -m debugpy --listen 127.0.0.1:<port> --wait-for-client script.pyThe MCP server connects to debugpy's DAP socket
Each tool call translates to DAP requests (JSON messages over TCP)
Responses are formatted for Claude's consumption
Limitations
One debug session at a time (by design — keeps it simple)
justMyCode=Trueby default (doesn't step into stdlib/site-packages)60s timeout on
continue, 30s on step operationsNo conditional breakpoints yet (TODO)
TODO
Conditional breakpoints (
set_breakpointswith conditions)Watch expressions (auto-evaluate on each stop)
Exception breakpoints (break on raise)
Multi-threaded debugging (thread selection)
Attach to running process (not just launch)
stdout/stderr capture from debuggee
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
People and AI agents build software together in persistent cloud sessions for Claude Code.
Build, debug and break hosted mock APIs from Claude: endpoints, stateful CRUD data, OpenAPI import, response variants and fault injection.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to perform interactive Python debugging with breakpoints, step execution, and variable inspection using the Debug Adapter Protocol (DAP) through an MCP server interface.81MIT
- AlicenseAqualityAmaintenanceEnables AI agents to perform step-through debugging of Python, JavaScript/Node.js, and Rust programs using the Debug Adapter Protocol, with support for breakpoints, variable inspection, and stack traces.29194MIT
- AlicenseBqualityDmaintenanceEnables coding agents to use a real debugger (Python via debugpy) for launching, attaching, setting breakpoints, stepping through code, inspecting stack frames, and evaluating expressions through MCP tools.1227MIT

Debugger MCPofficial
AlicenseNot gradedqualityDmaintenanceEnables AI agents like Claude to control VS Code's debugger, supporting any language with a Debug Adapter Protocol implementation.2MIT