Skip to main content

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).

Install the Claude Code plugin (the gateway plus the autonomy hook) from a Claude Code session. With uv, nothing else to install:

/plugin marketplace add https://runspec.app/marketplace.json
/plugin install runspec-mcp@runspec

Without uv (or from a private index), pip install "runspec-mcp[credentials]" first, then:

/plugin marketplace add https://runspec.app/marketplace-pip.json
/plugin install runspec-mcp@runspec-pip

Either way, the plugin asks for your runspec-console config folder (or a runspec_mcp.toml) when you install it. See runspec.app/mcp.

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 source dir
runspec-mcp claude-plugin render the plugin for this install, print its path
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).

Metadata

Release files for runspec-mcp 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runspec-mcp 0.2.5
File Size Uploaded Provenance Actions
runspec_mcp-0.2.5.tar.gz 75.0 kB With provenance Details for runspec_mcp-0.2.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for runspec-mcp 0.2.5
File Interpreter ABI Platform Actions
runspec_mcp-0.2.5-py3-none-any.whl Python 3 none any Details for runspec_mcp-0.2.5-py3-none-any.whl

Total release size: 145.4 kB

Release files / runspec_mcp-0.2.5.tar.gz

Download URL runspec_mcp-0.2.5.tar.gz
Size 75.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4caeeb5c6cbb45e24574e6fe6b59bb2c5af40a0944543de0fe410c5734a3a599
BLAKE2b-256 checksum
How to use checksums
0cb2c6ae42efa21752df62a9baf856fd7a4fdb1c160fe2e59b8fb3a1e3bf1207
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Release files / runspec_mcp-0.2.5-py3-none-any.whl

Download URL runspec_mcp-0.2.5-py3-none-any.whl
Size 70.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f45446645f312ed8621dd13728c4ae1a9fbbea716c351be788591d1d4bd8851
BLAKE2b-256 checksum
How to use checksums
db07e441ae94b6ff796b62d8a7b8a316b95e8f19da178aa1b957a499163718a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

Security for runspec-mcp 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for runspec_mcp-0.2.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page