# io.github.kpanuragh/xdebug (npm · xdebug-mcp)

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

- Trust score: 62/100 (medium)
- Change this week: +16
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `xdebug-mcp`: 62/100 (this document), [markdown](https://verifymcp.io/servers/kpanuragh-xdebug/xdebug-mcp.md), [page](https://verifymcp.io/servers/kpanuragh-xdebug/xdebug-mcp)

## Channel facts

- Registry: `npm`
- Package: `xdebug-mcp`
- Version: `1.2.1`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 78/100
  - No malware found by supply-chain analysis.
  - CVE check failed: a known medium-severity CVE affects fast-xml-parser 4.5.7, a direct dependency. A fixed version is available.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (97 of 101), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 124 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 75/100
  - AI-judged instruction clarity (good).
  - Tool/resource definitions use about 2119 tokens (~46/item across 46 items; 46 tools + 0 resources), lean.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 0/100
  - Stability not yet verified: not enough scan history yet (needs a 30-day window).
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

**Unverified: 1 category.** A category scored 0 because we could not verify it: a data source with nothing on this package, evidence we could not reach, or a check we could not run. We only credit what we can confirm.

## Install

### Claude

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

### Codex

```bash
codex mcp add kpanuragh-xdebug -- npx -y xdebug-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "kpanuragh-xdebug": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "xdebug-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add kpanuragh-xdebug --command npx --arg -y --arg xdebug-mcp
```

### Hermes

```yaml
mcp_servers:
  kpanuragh-xdebug:
    command: "npx"
    args: ["-y", "xdebug-mcp"]
```

### Other

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

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-02 (score 62, +41)

- [security regression] CVE-2026-41650 affects this package: medium
- [security regression] Provenance: unverified → fail
- [security regression] Known CVEs: unverified → fail
- [security improvement] Install scripts: unverified → pass
- [security improvement] Malware scan: unverified → pass
- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] Schema quality: unverified → good
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] License: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional] Licence: MIT

### 2026-08-01 (score 21, −7)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-31 (score 28, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-30 (score 46, +22)

- [functional improvement] Tool coverage: unverified → 100

### 2026-07-28 (score 24, −22)

- [functional regression] Tool coverage: 100 → unverified
- [functional] First check of Schema quality: unverified

### 2026-07-27 (score 46)

First indexed and scored.

## MCP tools (46)

### `list_sessions` (~19 tokens)

List all active PHP debug sessions with their current state

### `get_session_state` (~40 tokens)

Get detailed state of a specific debug session including current position and status

Input parameters:

- `session_id` (string): Session ID (uses active session if not specified)

### `set_active_session` (~37 tokens)

Set which debug session should be the active/default session for subsequent commands

Input parameters:

- `session_id` (string, required): Session ID to set as active

### `close_session` (~34 tokens)

Close and terminate a debug session

Input parameters:

- `session_id` (string): Session ID to close (uses active session if not specified)

### `set_breakpoint` (~177 tokens)

Set a breakpoint in PHP code. Supports line breakpoints and conditional breakpoints with hit counts. Can be set before a debug session starts - breakpoints will be applied when a session connects.

Input parameters:

- `condition` (string): Optional PHP condition expression (e.g., '$x > 10' or '$user !== null')
- `file` (string, required): Full file path (use container path for Docker, e.g., /var/www/html/index.php)
- `hit_condition` (string): Hit condition: >= (break when hits >= value), == (break on exact hit), % (break every N hits)
- `hit_value` (integer): Hit count value - break after this many hits
- `line` (integer, required): Line number for the breakpoint
- `session_id` (string): Session ID (uses active session if not specified)

### `set_exception_breakpoint` (~67 tokens)

Set a breakpoint that triggers when a specific exception is thrown. Can be set before a debug session starts.

Input parameters:

- `exception` (string): Exception class name to break on (use '*' for all exceptions, or specific like 'RuntimeException')
- `session_id` (string): Session ID

### `set_call_breakpoint` (~69 tokens)

Set a breakpoint that triggers when a specific function is called. Can be set before a debug session starts.

Input parameters:

- `function_name` (string, required): Function name to break on (e.g., 'myFunction' or 'MyClass::myMethod')
- `session_id` (string): Session ID

