structured-memory-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TRANSPORT | No | Transport protocol: `stdio` (default) or `http` (requires `MCP_AUTH_TOKEN`). | stdio |
| DATABASE_URL | No | Full database connection URL. Alternative to POSTGRES_PASSWORD. | |
| EMBED_PROVIDER | No | Embedding provider: `local-hash` (default; offline, demo-grade), `voyage`, or `ollama`. | local-hash |
| MCP_AUTH_TOKEN | No | Required when `TRANSPORT=http`. | |
| MIN_SIMILARITY | No | Honesty-floor override (per-provider defaults in `brain/config.py`). | |
| VOYAGE_API_KEY | No | Only for `EMBED_PROVIDER=voyage` (`pip install '.[voyage]'`). | |
| POSTGRES_PASSWORD | No | Database password. `make setup` generates a password. Alternative to DATABASE_URL. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_session_continuationA | CALL THIS FIRST in every conversation. Returns, in order: hard-rule constraints, one pin per lane, QUIET THREADS (if any), the full text of every CORE wiki page, and the wiki index. Deterministic — no vector search. channel: optional — return only that lane's pin. |
| set_pinA | Session close: set the pin for ONE lane (work | personal | school). Rewrites that lane in place with the full "where things stand + what's next" state — not a delta. Durable facts belong in write_memory; the pin is state, not history. |
| write_memoryA | Persist one durable fact or decision. One specific fact per call, under 300 words. domain: free-form short label, e.g. decisions | people | projects | general importance: 9-10 decisions · 7-8 relationship/strategy updates · 5 context · 3 ephemeral idempotency_key: unique slug; the same key twice is a safe no-op entities: wiki page names this fact touches (powers topic->page push) |
| read_memoryA | Hybrid search (vector cosine + BM25, rank-fused, importance/recency re-ranked) over the trail. Use for topic-specific HISTORY — not for current state (that's pins/wiki). Says "No relevant memories found" when nothing clears the honesty floor; believe it. |
| search_memoryC | Broader sweep with the same ranking as read_memory (more results). |
| walk_trailA | Walk the trail in date order, oldest first, no scoring. For "what happened in March" / "when did X change". ISO dates, inclusive. |
| load_wikiA | Load compiled wiki pages by exact name — deterministic. Misses suggest near matches. |
| list_entitiesC | List every wiki page: folder, name, version, last update, headline. |
| write_wikiB | Create or rewrite a page IN PLACE (synthesized current truth, never an appended log). folder="CORE" marks an always-on operating page injected in full every session. |
| list_constraintsC | List standing rules. Retired rules are history, not truth. |
| set_constraintB | Add a standing rule when the user states one ("from now on…", "never…"). |
| retire_constraintB | Retire (never delete) the ONE active rule matching the fragment. |
| list_threadsB | List tracked threads with lane, status, last-touched age and cadence. |
| track_threadB | Create/update a thread when the user names an ongoing project or open loop. cadence_days: quiet days before it surfaces (1-365; 0 = never surfaces on silence). status: live | parked | dropped | done. wake_date: ISO date for parked threads. |
| touch_threadB | Mark a thread discussed NOW. Set status ONLY if the user ruled on it — status records what they said, never what silence suggested. |
| log_frictionA | Log YOUR OWN failure in the moment, with a concrete artifact as evidence (the failed result, the user's exact correction). No artifact = do not call. Zero friction is a normal session. Never read this lane to change your behavior. category: stale_protocol | wrong_tool | bad_retrieval | user_correction | missing_context | tooling_error | other |
| list_frictionB | The HUMAN's triage read path. open | triaged | fixed | dismissed | "" for all. |
| triage_frictionA | Record the HUMAN's spoken verdict (triaged | fixed | dismissed). A model may never mark its own failure fixed. |
| log_recordB | Store hard data (invoice, deadline, measurement…). Records beat recall: when one disagrees with a remembered fact, the record wins. Upserts on (kind, title, date). |
| list_recordsB | List records, newest first, optionally by kind and ISO date range. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 20 tools
Most tools target distinct resources and actions, but read_memory and search_memory overlap heavily (both hybrid search the trail), and write_memory vs write_wiki could be confused about where durable information belongs. The detailed descriptions help, but the boundaries are not perfectly crisp.
All tool names use snake_case with a consistent verb_noun pattern (load_wiki, retire_constraint, write_memory, list_constraints, track_thread, etc.). The convention is predictable throughout with no mixed styles.
20 tools is heavy for a single MCP server and sits in the borderline range. While each tool covers a distinct facet (memory, wiki, constraints, threads, friction, records, session state), the surface could likely be consolidated to reduce selection overhead.
The server covers core lifecycle operations across its subdomains: memory read/write/search/walk, wiki load/write/list, constraints list/set/retire, threads list/track/touch, friction log/list/triage, and records log/list. Missing hard delete/update for memories, records, and wiki pages may be intentional by design, but still leaves minor gaps.