# Selvedge MCP server

> Record and retrieve coding decisions, reasons and rejected approaches per code entity, stored in local SQLite.

- Listing: https://mcp.tc/i/selvedge
- Connect: this is a local (stdio) server; install it on your machine (see Install). The listing link is a page, not an MCP endpoint.
- Type: local (stdio)
- Auth: no API key needed
- Category: [Developer Tools](https://mcp.tc/c/developer-tools)
- Vendor: Mason Delan
- Homepage: <https://selvedge.sh>
- Docs: <https://selvedge.sh>
- Repository: <https://github.com/masondelan/selvedge>
- Package: pypi `selvedge`

## About

Selvedge gives AI coding agents persistent decision memory. Agents log changes to entities such as database columns, functions, routes, dependencies and env vars, along with the reasoning and rejected approaches. Later sessions can look up the history, check prior attempts before editing, and find decisions due for a revisit.

It runs locally over stdio, installed from PyPI and started with uvx, with a companion CLI. Records are kept in a SQLite file in .selvedge/ next to your code. No hosted account or API key is needed. SELVEDGE\_DB optionally overrides the database path.

## What it can do

- Log code changes with reasoning, diff and entity type
- Show change history for an entity, newest first
- Blame an entity to see its latest change and decision status
- Check prior attempts and outcomes before editing
- Search events by full text across paths, diffs and reasoning
- Retrieve all events in a changeset
- List stale decisions due for revisit

## Tools (8)

- `log_change`: Record a change to a codebase entity with reasoning; supports renames and revisit conditions.
- `diff`: Get change history for an entity, newest first, with prefix matching. (read-only)
- `blame`: Show the most recent change to an entity, with who, why and decision status. (read-only)
- `history`: Browse filtered change history across entities by date, path, project or changeset. (read-only)
- `changeset`: Get all events sharing a changeset id, oldest first. (read-only)
- `search`: Full-text search across entity paths, diffs, reasoning and agents. (read-only)
- `prior_attempts`: List earlier attempts on an entity with inferred outcomes such as reverted or rejected. (read-only)
- `stale_decisions`: Find decisions that expired, are past their date or hit a stale condition. (read-only)

## Example prompts

- "Before editing users.email, check whether this was tried before."
- "Log that we added deps/stripe and why we rejected the alternative."
- "Show the history of the users table and its columns."
- "Which decisions are due for a revisit in this project?"

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

```bash
claude mcp add --transport stdio selvedge -- uvx --from selvedge selvedge-server
```

2. Start Claude Code and type `/mcp`. **selvedge** should show as connected.

Add `--scope user` to make it available in every project.

### Claude Desktop

1. Open **Settings → Developer → Edit Config**. It opens `claude_desktop_config.json`. Add:

`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "selvedge": {
      "command": "uvx",
      "args": [
        "--from",
        "selvedge",
        "selvedge-server"
      ]
    }
  }
}
```

2. Save the file and restart Claude Desktop.

Needs uv (Python) on your computer. The file lives in `~/Library/Application Support/Claude/` on macOS and `%APPDATA%\Claude\` on Windows.

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=selvedge&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJzZWx2ZWRnZSIsInNlbHZlZGdlLXNlcnZlciJdfQ%3D%3D>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

```json
{
  "mcpServers": {
    "selvedge": {
      "command": "uvx",
      "args": [
        "--from",
        "selvedge",
        "selvedge-server"
      ]
    }
  }
}
```

Needs uv (Python) on your computer.

### VS Code

[Install in VS Code](<https://vscode.dev/redirect/mcp/install?name=selvedge&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22uvx%22%2C%22args%22%3A%5B%22--from%22%2C%22selvedge%22%2C%22selvedge-server%22%5D%7D>) (opens VS Code)

Or from a terminal:

```bash
code --add-mcp '{"name":"selvedge","type":"stdio","command":"uvx","args":["--from","selvedge","selvedge-server"]}'
```

Or commit it to the repo in `.vscode/mcp.json`:

`.vscode/mcp.json`:

```json
{
  "servers": {
    "selvedge": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--from",
        "selvedge",
        "selvedge-server"
      ]
    }
  }
}
```

Needs uv (Python) on your computer.

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

```json
{
  "mcpServers": {
    "selvedge": {
      "command": "uvx",
      "args": [
        "--from",
        "selvedge",
        "selvedge-server"
      ]
    }
  }
}
```

2. Refresh the MCP server list in Cascade.

Devin Desktop is the new name for Windsurf.

### Codex

```bash
codex mcp add selvedge -- uvx --from selvedge selvedge-server
```

Or edit `~/.codex/config.toml` directly:

`config.toml`:

```toml
[mcp_servers.selvedge]
command = "uvx"
args = ["--from", "selvedge", "selvedge-server"]
```

Needs uv (Python) on your computer.

### Gemini CLI

```bash
gemini mcp add selvedge uvx -- --from selvedge selvedge-server
```

This adds it to the current project. Add `-s user` to use it everywhere.

### Any client

Most clients that start local servers accept this shape:

```json
{
  "mcpServers": {
    "selvedge": {
      "command": "uvx",
      "args": [
        "--from",
        "selvedge",
        "selvedge-server"
      ]
    }
  }
}
```

Zed puts servers under `context_servers` in its settings, with the same `command`, `args` and `env` fields.

Needs uv (Python) on your computer.

## Recent changes

- 2026-11-01 02:28 UTC: New version 0.3.18 (was 0.3.17), read from PyPI. Source: automatic check.
- 2026-10-26 17:30 UTC: Tracking started: 8 tools read. Source: automatic check.

More on the History tab, with descriptions before and after for the newest entries: https://mcp.tc/i/selvedge#history (Atom feed: https://mcp.tc/i/selvedge/history.xml). It records what mcp.tc's anonymous checks saw, every 3 hours where the tool list can be read without sign-in; it is not a security review.

## Details

- Server version: 0.3.18
- Last checked: 2026-10-07
- Listed: 2026-10-26
- Updated: 2026-10-26

---
Source: https://mcp.tc/i/selvedge (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
