runspec-mcp
Connect Claude Code to the runspec runnables installed across your machines —
local venvs and remote SSH venvs — from one config file, with credentials
injected as environment variables and each runnable's declared autonomy carried
into Claude Code's permission layer.
runspec-mcp is a small local MCP gateway: Claude Code spawns it as a
single MCP server; it reads your hosts + credential metadata, discovers the
runnables in every configured venv (runspec local --format json, locally and
over SSH), and presents them all as MCP tools. Discovery is live — as hosts
connect/disconnect or their runnables change, the tool list updates automatically
(no restart, no manual refresh).
pip install "runspec-mcp[credentials]"
# write runspec_mcp.toml (or point at an existing runspec-console config dir)
claude --plugin-dir "$(runspec-mcp plugin-path)"
Any MCP client (Claude Desktop, Cursor, Cline, or Claude Code without the
plugin) works too — runspec-mcp serve is a standard MCP stdio server. Add a
mcpServers entry:
{ "mcpServers": { "runspec-mcp": {
"command": "runspec-mcp", "args": ["serve"],
"env": { "RUNSPEC_MCP_CONFIG": "/absolute/path/to/runspec_mcp.toml" } } } }
The Claude Code plugin adds one thing over a bare client: the PreToolUse hook that
auto-approves autonomous runnables. Either way, manual runnables are refused
by the gateway and password args never reach a tool schema. See
docs/mcp.md for per-client details and the config-seed
("fleet adapter") how-to.
Config (runspec_mcp.toml)
[local]
venv_globs = ["~/venvs/*"] # local multi-venv discovery
[gateway]
refresh_interval = 30 # background rediscovery cadence (s); 0 = off
[[host]]
name = "prod"
ssh = "deploy@prod.example.com" # omit ssh → this machine
runspec_paths = ["/opt/venvs/fleet/bin/runspec"]
jump = "bastion" # optional ProxyJump (system ssh)
[[credential]]
id = "Windows" # label → WINDOWS_* env vars
kind = "userpass" # userpass | password | token | ssh-key
username = "svc-bot"
# secret stored in the OS keychain: runspec-mcp cred set Windows
# scope_hosts / scope_runnables optional — else auto-matched by a runnable's arg `env`
A runnable that declares it reads WINDOWS_USERNAME / WINDOWS_PASSWORD (via an
arg env) auto-pulls the Windows credential — no scope config needed.
Secrets live in the OS keychain (keyring), keyed by credential id under the
runspec-console service, so they are shared with the desktop console. Point
the gateway at an existing console setup with --config-dir <dir>.
SSH keys
No SSH key ever goes in the MCP config — only path references. The gateway
manages its own ed25519 keypair and uses it as the default SSH identity, so you
never touch ~/.ssh; authorise it on your hosts once:
runspec-mcp key # print the managed public key
runspec-mcp copy-key --all # install it on every configured host (one password prompt)
A per-host identity_file path still overrides it, and ssh-agent / ~/.ssh/id_*
remain a fallback.
Commands
| command | what it does |
|---|---|
runspec-mcp serve |
the MCP gateway (what the plugin runs) |
runspec-mcp hosts |
list configured hosts + probe connectivity |
runspec-mcp discover [--host H] |
print discovered tools |
runspec-mcp key [--regenerate] |
show / rotate the managed SSH key |
runspec-mcp copy-key [--all] [HOST…] |
install the managed key on host(s) |
runspec-mcp cred set|list|rm ID |
manage credential secrets in the keychain |
runspec-mcp seed-status |
show bundled config-seed contributors |
runspec-mcp plugin-path |
print the bundled Claude Code plugin dir |
runspec-mcp check |
validate config + connectivity + manifest |
Autonomy
Each runnable's autonomy maps onto a Claude Code permission decision via a
PreToolUse hook the plugin ships (autonomous → allow, confirm/supervised → ask, manual → deny, unknown → ask). The gateway rewrites the hook's manifest on
every discovery change, so it is always fresh. The remote side stays authoritative
(venv denylist, enforce_run_as, password args omitted from schemas).
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 runspec_mcp-0.1.0.tar.gz.
File metadata
- Download URL: runspec_mcp-0.1.0.tar.gz
- Upload date:
- Size: 59.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0195b17742140d3f0821518873d0da745783e6692d561c9dbd6c35e5d556dda2
|
|
| MD5 |
65eb0ca7bd496746cbb7f9a40afe30d1
|
|
| BLAKE2b-256 |
dadd75b6b55d08d9c3d4e3e34b394deaa55b240aaa431b72c3117d962285a9a7
|
Provenance
The following attestation bundles were made for runspec_mcp-0.1.0.tar.gz:
Publisher:
mcp-release.yml on JasonFinestone/runspec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runspec_mcp-0.1.0.tar.gz -
Subject digest:
0195b17742140d3f0821518873d0da745783e6692d561c9dbd6c35e5d556dda2 - Sigstore transparency entry: 2602473599
- Sigstore integration time:
-
Permalink:
JasonFinestone/runspec@0f14999c896504f9353d48370a84e3f66d8bcf90 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JasonFinestone
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mcp-release.yml@0f14999c896504f9353d48370a84e3f66d8bcf90 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file runspec_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: runspec_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 62.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5b09cf1bfa3cc3eacc1241bdfe2c100c99d2a05f7f4186d3267fcc17995895f
|
|
| MD5 |
4a17128ca5431468b89dd8b4ae49e886
|
|
| BLAKE2b-256 |
01b6c74ef135aa7d415806298fda67abd15dd574254dae2323f22b85c1385410
|
Provenance
The following attestation bundles were made for runspec_mcp-0.1.0-py3-none-any.whl:
Publisher:
mcp-release.yml on JasonFinestone/runspec
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runspec_mcp-0.1.0-py3-none-any.whl -
Subject digest:
f5b09cf1bfa3cc3eacc1241bdfe2c100c99d2a05f7f4186d3267fcc17995895f - Sigstore transparency entry: 2602475022
- Sigstore integration time:
-
Permalink:
JasonFinestone/runspec@0f14999c896504f9353d48370a84e3f66d8bcf90 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JasonFinestone
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mcp-release.yml@0f14999c896504f9353d48370a84e3f66d8bcf90 -
Trigger Event:
workflow_dispatch
-
Statement type: