Selvedge MCP Server

Selvedge is a local MCP server. AI coding agents (Claude Code, Cursor, Copilot) call it as they work to log structured change events with reasoning.

Local serverstdio

What is the Selvedge MCP server?

Selvedge is a local MCP server. AI coding agents (Claude Code, Cursor, Copilot) call it as they work to log structured change events with reasoning. Your data stays in a SQLite file under .selvedge/ next to your code. The selvedge mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 8 defined tools rather than through you.

Adding it to your client

selvedge on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Its toolset

Everything the assistant can do here goes through one of these:

  • log_change — Record a change event with entity, diff, and reasoning. rename_from + change_type="rename" records the dual-event rename pattern
  • diff — History for an entity or entity prefix, each row annotated with superseded_by
  • blame — Most recent change + context for an exact entity, plus the derived decision status (active / reverted / reopened)
  • history — Filtered history across all entities
  • changeset — All events grouped under a named feature/task slug
  • search — Full-text search across all events
  • prior_attempts — Prior change attempts on an entity + inferred outcome (tried → reverted → re-opened) — call it before editing. Optional fuzzy query adds semantically
  • stale_decisions — Decisions due for a revisit: past their revisit_after and still in active use (flag="revisit_due"), or whose stale_when condition matched a later

Configuration

You will need 2 environment variables: STRIPE_SECRET_KEY, CHANGESET_ID. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the selvedge mcp server does with a few real requests.

When to reach for it

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Selvedge's toolset — log_change, diff, blame and 5 more — is a fair guide to whether it matches your workflow. It is maintained by masondelan; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
log_changeRecord a change event with entity, diff, and reasoning. rename_from + change_type="rename" records the dual-event rename pattern; change_type="supersede" re-opens a reverted decision (append-only); optional constraint /
diffHistory for an entity or entity prefix, each row annotated with superseded_by
blameMost recent change + context for an exact entity, plus the derived decision status (active / reverted / reopened)
historyFiltered history across all entities
changesetAll events grouped under a named feature/task slug
searchFull-text search across all events
prior_attemptsPrior change attempts on an entity + inferred outcome (tried → reverted → re-opened) — call it before editing. Optional fuzzy query adds semantically similar records (needs the semantic extra; falls back to substring)
stale_decisionsDecisions due for a revisit: past their revisit_after and still in active use (flag="revisit_due"), or whose stale_when condition matched a later change (flag="review_suggested")

How to install the Selvedge MCP server

{
  "mcpServers": {
    "selvedge": {
      "command": "uvx",
      "args": ["selvedge"],
      "env": {
        "STRIPE_SECRET_KEY": "your-value",
        "CHANGESET_ID": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
STRIPE_SECRET_KEYCredential the server authenticates with.Yes
CHANGESET_IDConfiguration value read at startup.Optional

Example prompts to try

  • Use Selvedge to log change.
  • Use Selvedge to diff.
  • Use Selvedge to blame.

Frequently asked questions

It connects Selvedge to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (log_change, diff, blame, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Selvedge directly.