# ChainWeaver

Executes verified multi-step tool workflows deterministically without roundtripping to the model between steps.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6
- Author: dgenio
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dgenio/ChainWeaver
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/mcp/chainweaver

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add chainweaver -- uvx chainweaver
```
uvx runs the command named after the package; if the README names another one, use uvx --from chainweaver <command>

### Codex

**Platform CLI**
```bash
codex mcp add chainweaver -- uvx chainweaver
```
uvx runs the command named after the package; if the README names another one, use uvx --from chainweaver <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add chainweaver uvx chainweaver
```
uvx runs the command named after the package; if the README names another one, use uvx --from chainweaver <command>

## When to use it
- 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
- 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

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119231
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47577
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43902

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
