Durable Model Context Protocol (MCP) helpers for building resumable MCP servers on top of Reboot durable workflows.
Project description
Reboot Durable MCP
A framework for building durable MCP servers.
-
Takes advantage of the protocols ability to resume after disconnection, e.g., due to the server getting rebooted.
-
Any existing requests will be retried safely using Reboot workflows.
-
Using Reboot you can run multiple replicas of your server, and session messages will always be routed to the same replica.
Requirements
- Linux and macOS
- Python >= 3.12
- Docker
Install
Using uv:
uv add durable-mcp
Using pip:
pip install durable-mcp
Run your application
Activate the venv (set up either via uv or python -m venv venv):
source .venv/bin/activate
Make sure you have Docker running:
docker ps
And run your app:
rbt dev run --python --application=path/to/your/main.py
If you want the application to be restarted when you modify your files
you can add one or more --watch=path/to/**/*.py to the above command
line.
To simplify you can move all command line args to a .rbtrc.
# This file will aggregate all of the command line args
# into a single command line that will be run when you
# use `rbt`.
#
# For example, to add args for running `rbt dev run`
# you can add lines that start with `dev run`. You can add
# one or more args to each line.
dev run --python
dev run --application=path/to/your/main.py
dev run --watch=path/to/**/*.py --watch=different/path/to/**/*.py
Supported client --> server requests:
-
initialize -
tools/call -
tools/list -
prompts/get -
prompts/list -
resources/list -
resources/read -
resources/templates/list -
resources/subscribe -
resources/unsubscribe -
completion/complete -
logging/setLevel
Supported client --> server notifications:
-
notifications/initialized -
notifications/progress(for server initiated requests, e.g., elicitation) -
notifications/roots/list_changed
Supported client <-- server requests:
-
elicitation/create -
roots/list -
sampling/createMessage
Supported client <-- server notifications:
-
notifications/progress -
notifications/message -
notifications/prompts/list_changed -
notifications/resources/list_changed -
notifications/tools/list_changed -
notifications/resources/updated
Supported client <--> server notifications:
-
notifications/cancelled
TODO:
-
EventStoresupport for resumability - Auth
- Docs
-
yapf - Push to
durable-mcpin pypi.org - Pydantic
statefor each session
Contributing
First grab all dependencies:
uv sync
Activate the venv:
source .venv/bin/activate
Generate code:
rbt generate
Make sure you have Docker running:
docker ps
Make your changes and run the tests:
pytest tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file durable_mcp-0.2.0.tar.gz.
File metadata
- Download URL: durable_mcp-0.2.0.tar.gz
- Upload date:
- Size: 86.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fd8c8284a5fc7374f43a4c77567c449d83cd4aeac15c935fba5ee2ce6fa2871
|
|
| MD5 |
baee0cb4b1b8ac320ce9c8221518b254
|
|
| BLAKE2b-256 |
7d0ce8f15955173f26cd9abe04cc10f21c95ca621d903cf5d14109278d59371f
|
File details
Details for the file durable_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: durable_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d0f6b54feb2aec39ec28bcd726d85421ad8962137f57ff7801ab656f2c1068a
|
|
| MD5 |
eea574ec8653e43e61e6fe6df5f15a21
|
|
| BLAKE2b-256 |
08e4a231a719065b8018765eb1694ac2ed25fd8c011c336861d1b209629b2919
|