smart-xdebug-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| XDEBUG_MCP_PORT | No | XDebug listener port | 9003 |
| XDEBUG_MCP_TIMEOUT | No | Connection timeout (ms) | 30000 |
| XDEBUG_MCP_WATCHDOG_TIMEOUT | No | Auto-terminate idle sessions (5 min) | 300000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| start_debug_sessionA | Starts a new PHP debugging session by listening for XDebug connections and executing a trigger command. WORKFLOW - Call tools in this order:
BEFORE CALLING:
XDEBUG TRIGGERING: For xdebug.start_with_request=trigger (common in Docker), append the trigger to your URL:
HOW IT WORKS:
LIMITATIONS:
COMMON ERRORS:
|
| set_breakpointA | Sets a breakpoint at a specific file and line. Breakpoints persist until the session ends. WHEN TO USE:
PATH FORMAT - Use LOCAL paths relative to your project root:
The tool automatically translates local paths to container paths using mappings from .vscode/launch.json, docker-compose.yml, or XDEBUG_MCP_PATH_MAPPINGS env var. CONDITIONAL BREAKPOINTS - For loops, ALWAYS use conditions:
RETURNS:
AFTER SETTING: Call start_debug_session to begin debugging. |
| inspect_variableA | Inspects a PHP variable's value at the current breakpoint. Only works when session is PAUSED. WHEN TO USE:
CONTEXT EFFICIENCY - Full dumps are expensive. Use JSONPath filters: BAD (returns thousands of lines): inspect_variable("$order") GOOD (returns only what you need): inspect_variable("$order", "$.total") inspect_variable("$order", "$.items[*].sku") inspect_variable("$request", "$.input.email") Without a filter, returns structure only (keys/types, no values). JSONPATH EXAMPLES:
REQUIRES: Session must be paused. Call get_session_status to verify. COMMON VARIABLES:
|
| control_executionA | Controls the debugger's execution flow. Use to step through code or end sessions. ACTIONS: step_over: Execute current line, pause at next line in same scope. Use when: Line calls a function you don't need to debug. Example: Skip framework internals, focus on your logic. step_into: Step INTO the function call on the current line. Use when: You need to debug inside a called function. Example: Debug why UserService::create() fails. step_out: Run until current function returns to its caller. Use when: Done debugging a function, want to return to caller. Example: Finished debugging a helper, return to controller. continue: Run until next breakpoint or exception. Use when: Skip to the next interesting point. Example: Jump from authentication to order processing. stop: Terminate the debug session immediately. Use when: Done debugging, or session is stuck/errored. IMPORTANT: Always stop sessions when done to free the port. REQUIRES:
AFTER STOP: You can start a new session with start_debug_session. |
| get_session_statusA | Returns the current debug session status. Call this FIRST before starting a new session. WHEN TO USE:
RETURNS:
SESSION STATES:
STUCK SESSION RECOVERY: If status is "initializing" for >30 seconds, the connection likely failed. Use control_execution with action="stop" to reset, then check your XDebug configuration. |
| query_historyA | Query past variable values from the session recorder (time-travel debugging). WHEN TO USE:
DOES NOT REQUIRE PAUSED STATE - can query history anytime during an active session. RETURNS: Array of historical values with step numbers and timestamps, showing how the variable changed over time. LIMITATION: Only variables that were inspected via inspect_variable are recorded. If you didn't inspect a variable at a step, it won't have history for that step. EXAMPLE USAGE: "What was $user->status 3 steps ago?" query_history("$user->status", steps_ago=3) "Show me the last 10 values of $total" query_history("$total", limit=10) |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wallter/smart-xdebug-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server