PHPackages                             stevecoug/mcp-devkit - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. stevecoug/mcp-devkit

ActiveLibrary[CLI &amp; Console](/categories/cli)

stevecoug/mcp-devkit
====================

Developer tooling for PHP MCP servers built on mcp/sdk — hot-reload tools without restarting the client, and call or inspect them straight from the shell.

v0.1.2(yesterday)05↑2900%MITPHPPHP ^8.2CI passing

Since Aug 14Pushed yesterdayCompare

[ Source](https://github.com/stevecoug/mcp-devkit)[ Packagist](https://packagist.org/packages/stevecoug/mcp-devkit)[ Docs](https://github.com/stevecoug/mcp-devkit)[ RSS](/packages/stevecoug-mcp-devkit/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (4)Used By (0)

mcp-devkit
==========

[](#mcp-devkit)

**Developer tooling for PHP MCP servers built on [`mcp/sdk`](https://packagist.org/packages/mcp/sdk) — hot-reload your tools without restarting the client, and call or inspect them straight from the shell.**

[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)[![PHP 8.2+](https://camo.githubusercontent.com/da7cf113b588d26fe679dfefe4a15009272ed358ad4e786ad3c78b45faa61d69/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322532422d3737376262342e737667)](https://camo.githubusercontent.com/da7cf113b588d26fe679dfefe4a15009272ed358ad4e786ad3c78b45faa61d69/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e322532422d3737376262342e737667)

---

Why
---

[](#why)

Writing an MCP server in PHP with `mcp/sdk` is pleasant — attribute-discovered tool classes, a clean stdio transport. But two things slow the inner dev loop to a crawl:

1. **Every edit means a client restart.** Change a tool, and the MCP client (Claude Code, Cursor, …) keeps serving the *old* tool list until you fully restart it. On a busy session that's death by a thousand relaunches.
2. **There's no quick way to poke a tool.** To check that `list_issues` returns what you expect, you either drive it through a full client or hand-craft JSON-RPC frames on a pipe.

`mcp-devkit` fixes both, as a thin layer **on top of** `mcp/sdk` — it uses only the SDK's public API, so there's no fork to maintain and nothing to patch.

What you get
------------

[](#what-you-get)

- **`reload` tool** — re-execs the running server *in place* (same process, same stdio pipe). Edited tool code is re-discovered and the client is told to refresh its tool list. No client restart.
- **CLI test mode** — call your tools like ordinary subcommands: `php server.php add 2 3`. Arguments, types, defaults and help text are inferred from your tool classes, so every tool gets a usage line for free.

Requirements
------------

[](#requirements)

- PHP **8.2+**
- `mcp/sdk` **^0.7**
- `ext-pcntl` — required for the `reload` tool only. Serving and the CLI mode work without it.

Install
-------

[](#install)

```
composer require stevecoug/mcp-devkit
```

If your project pins `mcp/sdk` to `dev-main`, that will fail to resolve — this package requires a tagged `^0.7`. Move the SDK off `dev-main` in the same command:

```
composer require stevecoug/mcp-devkit mcp/sdk:^0.7 -W
```

Quick start
-----------

[](#quick-start)

Wire the devkit into your server's entry script. It owns the registry and session, auto-registers the `reload` tool, advertises the `toolsListChanged` capability, and dispatches CLI flags — so your `server.php` stays this short:

```
#!/usr/bin/env php
