プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

Xdebug

作者:kpanuraghバージョン 1.2.1i★ 28iパソコンで動く
レジストリ名io.github.kpanuragh/xdebug

インストール方法

概要

作者による説明(英語の原文)

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

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: 開発者ツール

インストール

使っているAIアプリを選んで、設定をコピーしてください。

チェック 2/2 合格 · あなたのパソコンで動きます

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません

  1. Node.js を入れる

    1 回だけ。Node.js が必要なすべてのサーバーで使えます

    Node.js のダウンロードページを開く ↗

  2. パソコン版 Claude アプリの設定ファイルを開く

    SettingsDeveloperEdit Config

  3. この設定を貼り付けて保存

    {
      "mcpServers": {
        "xdebug": {
          "command": "npx",
          "args": [
            "-y",
            "xdebug-mcp"
          ]
        }
      }
    }
  4. Claude を終了してもう一度開く

  5. 試してみる

    Xdebug を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が Xdebug を使っていると言うか、回答に Xdebug のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT はまだ Xdebug につなげません

Xdebug はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません

代わりにできること

A · Xdebug につなげるアプリを使う

  • 先にパソコンへ Node.js を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)
  • 先にパソコンへ Node.js を入れてください(1 回だけ)

B · 開発者ツール の中で ChatGPT につなげる別のサーバー

同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました

Claude Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

  1. Node.js を入れる

    1 回だけ。Node.js が必要なすべてのサーバーで使えます

    Node.js のダウンロードページを開く ↗

  2. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  3. このコマンドを貼り付けて Enter

    claude mcp add xdebug -- npx -y xdebug-mcp
  4. Claude Code で /mcp と入力

    Xdebug が一覧にあり、接続済みと表示されれば OK です

  5. 試してみる

    Xdebug を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が Xdebug を使っていると言うか、回答に Xdebug のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

  1. Node.js を入れる

    1 回だけ。Node.js が必要なすべてのサーバーで使えます

    Node.js のダウンロードページを開く ↗

  2. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  3. Cursor の AI チャットを Agent モードで開く

  4. 試してみる

    Xdebug を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が Xdebug を使っていると言うか、回答に Xdebug のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげますが、先に準備が必要です

先にパソコンへ Node.js を入れてください(1 回だけ)

  1. Node.js を入れる

    1 回だけ。Node.js が必要なすべてのサーバーで使えます

    Node.js のダウンロードページを開く ↗

  2. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  3. VS Code の AI チャットを Agent モードで開く

  4. 試してみる

    Xdebug を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が Xdebug を使っていると言うか、回答に Xdebug のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

JSON 設定は下の「開発者向け」にあります

つまずいたら?Xdebug を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

パソコンにインストール

Claude Code

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

Claude Desktop (claude_desktop_config.json)

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

Cursor (~/.cursor/mcp.json)

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

VS Code (mcp.json)

{
  "servers": {
    "xdebug": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "xdebug-mcp"
      ]
    }
  }
}

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

週あたりのダウンロードi
282/週
ライセンスi
ライセンスの記載なし
接続方法
パソコンで動く
最新バージョンi
1.2.1
レジストリ公開日i
2026年3月23日
コードの最終更新i
2026年10月17日
作者
kpanuragh
パッケージ
npm: xdebug-mcp
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

パソコン上で動かせるアプリ

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

すべてのアプリと長所・短所 →

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月12日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント kpanuragh で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:26 日前

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

Google でログインして投稿

ユーザーレビュー

まだレビューはありません

Google でログインしてレビューを書く

開発者ツールのほかのサーバーとの比較i

  • このカテゴリのほかの5780件のうち94%よりスターが多い
  • このカテゴリのほかの5780件のうち7%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの5780件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Xdebugは安全ですか?

当てはまる基本チェック2項目のうち2項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は26 日前、最新バージョン(1.2.1)がレジストリに届いたのは8 か月前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:REA, Netdata, Front-End Checklist

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

REA

Reverse engineer anything from your terminal or agent with one CLI and MCP server.

作者:morluto広く使われている↓ 38.9万/週★ 45.1万17 日前更新

パソコンで動く

Netdata

Real-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.

作者:netdata広く使われている★ 8.1万7 日前更新

クラウドで動く

Front-End Checklist

Review frontend code and live pages against 386 quality-gated web development rules.

作者:thedaviddias広く使われている★ 7.5万38 日前更新

クラウドで動く

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

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.

Features

Core Debugging
  • Full Debug Control: Step into, step over, step out, continue, stop
  • Breakpoints: Line breakpoints, conditional breakpoints, exception breakpoints, function call breakpoints
  • Variable Inspection: View all variables, get specific variables, set variable values
  • Expression Evaluation: Evaluate PHP expressions in the current context
  • Stack Traces: View the full call stack
  • Multiple Sessions: Debug multiple PHP scripts simultaneously
  • Docker Support: Works with PHP running in Docker containers
