# Weft

> Weft is an open-source MCP server for developer tools. Local search over your Claude Code and Codex conversations, linked to the files they. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Linux, Windows, Self-hosted
- **Repository:** https://github.com/zyaochen/weft/tree/HEAD/cli
- **MCP Registry name:** io.github.zyaochen/weft
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-27

## About

Weft reads the agent session logs already stored on your computer and indexes each turn by the files it read, wrote or edited. You can look up which conversations shaped a given file, find where exact wording was asked or answered, and jump back to the original session.

Facts are taken from recorded tool calls rather than from model-generated summaries, and session files are only read, never modified. The index is kept in a local folder and can be deleted with a single command. Answer-derived explanations are labelled separately from observed changes so they are not mistaken for verified reasons.

The package also ships a local canvas app and an MCP server with four read-only tools, so an agent can check for prior history before editing a file. It suits developers who work with coding agents on their own machine and want to recover the reasoning behind past changes.

## Features

- **File-based history lookup:** Lists the agent conversations that read, wrote or edited a given file, with timestamps and what changed.
- **Phrase search across sessions:** Finds where exact words were asked, answered or attached in indexed conversations.
- **Read-only MCP tools:** Exposes four read-only tools over stdio so an MCP-capable agent can query past history.
- **Local canvas viewer:** Opens sessions as graphs in a browser canvas served only on localhost.
- **Source-linked results:** Every hit links back to the original conversation it came from.
- **Local-only storage:** Index files live in a private local folder and can be removed with one command.

## Good for

- Check whether a file has prior agent conversations before editing it
- Recover why a piece of code was written a certain way
- Find the session where a specific phrase was discussed
- Browse past Claude Code or Codex sessions as a graph on a local canvas
- Give a coding agent read-only access to its own project history

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add weft -- npx -y weft-canvas
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "weft": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add weft -- npx -y weft-canvas
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.weft]
command = "npx"
args = ["-y", "weft-canvas"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user weft npx -- -y weft-canvas

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "weft": {
      "command": "npx",
      "args": [
        "-y",
        "weft-canvas"
      ]
    }
  }
}
```

## FAQ

### Which agent session formats does Weft index?

It indexes sessions from Claude Code, Codex, DeepSeek Harness and Pi that are already on the machine.

### Does Weft modify my session files?

No. Session files are read but never written.

### What do I need to run Weft?

Node.js 20 or newer and supported session logs on the machine running the server.

### How do I install Weft?

Install the npm package weft-canvas globally, which provides the weft command.

### Is Weft free?

Yes. Weft is open source, so you can use and self-host it for free.

### How do I add Weft to Claude Code?

Run this command in your terminal: claude mcp add weft -- npx -y weft-canvas

### What are the best alternatives to Weft?

The closest alternatives to Weft are Weft, Callimachus, CCRider, Claudex and ThoughtDAG.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Weft](https://ai-powered.com/mcp/weft-2): Weft is an open-source MCP server for developer tools.
- [Callimachus](https://ai-powered.com/mcp/callimachus): Callimachus is an MCP server for developer tools.
- [CCRider](https://ai-powered.com/mcp/ccrider): CCRider is an open-source MCP server for developer tools.
- [Claudex](https://ai-powered.com/mcp/claudex): Claudex is an open-source MCP server for developer tools.
- [ThoughtDAG](https://ai-powered.com/mcp/thoughtdag): ThoughtDAG is an open-source MCP server for developer tools.
- [Deja Vu](https://ai-powered.com/mcp/deja-vu): Deja Vu is a free MCP server for developer tools.
- [Claude Remind MCP](https://ai-powered.com/mcp/claude-remind-mcp): Claude Remind MCP is an open-source MCP server for ai models and llm tooling.
- [Puenteo](https://ai-powered.com/mcp/puenteo): Puenteo is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/weft-3
