Download the PHP package koriym/xdebug-mcp without Composer

On this page you can find all versions of the php package koriym/xdebug-mcp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package xdebug-mcp

Xdebug MCP

Debug PHP with Runtime Data — No var_dump(), No Guesswork

Trace-based debugging for PHP, built on Xdebug. Drive the tools from the CLI, or let an AI assistant run the core tools through plugin, Skill, or MCP integration.

AI Native Runtime Data ![var_dump](https://img.shields.io/badge/var__dump()-NO-red)


Natural Language Debugging

Just tell your AI assistant what you want:

English:

日本語:

When connected through the plugin, Skill, or an MCP-capable client, the AI can select the appropriate tool, execute it, and analyze the results.

Requirements

💡 Performance Tip: Keep Xdebug disabled in php.ini for daily use. This tool loads Xdebug on-demand only when needed.

Quick Start

1. Install

2. Verify Xdebug

3. (Optional) Wire up an AI assistant

Two integrations are available. We recommend the Skill: these tools are stateless one-shot CLI commands by design, so letting the agent run them directly — guided by the Skill's usage notes — is the simplest and most accurate path. Choose MCP when your client has no shell access or no Skill support.

Skill (recommended) MCP server
How it works The agent reads SKILL.md and runs the CLI tools directly The client calls the tools over JSON-RPC (stdio)
Setup Plugin install, or copy one directory Register in the client's MCP config
Best for AI coding agents with shell access (Claude Code, Codex, ...) MCP-capable clients without shell/Skill support (e.g. Claude Desktop)

Claude Code — install the plugin (which bundles the Skill):

Codex CLI — install the Skill:

Any MCP-capable client — see MCP Configuration below.

You can skip this step entirely and use the CLI tools directly.

4. Try it

Or use the skill directly:

Try CLI Tools

Run the demo examples to see each tool in action:

Each command outputs structured JSON data that AI can analyze to provide debugging insights.

How It Works

No var_dump(). No code modification. No guesswork.

Available Tools

Tool Purpose Example Prompt
xstep Breakpoint debugging, variable inspection "Stop at line 42 and show me the variables"
xtrace Execution flow analysis "Trace how the request flows through the app"
xprofile Performance profiling "Find what's making this endpoint slow"
xcoverage Code coverage analysis "Which lines aren't covered by tests?"
xback Call stack at breakpoint "Show me how we got to this error"
xcompare Compare variable states across two runs "Compare input 10 vs 0" or "Compare with main branch"

All tools in this table are available both as CLI commands and as MCP tools. xrepl (the interactive debugger below) is CLI-only.

CLI Usage

For direct command-line usage without AI:

Run --help on any tool for detailed options.

Note on xcompare commands: the --run-a, --run-b, and --run values are executed through the shell so that quoting, redirection, and environment variables behave as users expect. Only pass trusted input to these options.

Note on --steps: xcompare defaults to --steps=1, since the comparison only needs the variable snapshot at the breakpoint. Pass --steps=N explicitly (e.g. --steps=100) if you want to see how execution diverges between the two runs after the break.

Schema-Backed JSON Output

Every tool emits JSON with a $schema URL, so the output is machine-verifiable and self-describing — no log-string parsing needed:

Schemas live under docs/schemas/. AI assistants — and humans — can verify exactly what each tool captured.

MCP Configuration

For AI coding agents with shell access, the Skill is the recommended integration. Register the MCP server instead when your client supports MCP but cannot run shell commands or Skills (e.g. Claude Desktop), or when you want a schema-validated tool interface shared across MCP clients.

Add xdebug-mcp to the client's MCP config (e.g. .mcp.json). MCP exposes all one-shot tools: xtrace, xprofile, xstep, xcoverage, xback, and xcompare:

Find the path with which xdebug-mcp. Restart your client after editing the config.

The server speaks the stateless 2026-07-28 protocol revision (handshake-less, discoverable via server/discover) and keeps the legacy initialize handshake for clients on 2025-11-25 and earlier — both over stdio.

Interactive REPL

For hands-on debugging without AI, use the interactive debugger (xrepl):

Commands:

Command Description
s Step into function
o Step over line
out Step out of function
c Continue execution
p <var> Print variable (e.g., p $user)
bt Show backtrace
l List source code
q Quit debugger

Docker Support

All tools work with Docker, Podman, and Kubectl:

The tools automatically detect container runtime and configure Xdebug networking.

See tests/docker/README.md for details.

Debugging Legacy PHP (7.x / 5.x)

While xdebug-mcp itself requires PHP 8.2+, it can debug older PHP versions as long as a compatible Xdebug 3.x release is installed on the target PHP. Simply specify the target PHP binary after --:

The tool runs on your modern PHP while the target script executes on the specified PHP binary — provided the specified PHP has a compatible Xdebug 3.x installed. No Docker required. Check the compatibility table below before trying older PHP binaries.

Xdebug 3.x Compatibility

Xdebug Supported PHP
3.0-3.1 PHP 5.4 - 8.0
3.2 PHP 5.6 - 8.3
3.3 PHP 7.0 - 8.4
3.4 PHP 7.4 - 8.5

See Xdebug compatibility for details.

For Developers

See tests/ai/README.md for tool discoverability testing.

AI Native Design

This tool is designed specifically for AI consumption, not adapted from human interfaces.

Debugger for Humans AI Native (this tool)
Step-by-step interaction One-shot batch execution
Session management required Stateless CLI
Multiple tool calls Single command, complete data
Manual log placement Automatic full trace

Why it matters:

See Also

Looking for a different approach? kpanuragh/xdebug-mcp offers 41 MCP tools with session-based interactive debugging — ideal if you prefer step-by-step control.

Why "xdebug-mcp"?

This project started as an MCP (Model Context Protocol) server for AI-powered PHP debugging. MCP is still supported for any MCP-capable client, but the CLI is now the primary interface. The MCP tools (xstep, xtrace, xprofile, xcoverage, xback, xcompare) also work as standalone CLI commands; xrepl is CLI-only.

Resources


Stop debugging blind. Just ask your AI.


All versions of xdebug-mcp with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-sockets Version *
ext-xml Version *
symfony/polyfill-php83 Version ^1.33
amphp/socket Version ^2.3
psr/log Version ^3.0
amphp/http-server Version ^3.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package koriym/xdebug-mcp contains the following files

Loading the files please wait ...