### `remove_breakpoint` (~59 tokens)

Remove a breakpoint by its ID. Works for both active session breakpoints and pending breakpoints.

Input parameters:

- `breakpoint_id` (string, required): The breakpoint ID to remove (session breakpoint ID or pending_* ID)
- `session_id` (string): Session ID

### `update_breakpoint` (~89 tokens)

Update a breakpoint (enable/disable or change hit conditions). Works for both active session and pending breakpoints.

Input parameters:

- `breakpoint_id` (string, required): The breakpoint ID to update
- `hit_condition` (string): New hit condition
- `hit_value` (integer): New hit count value
- `session_id` (string): Session ID
- `state` (string): Enable or disable the breakpoint

### `list_breakpoints` (~49 tokens)

List all breakpoints including both active session breakpoints and pending breakpoints

Input parameters:

- `include_pending` (boolean): Include pending breakpoints in the list
- `session_id` (string): Session ID

### `continue` (~29 tokens)

Continue script execution until the next breakpoint or end of script

Input parameters:

- `session_id` (string): Session ID

### `step_into` (~43 tokens)

Step into the next function call, or to the next line if not a function call. This follows execution into called functions.

Input parameters:

- `session_id` (string): Session ID

### `step_over` (~38 tokens)

Step over to the next line in the current scope. Function calls are executed but not stepped into.

Input parameters:

- `session_id` (string): Session ID

### `step_out` (~33 tokens)

Step out of the current function. Execution continues until the current function returns.

Input parameters:

- `session_id` (string): Session ID

### `stop` (~27 tokens)

Stop the debug session and terminate script execution immediately

Input parameters:

- `session_id` (string): Session ID

### `detach` (~32 tokens)

Detach from the debug session and let the script continue running without debugging

Input parameters:

- `session_id` (string): Session ID

### `get_stack_trace` (~34 tokens)

Get the current call stack showing all function calls leading to the current position

Input parameters:

- `session_id` (string): Session ID

### `get_contexts` (~54 tokens)

Get available variable contexts (Local, Superglobals, User-defined constants) at the current position

Input parameters:

- `session_id` (string): Session ID
- `stack_depth` (integer): Stack frame depth (0 = current frame)

### `get_variables` (~96 tokens)

List all variables in scope with metadata (names, types, child counts). Use get_variable() to inspect specific variable values. Returns lightweight metadata for browsing the variable tree.

Input parameters:

- `context_id` (integer): Context ID: 0=Local variables, 1=Superglobals, 2=User constants
- `session_id` (string): Session ID
- `stack_depth` (integer): Stack frame depth (0 = current frame)

### `get_variable` (~121 tokens)

Get a specific variable by name, including nested properties. Use PHP syntax for nested access (e.g., '$user->name', '$array[0]', '$obj->items[2]->value')

Input parameters:

- `context_id` (integer): Context ID
- `max_depth` (integer): Maximum depth for nested properties
- `name` (string, required): Variable name with $ prefix (e.g., '$user', '$data["key"]', '$obj->property')
- `session_id` (string): Session ID
- `stack_depth` (integer): Stack frame depth

### `set_variable` (~96 tokens)

Set the value of a variable in the current scope

Input parameters:

- `context_id` (integer): Context ID
- `name` (string, required): Variable name (e.g., $x, $user->name)
- `session_id` (string): Session ID
- `stack_depth` (integer): Stack frame depth
- `value` (string, required): New value as a PHP literal (e.g., 42, "hello", true, null)

### `evaluate` (~93 tokens)

Evaluate a PHP expression in the current context. Returns the result of the expression. Use for calculations, method calls, or inspecting computed values.

Input parameters:

- `expression` (string, required): PHP expression to evaluate (e.g., '$x + $y', 'count($array)', '$user->getName()', 'array_keys($data)')
- `session_id` (string): Session ID
- `stack_depth` (integer): Stack frame depth

### `get_source` (~66 tokens)

Get the source code of a file or a specific line range

Input parameters:

- `begin_line` (integer): Starting line number
- `end_line` (integer): Ending line number
- `file` (string, required): File path to get source from
- `session_id` (string): Session ID

### `add_watch` (~50 tokens)

