A CLI tool for managing WASI components and running them as MCP (Model Context Protocol) servers. See components for use
Wasic enables you to run WebAssembly components as MCP (Model Context Protocol) servers, giving you access to a wide range of tools and functionality through a unified interface. With wasmic, you can:
- Deploy and manage WebAssembly tools from local files or remote OCI registries
- Expose WASM component functions as MCP tools that can be used by AI assistants and other MCP clients
- Run sandboxed, cross-platform tools without worrying about installation conflicts or system dependencies
- Integrate with AI workflows by making WebAssembly capabilities available through the Model Context Protocol
- Configure and customize component behavior through simple YAML configuration files
- Accepts both local file paths and OCI URLs for WASM components
- Uses wasm-tools and wkg for component manipulation
- Built on wasmtime for executing WASM components
- Integrates with MCP (Model Context Protocol) servers
- Supports component configuration and profiling
Pre-compiled binaries for Linux (x86_64), macOS (x86_64 and ARM64), and Windows
(x86_64) are available on the
GitHub Releases page. This is the
recommended way to install wasmic for most users.
Download the appropriate archive for your system, extract it, and place the
wasmic (or wasmic.exe on Windows) binary in your system's PATH.
For easy installation from crates.io (once published):
cargo binstall wasmicTo install the latest version from source via Cargo:
cargo install wasmicTo install the latest development version from source:
# Clone the repository
git clone https://github.com/dineshdb/wasmic.git
cd wasmic
# Install the CLI tool
just installWasic uses a cache folder for storing downloaded OCI artifacts and other temporary files:
- Linux:
~/.cache/wasmic/ - macOS:
~/Library/Caches/wasmic/ - Windows:
%LOCALAPPDATA%\wasmic\cache\
# List available components
wasmic --config config.yaml list
# Call a function on a component
wasmic --config config.yaml call --function "time.get-current-time" --args "{}"
# Call fetch function
wasmic --config config.yaml call --function "fetch.fetch" --args '{"url":"https://httpbin.org/get"}'The default configuration file is config.yaml in the project root. The wasmic
CLI looks for configuration files in the following order:
- Command-line argument (
--config) - Environment variable (
WASIC_CONFIG) - Default locations:
- Linux/macOS:
~/.config/wasmic/config.yaml - macOS:
~/Library/Application Support/wasmic/config.yaml
- Linux/macOS:
Create a config.yaml file to define your components:
components:
time:
path: target/wasm32-wasip2/release/time.wasm
config:
timezone: "UTC"
fetch:
oci: ghcr.io/dineshdb/wasi-components/fetch:latest
prompts:
research:
name: "Web Research"
description: "Research a topic"
content: |
# Research a topic
## Tools
- brave_search for searching the web. You can do multiple searches on a topic before responding
- fetch.fetch for fetching links directlyWasmic can run as a standalone MCP server that exposes WASM components as MCP tools and prompts:
# Start MCP server with default config
wasmic mcp
# Start with custom config
wasmic mcp --config /path/to/config.yaml
# Start on specific host and port
wasmic mcp --http 0.0.0.0:8080For development information, see docs/development.md.
For testing, you can use: ghcr.io/yoshuawuyts/time:latest