# Conventions MCP [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/FedgeNo/conventions-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 404  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/conventions-mcp

## Description
Memory for coding conventions and standing instructions that persists across sessions.

## Tools
Capabilities this server exposes over MCP:

- **capture_thought** — Save only a durable coding convention, standing instruction, correction, or workflow preference that should govern future sessions or repeated work — e.g. style rules ('always use 2-space indent') or standing directives ('never force-push to main'). Never capture directions specific to the current task, temporary decisions, current status, incident history, commands used for one job, or descriptions of how an individual job was completed; those belong only in the conversation. A preference mentioned while directing one task is not durable unless the user clearly states or confirms that it should apply in the future. Condense each durable rule to one sentence, two if absolutely necessary — no incident stories, user quotes, or example code. Call this when the user establishes or corrects a durable rule, or explicitly asks to retain a genuinely long-lived convention. Classify it yourself using the type/topics/projectScoped fields below, based on the conversation the thought came from. If a single message states multiple distinct durable rules, call this once per rule — don't merge them into one capture — and relay each one individually the same as a single capture, not summarized together. After every successful call, state the captured content verbatim and its project back to the user (the response text already contains both) — this is how they catch a misinterpreted rule and correct or delete it immediately, rather than discovering it wrong much later.

Call shape — four top-level arguments, not one wrapped/stringified object: {"content": "Never assign innerHTML; build with DOM methods.", "type": "convention", "topics": ["dom", "security"], "projectScoped": false}
- **update_thought** — Correct or refine an existing thought's content in place — same id, re-embedded and re-tagged from the new content. Condense the rule to one sentence, two if absolutely necessary — no incident stories, user quotes, or example code. Use this instead of delete_thought + capture_thought whenever the user is correcting, refining, or replacing what a specific existing thought says (a stale convention, a preference that's since changed) rather than adding an unrelated new one. If the id isn't already known from context, use search_thoughts or list_thoughts first and confirm with the user which one before updating. Re-classify using the type/topics/projectScoped fields below, based on the corrected content and the conversation it came from. After a successful call, state the updated content verbatim and its project back to the user (the response text already contains both) — this is how they catch a misinterpreted rule and correct or delete it immediately.

Call shape — five top-level arguments, not one wrapped/stringified object: {"id": 4, "content": "Never assign innerHTML; build with DOM methods.", "type": "convention", "topics": ["dom", "security"], "projectScoped": false}
- **delete_thought** — Permanently delete a specific captured thought by its ID. This is destructive and irreversible — no undo, no trash. Only call this when the user explicitly asks to delete, remove, or forget a specific thought. Never call it proactively, as a side effect of another action, or on a guess at which ID they mean — if the ID isn't already known from context, use search_thoughts or list_thoughts first and confirm with the user which one before deleting.
- **search_thoughts** — Look up previously stored coding conventions, standing instructions, and preferences, by meaning and by exact keyword match (hybrid search). Call this proactively before starting unfamiliar coding work, or when uncertain about a style/convention choice in a project — don't wait for the user to ask. Also call it when the user references a past preference or rule ('like we discussed', 'the usual way', 'you know how I like it').
- **list_thoughts** — List all captured conventions/instructions, optionally filtered by type.
- **list_rules** — Retrieve every convention, instruction, correction, and preference that applies right now — everything global plus anything scoped to the current project — in one call. A deterministic direct lookup (no embeddings, no ranking), so it won't miss anything a semantic search_thoughts query might rank low. Prefer this over several search_thoughts calls when you want the full standing rule set at once, e.g. at the start of unfamiliar work.
- **thought_stats** — Get a summary of all captured durable rules: totals, types, top topics, and per-project counts.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "conventions-mcp": {
    "command": "npx",
    "args": ["-y","conventions-mcp"]
  }
}
```

## Documentation

## What Conventions MCP does

Conventions MCP is designed for durable coding guidance rather than general conversation memory. It stores rules such as formatting conventions, workflow instructions, lasting corrections, and long-lived preferences that should apply in later sessions. Each capture is assigned one of five categories: convention, instruction, correction, preference, or other. Captures also receive topic tags and a project scope.

A null project scope makes a rule global. Project-specific entries are associated with a normalized absolute path, allowing rules for one codebase to remain separate from rules for another. The server is intended to keep temporary task instructions, work history, current status, and one-off commands out of the memory store.

## How it works

The runtime uses SQLite with better-sqlite3, sqlite-vec for vector search, and FTS5 for keyword search. Semantic and keyword results are combined with reciprocal rank fusion. Embeddings run locally using the quantized Xenova/bge-small-en-v1.5 model, which is downloaded once to the local model cache and loaded as needed. No API key, hosted service, or GPU is required.

The calling agent supplies the classification at capture time, guided by the capture_thought tool description. This keeps the surrounding conversation available when deciding whether an entry is a convention, instruction, correction, preference, or another durable rule. Project scope is also selected by the client or agent rather than inferred from free-form text.

MCP uses stdio by default. An optional Streamable HTTP mode runs as a localhost service for clients that should connect to one persistent process. Stdio clients derive the project from their working directory. HTTP clients can use an MCP root or provide the absolute project path through the X-Conventions-Project header.

## Setup and configuration

Install dependencies from a checkout with `npm install`, then create the database with `npm run init-db`. The package can also be installed globally with:

```bash
npm install -g conventions-mcp --onnxruntime-node-install-cuda=skip
conventions-mcp init-db
conventions-mcp warmup
```

The warmup command downloads and verifies the embedding model. The database, model cache, transport, and timeout settings can be adjusted through the options listed in the project’s environment example. `conventions-mcp doctor` checks runtime, database, permissions, vector extension, and model-cache readiness without downloading files.

For a persistent local service, set `MCP_TRANSPORT=http`, bind to the loopback address, and choose an HTTP port. The MCP endpoint is `/mcp`; `/healthz` provides a local readiness check. HTTP session retention can be bounded with the session limit and idle-time settings. Clients without MCP root support can set `X-Conventions-Project` in project-local configuration.

## Tools and capabilities

- `capture_thought` saves a convention, instruction, correction, preference, or other durable thought, including its classification and scope.
- `update_thought` replaces an existing entry while keeping its identifier and regenerating its embedding and tags.
- `search_thoughts` combines semantic similarity with keyword matching.
- `list_thoughts` provides an all-records management view and can filter by type.
- `list_rules` returns global and current-project rules in identifier order without embeddings or ranking.
- `thought_stats` reports totals, type counts, leading topics, and project counts.
- `delete_thought` permanently removes an entry by identifier.

Codex and Claude Code hooks can call `list_rules` at context boundaries. The documented hook behavior supplies or enforces the standing-rule lookup instead of relying only on the agent to notice a relevant tool description.

## Limitations and notes

The original repository is no longer maintained. It has been superseded by a Cloudflare Worker implementation and a companion client, which should be used for new deployments.

This server is intentionally narrow. It suits coding-convention memory and deterministic rule retrieval, but not a general-purpose store for every note, task history, temporary decision, or current-status update. The taxonomy is guided by tool descriptions and schema validation rather than a separate classification model.

Local storage and embeddings keep runtime data on the host, while the embedding model requires an initial download and local disk space. Legacy databases may require the backup-first `conventions-mcp migrate-storage <absolute-backup-path>` command before use.

_Full upstream README: https://allmcps.com/mcp/conventions-mcp/readme_

