ChainWeaver — Claude Code MCP server: what it does, how to install
Executes verified multi-step tool workflows deterministically without roundtripping to the model between steps.
claude mcp add chainweaver -- uvx chainweaverWhat ChainWeaver does
The server packages verified sequences of tool calls into single MCP tools. When an assistant repeats the same routine, such as fetching and parsing data, intermediate model prompts become unnecessary. Transitions run directly in code. The model only decides when to trigger the overall flow.
Every step uses strict Pydantic schemas to validate inputs and outputs. Flows serialize to files, track schema drift, and record structured audit logs. Grouping tools into one pipeline keeps required approval boundaries intact rather than quietly granting blanket access.
Standard Python code is simpler if you already know the flow ahead of time. ChainWeaver helps when recurring patterns surface from agent execution traces and need strict validation before skipping model calls.
What it helps with
- eliminate intermediate model reasoning from verified multi-step paths
- enforce typed schema validation across consecutive tool outputs
- expose governed tool sequences as single MCP endpoints
- detect schema drift and preserve approval boundaries during automation
Example prompts for the agent
- Execute the calc flow with number 5
- Run the search and extract pipeline as a deterministic tool
- Trigger the double_add_format flow for this payload
How to install ChainWeaver
Platform CLI
claude mcp add chainweaver -- uvx chainweaveruvx runs the command named after the package; if the README names another one, use uvx --from chainweaver <command>
Platform CLI
codex mcp add chainweaver -- uvx chainweaveruvx runs the command named after the package; if the README names another one, use uvx --from chainweaver <command>
Config file
{
"mcpServers": {
"chainweaver": {
"command": "uvx",
"args": [
"chainweaver"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from chainweaver <command>
Config file
{
"servers": {
"chainweaver": {
"type": "stdio",
"command": "uvx",
"args": [
"chainweaver"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from chainweaver <command>
Platform CLI
gemini mcp add chainweaver uvx chainweaveruvx runs the command named after the package; if the README names another one, use uvx --from chainweaver <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about ChainWeaver
How to install ChainWeaver in Claude Code?
Run this command in your terminal: claude mcp add chainweaver -- uvx chainweaver.
What does ChainWeaver do?
It turns accepted agent action sequences into deterministic execution pipelines. The model selects the high-level capability, while intermediate tool steps run locally with zero token overhead.
When is a plain Python function preferable to ChainWeaver?
If the pipeline structure is already known and static, standard code introduces less overhead. ChainWeaver is designed for extracting, validating, and governing paths derived from agent traces.