coster
Exports project memories to .github/copilot-instructions.md, giving GitHub Copilot access to decisions, conventions, and workarounds.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@costercapture a convention: use 2-space indentation in all code"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Coster
Universal, offline-first context persistence layer for AI coding assistants.

Coster captures the why of your codebase — decisions, conventions, workarounds, and
investigations — into a local SQLite database, then regenerates tool-specific memory files
(CLAUDE.md, AGENTS.md, .cursorrules, …) so every AI assistant you use shares the same
brain. No API keys, no cloud, no telemetry.
Why
AI assistants forget everything between sessions. Coster gives them durable, structured memory that follows your project instead of living inside one vendor's context window.
Offline & private — everything is stored in
.coster/inside your project.Zero API keys —
coster initdetects your tool, installs hooks, syncs, and backfills memories from your git history.Tool-agnostic — one source of truth, exported to 9+ assistant formats.
No native build — storage uses
sql.js(WASM SQLite), so there is nonode-gypstep.
Related MCP server: Context Portal MCP (ConPort)
Install
npm install -g coster
# or run without installing:
npx coster@latest <command>Requires Node.js 18+.
Quick start
From the root of your project:
coster initThis will:
Detect which AI assistant you use (
.claude/CLAUDE.md→ Claude Code,AGENTS.md→ OpenCode,.cursorrules→ Cursor, etc.).Install git hooks (post-commit / post-checkout) that capture context automatically.
Sync a tool-specific memory file (e.g.
AGENTS.md).Backfill — scan git history for
cost:<category>:directives and import them as memories.
Then just work. Git commits that include a directive like:
cost:decision: We standardized on feature flags for all new endpoints…are automatically captured into Coster on every commit.
Any other Coster command also auto-initializes the project if .coster/ is missing, so you
can run a single command and have everything set up for you.
Commands
Command | Description |
| Initialize a project. Plain |
| Interactive setup wizard. |
| Quick-capture a memory from plain text (auto-categorizes). |
| Manually capture a memory. |
| Called automatically by git hooks. |
| Import memories from an exported agent conversation (Claude jsonl / OpenCode json / text). |
| Capture memories from recently merged PRs (via your |
| Capture memories from the shell command log. Enable with |
| File-watch daemon that auto-discovers tools, re-syncs context files on change, and runs scheduled maintenance. |
| Opt-in. Install an OS service (Windows task on login; launchd/systemd template elsewhere) so the daemon runs unattended. Off by default — nothing auto-starts on login. |
| Run memory maintenance: archive expired, decay stale importance, merge duplicates. |
| Show active/archived counts, pending TTL expirations and near-duplicates. |
| Run a single lifecycle step. |
| List detected near-duplicate memory pairs (no writes). |
| Manually merge memory |
| Inspect and manage soft-archived memories (restorable; purge is permanent). |
| Download the local embedding model once (requires network; runtime stays offline). |
| Build/update the semantic index for all memories (auto-fetches the model if missing). |
| Show embedding/model/index state. |
| Delete all vectors (revert to keyword-only search). |
| Search memories with hybrid keyword + semantic ranking (records access for |
| List memories. |
| Print the generated memory file for a tool (default: |
| Regenerate tool-specific memory files. Auto-detects and enables newly added assistant tools (pass |
| CRUD on individual memories. |
| Recall the most relevant memories for a topic or file, ranked by decayed importance (+ optional semantic). |
| Read/modify configuration. |
| Health summary (detected tools, memory count, unconfigured tools). |
| Full health & environment check (Node, config, DB, git hooks, MCP, discovered tools). |
| Memory statistics by category and access. |
| Manage git/shell hooks. Use |
| Manage capture sessions (inject context on start, archive expired memories on end). |
| Print memories grouped by category for a tool. |
| Archive memories expired per lifecycle TTL. |
| Start the MCP server (stdio). |
| Register Coster as an MCP server for detected assistants (idempotent, cross-tool). |
| Remove the Coster MCP server registration. |
| Print a shell completion script. |
| Remove Coster entirely from this project ( |
Examples
# Add a memory
coster memory add -c convention -t "Use 2-space indentation" --tags style
# Search
coster search "indentation"
# Recall the most relevant memories for a topic
coster recall "how do we cache sessions" --limit 5
# Tune config
coster config set quality.minScore 6
coster config set tools.opencode.enabled false
# See what's going on
coster status
coster stats --jsonSemantic search
Search is hybrid: keyword (BM25) fused with local embeddings (Reciprocal Rank
Fusion), so it matches by meaning, not just substrings. Setup is one extra command
after init:
coster embeddings build # downloads a ~100MB local model once, then indexes all memories
coster search "how do we cache sessions" # now understands "Redis", "cache", etc.The default model (
Xenova/bge-base-en-v1.5, 768-d, runs on ONNX/WASM) is fetched once and stored under~/.coster/models. Runtime search never touches the network.If the index isn't built yet,
searchsilently falls back to keyword-only, so search always works out of the box.From then on, the file-watch daemon keeps the index fresh automatically (toggle with
embeddings.autoBuild).Want a smaller/faster model?
coster config set embeddings.model Xenova/all-MiniLM-L6-v2andcoster config set embeddings.dim 384. Want the largest?Xenova/bge-large-en-v1.5withembeddings.dim 1024. Thencoster embeddings build.
Memory lifecycle
Coster keeps itself tidy so it never rots into stale, contradictory noise. Three automatic maintenance steps run on a schedule (inside the daemon) and on demand:
Archive — memories past their per-category TTL (
recap30d,investigation90d,workaround90d) are soft-archived: moved to a restorablearchivetable, not deleted.coster archive list/restore/purgemanage them.Decay — importance fades with age (exponential half-life, default 180d, floored at
decayMinImportance0.2) so fresh memories rank above ancient ones without vanishing.Consolidate — near-duplicate memories (cosine ≥
consolidateSimilarity, default 0.92, same category amongpreference|convention|decision|workaround|mistake) are merged into one. Needs the semantic index (embeddings build).
coster lifecycle status # what's pending?
coster lifecycle run --dry-run # preview counts, no writes
coster lifecycle run # do itNothing starts itself on OS login. The daemon, its scheduled maintenance, and the OS boot service are all off by default and strictly opt-in:
The in-daemon scheduler is gated by
scheduler.enabled(defaultfalse). A manually started daemon only does file-watch sync until you opt in.coster daemon install-serviceis the only way to make Coster launch on login — you have to type it yourself. If you don't want that, you never get it.
coster daemon install-service # opt in: run the daemon (archive+decay daily, consolidate weekly) on login
coster config set scheduler.enabled true # opt in: let a running daemon schedule maintenanceEvery step is safe to re-run and skips what's disabled in config (lifecycle.autoArchive,
scheduler.enabled, embeddings.enabled).
Smart context injection
Instead of dumping every memory into your tool files, injection is relevance-curated by
default (injection.mode: 'curated'):
Decayed importance — every injected memory is scored with its age-decayed importance (see Memory lifecycle), so fresh, frequently-used memories surface and ancient ones fade rather than bloating the context window.
Optional semantic focus — when an embedding model is present locally,
coster recall, the MCPrecalltool, andget_context --focusblend the decayed ranking with semantic similarity to the topic/file so the most topically relevant memories float up. No model? Curation silently falls back to decayed importance — still fully offline, no network, no download.Budget-fit — curated memories are trimmed to each tool's
tokenBudgetso they always fit. Legacyinjection.mode: 'all'restores the old "fit-all-then-truncate" behavior.
The daemon also prints a one-line 💡 recall hint when you edit a file (proactive recall), pointing you at the most relevant existing memory — it never rewrites your tool files on its own.
coster recall "configure the build cache" --limit 5 # focused recall
coster recall -f src/build.ts # recall by file path
coster config set injection.semanticWeight 0.5
coster config set injection.mode all # legacy behaviorRemoving Coster (byebro)
coster byebro fully decommission Coster from a project: it stops the daemon, removes the
OS service, uninstalls git/shell hooks and the MCP registration, and deletes .coster/
(including the memory DB and vectors). The generated assistant tool files (AGENTS.md,
CLAUDE.md, .cursorrules, COSTER.md, …) are left exactly as they were — your project
keeps working with the context already written. Add --purge-global to also delete the
globally cached embedding model (~/.coster/models).
coster byebro --yes # remove Coster, keep your tool files
coster byebro --yes --purge-globalSupported tools & setup
Coster exports a managed block into each tool's memory file. Your own content in those files
is preserved — Coster only owns the region between <!-- COSTER:START --> and
<!-- COSTER:END --> markers, and re-writes only that region on every sync.
Tool | File written |
Claude Code |
|
OpenCode |
|
Cursor |
|
GitHub Copilot |
|
Windsurf |
|
Codex |
|
Cline |
|
Continue |
|
Kiro |
|
Coster (portable) |
|
Enabling the MCP server (recommended)
The MCP server lets an assistant read and write memories directly. The easiest way is to let
Coster register itself — coster init does this automatically, or run it any time with:
coster mcp-installThis writes an idempotent coster entry into the standard .mcp.json (Claude Code, Cursor,
VS Code, Cline, Windsurf, Codex) and, if present, merges into opencode.jsonc. Run
coster mcp-remove to clean up. The registered server uses npx -y coster mcp.
To register manually instead, add the entry yourself:
Claude Code — .mcp.json (project) or ~/.claude.json:
{
"mcpServers": {
"coster": {
"command": "coster",
"args": ["mcp", "--project", "."]
}
}
}OpenCode — ~/.config/opencode/opencode.json:
{
"mcp": {
"coster": {
"command": "coster",
"args": ["mcp", "--project", "."]
}
}
}Cursor / VS Code / Cline / Continue / Windsurf / Codex / Kiro — use the same shape in
their respective mcp.json / MCP settings file:
{
"mcpServers": {
"coster": { "command": "coster", "args": ["mcp", "--project", "."] }
}
}Requires Coster on your
PATH(npm install -g coster). The--projectflag defaults to the current directory when omitted.
The cost: directive
Capture structured memory from commit messages without leaving your editor. The format is:
cost:<category>: <content>category— one ofpreference,convention,decision,investigation,workaround,recap,mistake.
Examples:
cost:decision: We standardized on feature flags for all new endpoints
cost:convention: All dates are stored as UTC ISO-8601 strings
cost:workaround: The staging API requires a trailing slash or it 500sEvery commit that includes a directive is captured by the post-commit hook (stored with importance 0.8).
Memory categories
preference · convention · decision · investigation · workaround · recap · mistake
Memories carry an importance (0–1), tags, a source (manual, git-hook, shell-hook,
auto), and access counters used by coster stats.
How it works
git commit ─▶ post-commit hook ─▶ coster capture commit
│
coster capture (manual) ──────┤
▼
┌──────────────────────┐
│ .coster/coster.db │ (sql.js / WASM SQLite)
└──────────────────────┘
│
coster sync ─▶ AGENTS.md / CLAUDE.md / .cursorrules …
│
injected into your assistant's contextConfiguration
Configuration lives in .coster/config.json. Key paths:
quality.minScore— minimum quality-gate score to keep a memory.tools.<name>.enabled— toggle export for a specific assistant.tools.<name>.exportPath— where the generated file is written.lifecycle.*— TTLs and auto-archive behavior:recapTTL,investigationTTL,workaroundTTL,autoArchive,decayHalfLifeDays,decayMinImportance,consolidateSimilarity.scheduler.*— in-daemon maintenance cadence (off by default; opt in withconfig set scheduler.enabled true):enabled,decayEveryHours,archiveEveryHours,consolidateEveryHours.injection.*— smart context injection:mode(curateddefault, orall),useSemantic(blend semantic ranking when a model is present),semanticWeight(0–1 blend factor, default 0.4),maxMemories(curate cap per file, default 200),proactive(print a 💡 recall hint on file edits via the daemon, default true).
FAQ
Does Coster send my code anywhere?
No. All storage is local (sql.js WASM SQLite inside .coster/). There is no network
call unless you explicitly connect the MCP server to an assistant.
Will sync overwrite my AGENTS.md?
No. Coster only writes the region between its <!-- COSTER:START --> / <!-- COSTER:END -->
markers. Anything you write outside that block is preserved.
Do I need to be on a specific OS?
No. Coster runs on Windows, macOS, and Linux. The git hooks are POSIX sh scripts that Git
runs natively on all three.
Why do I need a global install for hooks?
Git hooks invoke coster by name, so it must be on your PATH. Use npm install -g coster,
or run npx coster@latest for one-off commands.
How do I disable a tool's export?
coster config set tools.<name>.enabled false, then coster sync.
Development
npm install
npm run build # tsup → dist/
npm test # vitest
npx tsc --noEmit # typecheckLicense
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
One memory, every AI. A shared, user-owned markdown memory your AI clients read and write over MCP.
Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA self-hosted MCP server that provides AI assistants with a shared, persistent SQLite-backed memory for storing and retrieving project context, decisions, and discoveries. It enables cross-session continuity and team-wide knowledge sharing to keep AI coding tools aligned and informed.3MIT
- AlicenseNot gradedqualityDmaintenanceA database-backed MCP server that acts as a project memory bank, enabling AI assistants to store, retrieve, and search structured context like decisions, tasks, and architecture using SQLite and vector embeddings.Apache 2.0
- AlicenseNot gradedqualityCmaintenancePersistent memory for AI coding agents. Enables agents to save and recall decisions, patterns, bugs, and context across sessions via an MCP server with local SQLite storage.122MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP memory server that gives AI assistants durable project memory across coding sessions, storing context, changes, and decisions.31MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/savai15/coster'
If you have feedback or need assistance with the MCP directory API, please join our Discord server