A Model Context Protocol (MCP) Server that exposes Wasm Components as Tools.
This is currently an early-stage non-production prototype.
(auth and observability are on the roadmap)
Prerequisite: a current rust toolchain
Clone the toolbelt project if you have not already.
Then from within the toolbelt directory:
cargo install --path .
That will build the binary with the release profile and add
it to your cargo bin directory which should be on your PATH.
Provide the path to one or more .wasm files as command line arguments:
toolbelt hello.wasm calculator.wasmOr you can specify OCI URIs for published Wasm Components, such as these:
toolbelt oci://ghcr.io/modulewise/demo/hello:0.2.0 \
oci://ghcr.io/modulewise/demo/calculator:0.2.0Tip
If you'd like to build the Wasm Components locally, clone the modulewise/demos project and follow the build instructions in components/README.md
By default, components operate in a least-privilege capability mode.
If your component requires capabilities from the host runtime, you can
specify those capabilities in a .toml file:
[capability.http]
type = "wasi:http"And then define the tool component that imports one or more capabilities:
[component.flights]
uri = "file:///path/to/flight-search.wasm"
imports = ["http"]Pass the definition file to the server instead of direct .wasm files:
toolbelt flights.tomlWasm Components can also import other components which may have their own dependencies:
components.toml
[component.incrementor]
uri = "../demos/components/lib/incrementor.wasm"
imports = ["keyvalue"]
[component.incrementor.config]
bucket = "increments"
[component.keyvalue]
uri = "../demos/components/lib/valkey-client.wasm"
imports = ["wasip2"]And responsibilities can be separated across multiple files:
capabilities.toml
[capability.wasip2]
type = "wasi:p2"Now these files can be passed to the server:
toolbelt components.toml capabilities.tomlThis allows for various combinations of host capabilities and guest components. It also promotes responsibility-driven separation of concerns between supporting infrastructure and domain-centric tools.
-
Run the server as described above.
-
Start the MCP Inspector.
-
Ensure the
Streamable HTTPTransport Type is selected. -
Ensure the specified URL is
http://127.0.0.1:3001/mcp(replace host or port if not using defaults). -
Click
Connectand thenList Tools. -
Select a Tool, provide parameter values, and click
Run Tool.
Copyright (c) 2026 Modulewise Inc and the Modulewise Toolbelt contributors.
Apache License v2.0: see LICENSE for details.