KX

kpanuragh/xdebug-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

28 stars 8 forks 품질 80 트렌드 25MIT

PHP Xdebug 디버깅을위한 MCP 서버 - 유닉스 소켓 및 TCP 지원이있는 모델 Context 프로토콜을 통해 AI 보조 PHP 디버깅을 가능하게합니다

개요

Xdebug의 DBGp 프로토콜을 통해 PHP 디버깅 기능을 제공하는 MCP(모델 Context Protocol) 서버. 이것은 Claude와 같은 AI 조수가 직접 PHP 애플리케이션을 디버그 할 수 있습니다. - : Step into, step over, step out, 계속, stop - : line breakpoints, conditional breakpoints, 예외 breakpoints, function call breakpoints - : 모든 변수를 보기, 특정 변수를 얻을, 설정 변수 값 - : 현재 상황에 PHP 표현 - : 전체 통화 스택보기 - : Docker containers에서 실행되는 PHP와 디버그 여러 PHP 스크립트 - : - : Persistent watch that auto-evaluate on each break with change detection - : {$var} placeholder를 사용하여 실행 중지없이 로그 메시지 - : Breakpoint 사이에 메모리 사용 및 실행 시간을 추적 - : Debugging 동안 행한 트랙 - : Capture $ GET, $ POST, $ SESSION, $ COOKIE, 헤더가 자동으로 - : 스텝핑 중에 공급 업체 /library 코드를 건너 - : 저장 및 복원 ...

개요(AI 번역)

Xdebug의 DBGp 프로토콜을 통해 PHP 디버깅 기능을 제공하는 MCP(모델 Context Protocol) 서버. 이것은 Claude와 같은 AI 조수가 직접 PHP 애플리케이션을 디버그 할 수 있습니다.

특징

핵심 Debugging

  • Full Debug Control: 단계, 단계, 단계, 계속, 중지
  • Breakpoints: 라인 브레인스, 조건 브레인스, 예외 브레인스, 함수 콜 브레인스 -Variable Inspection: 모든 변수 보기, 특정 변수를 얻을, 변수 값을 설정
  • 추가 평가: 현재 상황에 PHP 표현
  • Stack Traces: 전체 통화 스택 보기
  • Multiple Sessions: 여러 PHP 스크립트를 동시에 디버그
  • Docker 지원: Docker 컨테이너에서 PHP 실행

고급 기능

-Watch Expressions: Persistent는 변화 탐지를 가진 각 틈에 자동 증발하는 시계 -Logpoints: {$var} 위주를 사용하지 않고 로그 메시지 -Memory Profiling: Breakpoints 사이 메모리 사용 및 실행 시간 추적

  • Code Coverage: 줄이 디버깅 중에 실행된 트랙

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

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

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

GitHub에서 전체 README 보기

설치

npx -y xdebug-mcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

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