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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_toolsets_runtime-0.1.4.tar.gz
  • Upload date:
  • Size: 193.9 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.4.tar.gz
Algorithm Hash digest
SHA256 98d56dc781a82ac280f27ba3bdb9567c1b5d9272ad4c6f46b2bfd9b5825661d3
MD5 79390675f6917dd65094bc56a422adbe
BLAKE2b-256 d4424bfb90602be783c1a5a1e91e3771f6d80a8ce94415562fce1ac38e7045f0

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for mcp_toolsets_runtime-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4c2274d3ac80c5fefc3f2e883f739b7120da34ad48ecc6f282d903c947b535dd
MD5 bf40f994960d6b0a9ec84a5c7debd1f1
BLAKE2b-256 5d97796ebaa02b2fd0cd6d00558879f4a1b7741be31ae1df6658509bc8066647

See more details on using hashes here.

Provenance

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