SSyncDev

Xdebug MCP Server

MCP server for PHP Xdebug debugging with breakpoints, stepping, and variable inspection

Local serverstdio

What is the Xdebug MCP Server?

MCP server for PHP Xdebug debugging with breakpoints, stepping, and variable inspection

What it actually does

An MCP (Model Context Protocol) server that provides PHP debugging capabilities through Xdebug's DBGp protocol. This allows AI assistants like Claude to directly debug PHP applications.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
capture_request_contextCapture HTTP request context
add_step_filterAdd filter to skip files during stepping
list_step_filtersList step filter rules
get_function_historyView function call history
export_sessionExport session as JSON/HTML report
capture_snapshotCapture debug state snapshot

How to install the Xdebug MCP Server

{
  "mcpServers": {
    "xdebug": {
      "command": "xdebug-mcp",
      "env": {
        "XDEBUG_PORT": "9003",
        "LOG_LEVEL": "info"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
XDEBUG_PORTConfiguration value read at startup.Optional
LOG_LEVELConfiguration value read at startup.Optional
PATH_MAPPINGSFilesystem location the server is allowed to use.Optional
XDEBUG_SOCKET_PATHFilesystem location the server is allowed to use.Optional
DBGP_PROXY_HOSTEndpoint or connection string the server talks to.Optional
XDEBUG_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • “Use Xdebug to capture request context.”
  • “Use Xdebug to add step filter.”
  • “Use Xdebug to list step filters.”

Frequently asked questions

MCP server for PHP Xdebug debugging with breakpoints, stepping, and variable inspection Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.