Skip to main content

Shared runtime for MCP Toolsets: discover LangChain tools, serve them as MCP, plus a CLI and an example chat agent.

Project description

mcp-toolsets-runtime

PyPI npm

The shared runtime for MCP Toolsets. Both developmentseed/mcp-toolsets and downstream repos generated from it install this package instead of each carrying their own copy of the runtime.

What's in here

One Python distribution (mcp-toolsets-runtime) exposing three top-level modules, plus the view-side JS bridge:

Module What it is
mcp_runtime Discovers a toolset's LangChain tools (TOOLS) and serves them as an MCP server; serves UI views (VIEWS) as ui:// resources; derives server instructions from CREDENTIAL_HEADERS. Entry points: mcp-serve, mcp-index.
mcp_cli Typer CLI to list and call tools on a running MCP service. Entry point: mcp-cli.
mcp_toolset Scaffolds a new toolset in a consumer repo (mcp-toolset new [--with-ui] <name>), wired to this package + the npm view bridge.
mcp_agent Example Chainlit chat agent that discovers MCP servers behind an index URL and drives their tools. Ships the Chainlit host element elements/McpView.jsx. Entry points: mcp-agent, mcp-agent-web. Requires the [agent] extra.
@developmentseed/mcp-view (js/mcp-view) The view-side ui/* postMessage bridge a toolset UI imports (onData / sendMessage). Published to npm separately.

The toolset plugin contract

mcp_runtime discovers a toolset purely by convention — a <toolset>.tools module exporting:

  • TOOLS — a non-empty list of LangChain tools that return a ToolResult.
  • VIEWS (optional){tool_name: view_id}, with a built bundle at <package>/views/<view_id>.html.
  • CREDENTIAL_HEADERS (optional) — header names the tools read off the transport; used to derive the model-facing auth hint.

Treat these, ToolResult, and the ui/* wire protocol as public API.

Install

From PyPI — see the badge above for the current release:

# base: runtime + cli (lean, for tool-serving images)
pip install mcp-toolsets-runtime

# with the Chainlit web agent
pip install "mcp-toolsets-runtime[agent]"

With uv, as a consumer — an ordinary dependency, no source override:

dependencies = ["mcp-toolsets-runtime[agent]"]

Imports are unchanged from the old workspace packages: from mcp_runtime.server import build_server, etc. uv.lock pins whatever resolved, so upgrading is uv lock --upgrade-package mcp-toolsets-runtime. The package is pre-1.0, where a minor release may break — bound it at the next minor in your own pyproject.toml if you'd rather take those deliberately.

Consuming this package — the plugin contract, serving toolsets, wiring up UI views (including mcp-agent install-elements and the npm bridge), and migrating off the in-repo workspace: see docs/CONSUMING.md.

Develop

uv sync --all-extras   # install with [agent] + dev tools
./scripts/lint         # ruff check + ruff format --check + mypy (config in pyproject)
./scripts/test         # pytest
./scripts/build-js     # typecheck + build + vitest for js/mcp-view (needs node)

Releases

Versioning and CHANGELOG.md are managed by release-please from Conventional Commits. See CONTRIBUTING.md — in short, your PR title is the changelog entry, and CI fails a PR whose title isn't a valid conventional commit. The Python package and the JS bridge share one version (linked).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_toolsets_runtime-0.1.5.tar.gz (197.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_toolsets_runtime-0.1.5-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_toolsets_runtime-0.1.5.tar.gz.

File metadata

  • Download URL: mcp_toolsets_runtime-0.1.5.tar.gz
  • Upload date:
  • Size: 197.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mcp_toolsets_runtime-0.1.5.tar.gz
Algorithm Hash digest
SHA256 b8b368294ddc32a2547556a799e3464718a4b9b2e5ae1ba2d6e1390f01d65482
MD5 5d40aba7fa77e49c855b3715f360dc99
BLAKE2b-256 de67cdb3836b04a2d9e829545af4490a12f15d88f6da446a9f248de4f0847ada

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_toolsets_runtime-0.1.5.tar.gz:

Publisher: publish.yaml on developmentseed/mcp-toolsets-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_toolsets_runtime-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_toolsets_runtime-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 942a765cc767cfacc92a8c902ac2473ddd3df87953e7a8941ae9d0279a939f23
MD5 308a1756ca2e01a4aaa6c3359ec26099
BLAKE2b-256 f5626f59b6dfce208beab35935988b509b00d97b7b7bd8b9301e4aee45d561d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_toolsets_runtime-0.1.5-py3-none-any.whl:

Publisher: publish.yaml on developmentseed/mcp-toolsets-runtime

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page