Add a watch expression that will be evaluated on each break. Watch expressions persist across steps.

Input parameters:

- `expression` (string, required): PHP expression to watch (e.g., '$user->id', 'count($items)')

### `remove_watch` (~25 tokens)

Remove a watch expression

Input parameters:

- `watch_id` (string, required): Watch ID to remove

### `evaluate_watches` (~29 tokens)

Evaluate all watch expressions and return their current values

Input parameters:

- `session_id` (string): Session ID

### `list_watches` (~15 tokens)

List all active watch expressions

### `add_logpoint` (~82 tokens)

Add a logpoint that logs messages without stopping execution. Use {varName} placeholders for variables.

Input parameters:

- `condition` (string): Optional condition
- `file` (string, required): File path
- `line` (integer, required): Line number
- `message` (string, required): Message template with {var} placeholders (e.g., 'User {$userId} logged in')

### `remove_logpoint` (~26 tokens)

Remove a logpoint

Input parameters:

- `logpoint_id` (string, required): Logpoint ID

### `get_logpoint_history` (~48 tokens)

Get the log output history from logpoints

Input parameters:

- `limit` (integer): Maximum entries to return
- `logpoint_id` (string): Specific logpoint ID (all if not specified)

### `start_profiling` (~20 tokens)

Start profiling to track memory usage and execution time

### `stop_profiling` (~17 tokens)

Stop profiling and get the results

### `get_profile_stats` (~14 tokens)

Get current profiling statistics

### `get_memory_timeline` (~17 tokens)

Get memory usage timeline from profiling

### `capture_request_context` (~39 tokens)

Capture the current HTTP request context ($_GET, $_POST, $_SESSION, $_COOKIE, headers)

Input parameters:

- `session_id` (string): Session ID

### `add_step_filter` (~77 tokens)

Add a step filter to skip certain files/directories during stepping (e.g., vendor code)

Input parameters:

- `description` (string): Description of the filter
- `pattern` (string, required): Pattern to match (e.g., '/vendor/', '*.min.js', '/regex/')
- `type` (string, required): include = step into, exclude = skip

### `list_step_filters` (~15 tokens)

List all step filter rules

### `get_function_history` (~39 tokens)

Get the history of function calls made during debugging

Input parameters:

- `limit` (integer): Maximum entries
- `search` (string): Search query to filter

### `start_coverage` (~16 tokens)

Start tracking code coverage during debugging

### `stop_coverage` (~18 tokens)

Stop tracking code coverage and get the report

### `get_coverage_report` (~17 tokens)

Get the current code coverage report

### `save_debug_profile` (~45 tokens)

Save the current debug configuration (breakpoints, watches, filters) as a named profile

Input parameters:

- `description` (string): Profile description
- `name` (string, required): Profile name

### `load_debug_profile` (~26 tokens)

Load a saved debug profile

Input parameters:

- `name` (string, required): Profile name to load

### `list_debug_profiles` (~15 tokens)

List all saved debug profiles

### `export_session` (~36 tokens)

Export the current debug session as a report

Input parameters:

- `format` (string): Export format
- `session_id` (string): Session ID

### `capture_snapshot` (~31 tokens)

Capture a snapshot of the current debug state for the export report

Input parameters:

- `session_id` (string): Session ID

## Diagnostics

Captured diagnostic sections: Provenance, Vulnerabilities, Dependencies. The full working is on the page: https://verifymcp.io/servers/kpanuragh-xdebug/xdebug-mcp#diagnostics

## Score history

- 2026-08-03: 62
- 2026-08-02: 62
- 2026-08-01: 21
- 2026-07-31: 28
- 2026-07-30: 46
- 2026-07-28: 24
- 2026-07-27: 46

## Links

- npm package: https://www.npmjs.com/package/xdebug-mcp
- Socket report: https://socket.dev/npm/package/xdebug-mcp
- Repository: https://github.com/kpanuragh/xdebug-mcp
- Changelog RSS feed: https://verifymcp.io/servers/kpanuragh-xdebug/xdebug-mcp/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/kpanuragh-xdebug/xdebug-mcp/changelog.json
- HTML version of this page: https://verifymcp.io/servers/kpanuragh-xdebug/xdebug-mcp
