Selvedge
Local memory that stores why code changed and which approaches were rejected
- Pricing
- Free
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 0.3.18
- Listing updated
- 3 days ago
About Selvedge
Selvedge is a free MCP server for knowledge and memory. It runs locally on your machine and is started by your AI client.
Selvedge targets a gap that code alone leaves: the reasons behind a choice and the alternatives that were ruled out. You save a decision, its constraints and what would change your mind, then recall it in a later session using a function, database column, API route or dependency as the lookup key.
Everything sits in a SQLite file under .selvedge/ next to the project, so decisions carry over when you switch tools. No hosted account is needed and core storage and retrieval make no model calls. It connects through a local stdio MCP server or the CLI for agents with shell access, and selvedge demo --mcp saves a record, restarts the server and retrieves it using throwaway data.
The README is candid about limits: only explicitly saved decisions can be recalled, saved reasons are not verified, and nothing guarantees an agent will consult them. Recent versions add a markdown digest export with a drift check and an optional GitHub Action that surfaces rejected approaches in pull request comments.
Install
Run in a terminal
claude mcp add selvedge -- uvx selvedgeAdd to claude_desktop_config.json
{
"mcpServers": {
"selvedge": {
"command": "uvx",
"args": [
"selvedge"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"selvedge": {
"command": "uvx",
"args": [
"selvedge"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"selvedge": {
"type": "stdio",
"command": "uvx",
"args": [
"selvedge"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"selvedge": {
"command": "uvx",
"args": [
"selvedge"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"selvedge": {
"command": "uvx",
"args": [
"selvedge"
]
}
}
}Configuration
SELVEDGE_DBOverride the SQLite path. Defaults to .selvedge/selvedge.db next to the codebase.
What it does
- Decision records
- Stores rationale, rejected approaches and what would change the decision.
- Entity lookup
- Retrieves history by function, column, route or dependency.
- Local SQLite store
- Keeps data in .selvedge/ with no hosted account.
- MCP or CLI
- Works over stdio MCP or from a shell-capable agent.
- Digest check
- Exports a Markdown digest and flags drift with a --check mode.
- Review Action
- Optional GitHub Action surfaces recorded history in PR comments.
Good for
- Recover why an approach was rejected after the original chat is gone
- Hand decisions between sessions and coding tools
- Warn reviewers about previously reverted approaches
- Keep a project decision log in version control
Pricing
Free
No hosted account required
Prices change. Check selvedge.sh before you buy.
Selvedge FAQ
Where is data stored?
In a SQLite file at .selvedge/selvedge.db by default, or the path in SELVEDGE_DB.
Does it call an LLM?
Core storage and retrieval make no model calls.
Does it guarantee my agent reads the decisions?
No. Only saved decisions can be recalled and use depends on the agent.
How do I try it?
Install with uv tool install selvedge and run selvedge demo.
Is Selvedge free?
Yes. Selvedge is free to use.
How do I add Selvedge to Claude Code?
Run this command in your terminal: claude mcp add selvedge -- uvx selvedge
What are the best alternatives to Selvedge?
The closest alternatives to Selvedge are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to Selvedge

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools