Xdebug MCP Server

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. It runs locally over stdio via the published package.

People connecting developer tools tools to Claude, Cursor, VS Code, or another MCP client. The project is written in TypeScript.

VERIFIED ACTIVE

LAST COMMIT 2026-08-05 · ★ 25 · #42 OF 139 MAINTAINED DEVELOPER TOOLS · VERIFIED 2026-08-25

MIT · TypeScript servers · how we verify → /methodology

01 · Install Xdebug

before you install - you'll need

Set XDEBUG_PORT, LOG_LEVEL, PATH_MAPPINGS, XDEBUG_SOCKET_PATH before connecting.

Claude Code

claude mcp add kpanuragh-xdebug-mcp -- npx -y xdebug-mcp

Claude Desktop / Cursor / VS Code - add to config

{
  "mcpServers": {
    "kpanuragh-xdebug-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "xdebug-mcp"
      ]
    }
  }
}

Same JSON for Cursor. For VS Code, rename the top-level key from `mcpServers` to `servers`.

Using another client? Same JSON, different key

Claude Desktop · mcpServers

Cursor · mcpServers

VS Code · servers

Windsurf · mcpServers

Zed · context_servers

Cline · mcpServers

Roo Code · mcpServers

Continue · mcpServers

LibreChat · mcpServers

Gemini CLI · mcpServers

Codex CLI · mcp_servers

Full setup guides: every client.

02 · Evidence

Security posture

What to check before giving this server access to your agent - from the registry, GitHub, and our own probes. We don't score safety; we show what's verifiable.

runs as local process (stdio) - runs on your machine with your user's permissions

license MIT - declared in the repository

npm package xdebug-mcp - unscoped; check the name against the project README before installing

registry namespace io.github.kpanuragh is GitHub-verified and matches the repo owner

03 · What Xdebug can do

Prose above is summarized from the project's README and registry record - no invented capabilities.

Latest releases

v1.2.0 · 2026-03-23

Implement lazy-loading variable inspection with metadata-first approach · Reduce response size from 62KB+ to 2-5KB for large variable sets · Phase 1: get_variables() returns lightweight metadata (names, types, child…

v1.1.1 · 2026-03-23

Critical Fixes · Fixed duplicate session.run() call that was corrupting session state · Removed bare session.stop() without error handling · Added session.close() to 'stopped' case for proper cleanup · Comprehensive…

v1.1.0 · 2026-02-27

Release v1.1.0: Unix Domain Socket Support · Major Feature: Unix domain socket support for improved performance and simplified local debugging! · What's New · Unix Domain Socket Support · Connect via…

04 · Who maintains Xdebug

xdebug is maintained by kpanuragh. It's the only MCP server we track from this author; the repo dates to Dec 2025.

05 · Facts

category
developer tools - ranked #42 of 139 actively-maintained developer tools servers as of 2026-08-25.
registry
io.github.kpanuragh/xdebug (active, first published 2025-12-09 · 3 versions)
packages
npm:xdebug-mcp

06 · Xdebug FAQ

What is Xdebug?

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. It runs locally over stdio via the published package.

Is Xdebug still maintained?

Yes - as of 2026-08-25, its last commit was 2026-08-05. We re-verify nightly.

How do I install Xdebug?

Run `npx -y xdebug-mcp`. The README documents 4 environment variables (XDEBUG_PORT, LOG_LEVEL, PATH_MAPPINGS…) to set first. Set XDEBUG_PORT, LOG_LEVEL, PATH_MAPPINGS, XDEBUG_SOCKET_PATH before connecting. You can also paste the ready-made client config above.

Does Xdebug run locally?

Yes - it's a stdio server: it runs on your machine (via npx) with your user's permissions. Your data stays local unless the server itself calls external APIs.

07 · Alternatives to Xdebug