Advanced Features
  • Watch Expressions: Persistent watches that auto-evaluate on each break with change detection
  • Logpoints: Log messages without stopping execution using {$var} placeholders
  • Memory Profiling: Track memory usage and execution time between breakpoints
  • Code Coverage: Track which lines were executed during debugging
  • Request Context: Capture $_GET, $_POST, $_SESSION, $_COOKIE, headers automatically
  • Step Filters: Skip vendor/library code during stepping
  • Debug Profiles: Save and restore breakpoint configurations
  • Session Export: Export debug sessions as JSON or HTML reports

Installation

From npm (Recommended)
npm install -g xdebug-mcp
From Source
git clone https://github.com/kpanuragh/xdebug-mcp.git

cd xdebug-mcp npm install npm run build

MCP Server Configuration

For Claude Code

Add the xdebug-mcp server to your MCP configuration (.mcp.json or Claude settings):

Using npm global install:

{

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

Using npx:

{

"mcpServers": { "xdebug": { "command": "npx", "args": ["-y", "xdebug-mcp"], "env": { "XDEBUG_PORT": "9003", "LOG_LEVEL": "info" } } } }

With Path Mappings (for Docker)

When debugging PHP in Docker containers, you need path mappings to translate container paths to host paths:

{

"mcpServers": { "xdebug": { "command": "xdebug-mcp", "env": { "XDEBUG_PORT": "9003", "PATH_MAPPINGS": "{\"/var/www/html\": \"/home/user/projects/myapp\"}", "LOG_LEVEL": "info" } } } }

With DBGp Proxy Registration

If you already use a DBGp proxy, keep mcp-config.example.json as the default direct-listener example and start from mcp-config.proxy.example.json for proxy registration.

Proxy mode requires:

  • TCP listener mode for xdebug-mcp (not XDEBUG_SOCKET_PATH)
  • a unique callback port such as 9006, 9007, or 9008 for XDEBUG_PORT
  • DBGP_PROXY_HOST, DBGP_PROXY_PORT, and DBGP_IDEKEY

See the DBGp Proxy Registration Guide for the full setup, multi-agent examples, and PHP/Xdebug proxy configuration.

PHP/Xdebug Configuration

php.ini (or xdebug.ini)
[xdebug]

zend_extension=xdebug

; Enable step debugging xdebug.mode=debug

; Start debugging on every request xdebug.start_with_request=yes

; Host where MCP server is running ; For Docker: use host.docker.internal ; For local PHP: use 127.0.0.1 xdebug.client_host=host.docker.internal

; Port where MCP server listens xdebug.client_port=9003

; IDE key (optional, for filtering) xdebug.idekey=mcp

Docker Compose
version: '3.8'

services: php: image: php:8.2-apache volumes:

  • ./src:/var/www/html
  • ./xdebug.ini:/usr/local/etc/php/conf.d/99-xdebug.ini extra_hosts:
  • "host.docker.internal:host-gateway" # Required for Linux environment:
  • XDEBUG_MODE=debug
  • XDEBUG_CONFIG=client_host=host.docker.internal client_port=9003
Using Unix Domain Sockets

For improved performance and simplified setup on local systems, you can use Unix domain sockets instead of TCP. Unix sockets eliminate network stack overhead and are ideal for debugging on the same machine.

Benefits:

  • ⚡ Lower latency (no TCP/IP stack overhead)
  • 🔒 Better security (file permissions instead of port binding)
  • 📦 Simpler setup (no port management)
  • 🚀 Faster communication for local debugging

MCP Configuration (Unix Socket):

{

"mcpServers": { "xdebug": { "command": "xdebug-mcp", "env": { "XDEBUG_SOCKET_PATH": "/tmp/xdebug.sock", "LOG_LEVEL": "info" } } } }

PHP/Xdebug Configuration:

[xdebug]

zend_extension=xdebug xdebug.mode=debug xdebug.start_with_request=yes xdebug.client_host=unix:///tmp/xdebug.sock

Socket File Permissions:

The socket file is created with default permissions. To restrict access, you can:

# After MCP server starts

chmod 600 /tmp/xdebug.sock

Or use a secure directory

mkdir -p ~/.xdebug && chmod 700 ~/.xdebug

Then set XDEBUG_SOCKET_PATH=$HOME/.xdebug/xdebug.sock

Automatic Cleanup:

When XDEBUG_SOCKET_PATH is set, the server will:

  • Listen on the specified Unix socket instead of TCP port
  • Automatically clean up stale socket files on startup (prevents "address in use" errors)
  • Automatically clean up socket files on shutdown
  • Use the same debugging tools and features as TCP mode

When to Use Unix Sockets:

  • ✅ Local PHP development (best performance)
  • ✅ Same-machine debugging
  • ✅ High-frequency breakpoint hits
  • ❌ Remote debugging (use TCP instead)

*Unix socket support requested in Issue #1 by @dkd-kaehm*

Available MCP Tools (41 Total)

Session Management
ToolDescription
list_sessionsList all active debug sessions
get_session_stateGet detailed state of a session
set_active_sessionSet which session is active
close_sessionClose a debug session
Breakpoints
ToolDescription
set_breakpointSet a line or conditional breakpoint (supports pending breakpoints)
set_exception_breakpointBreak on exceptions (supports pending breakpoints)
set_call_breakpointBreak on function calls (supports pending breakpoints)
remove_breakpointRemove a breakpoint (works with pending breakpoints)
update_breakpointEnable/disable or modify a breakpoint
list_breakpointsList all breakpoints including pending

Pending Breakpoints: You can set breakpoints before a debug session starts. These are stored as "pending breakpoints" and automatically applied when a PHP script connects with Xdebug. This is useful for setting up breakpoints before triggering a page load or script execution.

Execution Control
ToolDescription
continueContinue to next breakpoint
step_intoStep into function calls
step_overStep over (skip function internals)
step_outStep out of current function
stopStop debugging
detachDetach and let script continue
Inspection
ToolDescription
get_stack_traceGet the call stack
get_contextsGet available variable contexts
get_variablesGet all variables in scope
get_variableGet a specific variable
set_variableSet a variable's value
evaluateEvaluate a PHP expression
get_sourceGet source code
Watch Expressions
ToolDescription
add_watchAdd a persistent watch expression
remove_watchRemove a watch expression
evaluate_watchesEvaluate all watches and detect changes
list_watchesList all active watches
Logpoints
ToolDescription
add_logpointAdd a logpoint with message template
remove_logpointRemove a logpoint
get_logpoint_historyView log output and hit statistics
Profiling
ToolDescription
start_profilingStart memory/time profiling
stop_profilingStop profiling and get results
get_profile_statsGet current profiling statistics
get_memory_timelineView memory usage over time
Code Coverage
ToolDescription
start_coverageStart tracking code coverage
stop_coverageStop and get coverage report
get_coverage_reportView coverage statistics
Debug Profiles
ToolDescription
save_debug_profileSave current configuration as a profile
load_debug_profileLoad a saved debug profile
list_debug_profilesList all saved profiles
Additional Tools
ToolDescription
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

Usage Examples

Setting a Breakpoint
Use set_breakpoint with file="/var/www/html/index.php" and line=25
Conditional Breakpoint
Use set_breakpoint with file="/var/www/html/api.php", line=42, condition="$userId > 100"
Watch Expression
Use add_watch with expression="$user->email"

Use add_watch with expression="count($items)"

Logpoint
Use add_logpoint with file="/var/www/html/api.php", line=50, message="User {$userId} accessed {$endpoint}"
Inspecting Variables
Use get_variables to see all local variables

Use get_variable with name="$user" to inspect a specific variable Use evaluate with expression="count($items)" to evaluate an expression

Capture Request Context
Use capture_request_context to see $_GET, $_POST, $_SESSION, cookies, and headers

Environment Variables

VariableDefaultDescription
XDEBUG_PORT9003Port to listen for Xdebug connections (TCP mode)
XDEBUG_HOST0.0.0.0Host to bind (TCP mode)
XDEBUG_SOCKET_PATH-Unix domain socket path (e.g., /tmp/xdebug.sock). When set, uses Unix socket instead of TCP
COMMAND_TIMEOUT30000Command timeout in milliseconds
PATH_MAPPINGS-JSON object mapping container to host paths
MAX_DEPTH3Max depth for variable inspection
MAX_CHILDREN128Max children to return for arrays/objects
MAX_DATA2048Max data size per variable
LOG_LEVELinfoLog level: debug, info, warn, error

Connection Modes: TCP vs Unix Socket

FeatureTCPUnix Socket
SetupEasy (default)Simple (one env var)
PerformanceGoodExcellent (lower latency)
SecurityPort accessible to networkFile-based permissions
Remote Debugging✅ Supported❌ Local only
Docker✅ Works with host.docker.internal❌ Requires volume mount
Stale SocketManual port cleanupAuto-cleanup
DefaultXDEBUG_PORT=9003Disabled (use TCP)

Quick Decision Guide:

  • 🏠 Local development? → Use Unix socket for best performance
  • 🐳 Docker on same machine? → Use Unix socket with volume mount
  • 🌐 Remote server? → Use TCP
  • 🚀 Maximum speed? → Use Unix socket
  • 📝 Don't know? → Start with TCP (de

冒頭だけを表示しています。続きはリポジトリで読めます