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

The shared runtime for MCP Toolsets. Both developmentseed/mcp-toolsets and downstream repos generated from it (e.g. ecmwf/dss-agentic-ai-services) 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

# base: runtime + cli (lean, for tool-serving images)
pip install "mcp-toolsets-runtime @ git+https://github.com/developmentseed/mcp-toolsets-runtime.git@v0.1.0"

# with the Chainlit web agent
pip install "mcp-toolsets-runtime[agent] @ git+https://github.com/developmentseed/mcp-toolsets-runtime.git@v0.1.0"

With uv, as a consumer:

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

[tool.uv.sources]
mcp-toolsets-runtime = { git = "https://github.com/developmentseed/mcp-toolsets-runtime.git", tag = "v0.1.0" }

Imports are unchanged from the old workspace packages: from mcp_runtime.server import build_server, etc. Bump the runtime by changing the tag and running uv lock.

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.3.tar.gz (193.2 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.3-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_toolsets_runtime-0.1.3.tar.gz
  • Upload date:
  • Size: 193.2 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.3.tar.gz
Algorithm Hash digest
SHA256 65305f8697e7884b228ed3b5a9ee3a6ba1d4a1a92837095197f8f6e2cf79f784
MD5 ee4bbfa798f7d9a3bdea79c0744e700a
BLAKE2b-256 42781379a890c2989beffd89e4732a224d939185526cdd84646b6cde780cb045

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_toolsets_runtime-0.1.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_toolsets_runtime-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 33b85d31ed3d66694de5c023e030cdd909380dcbc8ef439bd97bb9cee827e393
MD5 2ad4902273c0cedd8218232ba8004093
BLAKE2b-256 5329ec8e6c9c3516a95c8e156ccaf68cb05102badf74cdd2f7ef9e978bede72c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_toolsets_runtime-0.1.3-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