Metadata-Version: 2.5
Name: mcp-dispatch
Version: 0.1.1
Summary: A few MCP tools with paths behind them: plugins publish actions and skills, help comes from signatures and docstrings, and a check keeps what an assistant reads in order.
Project-URL: Homepage, https://github.com/retospect/mcp-dispatch
Project-URL: Repository, https://github.com/retospect/mcp-dispatch
Project-URL: Issues, https://github.com/retospect/mcp-dispatch/issues
Author-email: Reto Stamm <reto@retostamm.com>
License-Expression: MIT
License-File: LICENSE
Keywords: mcp,mcp-server,model-context-protocol,plugins,skills,tools
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.12
Requires-Dist: pydantic>=2.7
Provides-Extra: mcp
Requires-Dist: mcp<2,>=1.30; extra == 'mcp'
Description-Content-Type: text/markdown

# mcp-dispatch

A small framework for MCP servers whose tools are used by language models.

An MCP server usually shows an assistant one tool per thing it can do. Every tool's name, description and schema is read in every conversation, so a server that can do much costs much before the first call, and a permission has to be given tool by tool.

mcp-dispatch shows five tools and keeps everything else behind them:

| Tool | What it is for |
|---|---|
| `get` | reads |
| `search` | finds things, and the how-to guides |
| `create` | adds or changes |
| `destroy` | removes for good |
| `share` | gives someone access |

A call names a path and its arguments: `create {"path": "shelf/add", "title": "Dune"}`. The paths come from plugins: Python classes whose tagged methods are the actions. What the assistant needs to know about an action is made from its signature and docstring and is fetched when it is needed (`"shelf/add?"`), as are the how-to guides a plugin ships (`search {"q": "lend a book", "t": "skill"}`).

What you get:

- **A small first read.** Five tool descriptions and a short first message, however many actions are installed.
- **One switch per risk.** A client that lets an assistant read without asking, and asks before it deletes or shares, needs four settings.
- **Plugins.** A package adds its actions by listing one class under an entry point. The host finds it when it starts.
- **A command line that falls out of it.** `mcp-dispatch call create shelf/add title=Dune` makes the same call without a client, and `mcp-dispatch help shelf/add` prints what an assistant would read about it.
- **Interface text that is checked.** `mcp-dispatch check` fails when an action is not documented in full, when an example call is not one the action accepts, or when a how-to guide names a call that no longer exists.
- **Interface text that can be tried.** `mcp_dispatch.trials` runs an assistant that has never seen your server against it, with your tools and nothing else, and keeps what it called. A text an assistant acts on is judged by what assistants do with it, beside the text it replaces.

## Who writes against it

Assistants do. The guide is written for them and ships in the package:

```
uv run mcp-dispatch guide          # how to write a plugin
uv run mcp-dispatch guide host     # how to set up a host
```

If you work with an assistant, put this line into your project's `AGENTS.md`:

```
This project builds on mcp-dispatch. Before you write or change a plugin, read `uv run mcp-dispatch guide`; before you finish, `uv run mcp-dispatch check` must print ok.
```

## A host in a few lines

```python
from mcp_dispatch import SKILL_SEARCH, Dispatch

dispatch = Dispatch()                  # the standard tools and the search
dispatch.find_plugins()                # every plugin that is installed
dispatch.add_initial_message("You keep the lab's bookshelf for its people.")
dispatch.add_initial_message(SKILL_SEARCH)
dispatch.server("bookshelf").run()
```

Install with `pip install "mcp-dispatch[mcp]"` for a host, `pip install mcp-dispatch` for a plugin.

## State

Pre-alpha. It was built inside [Reticula](https://github.com/retospect/reticula-mcp) and lifted out. The texts an assistant reads have been tried only as far as `trials/README.md` records.

## Licence

MIT, see `LICENSE`. A plugin or a host that builds on mcp-dispatch may carry any licence.
