{"id":"c789c1d1-2e48-42f3-b93a-f1b47ffbddd0","slug":"free-context-hub","kind":"mcp","name":"free-context-hub","summary":"🧠 Self-hosted \"persistent memory + semantic search + guardrails\" for MCP AI tools. Empower Cursor and Claude Code with long-term memory, intent-based repo indexing (pgvector), and safety checks. Capt","owner":"letuhao","repoUrl":"https://github.com/letuhao/free-context-hub","license":"MIT","licenseTier":"permissive","trust":"community","stars":2,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-03-25T11:41:34.000Z","addedAt":"2026-10-21T20:49:00.758Z","logoUrl":"https://avatars.githubusercontent.com/u/53508073?u=8d7b44f608f42900c5f34592fd1808042fbafc0b&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["memory-knowledge","search","developer-tools"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-22T07:15:16.030Z","sample":false,"url":"https://conduits.dev/tools/free-context-hub","language":"TypeScript","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<p align=\"center\">\n  <h1 align=\"center\">free-context-hub</h1>\n  <p align=\"center\">\n    <strong>Persistent memory and guardrails for AI coding agents — so they never start from zero again.</strong>\n  </p>\n  <p align=\"center\">\n    <a href=\"LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"MIT License\"></a>\n    <img src=\"https://img.shields.io/badge/node-%3E%3D20-brightgreen\" alt=\"Node 20+\">\n    <img src=\"https://img.shields.io/badge/typescript-5.x-blue\" alt=\"TypeScript\">\n    <img src=\"https://img.shields.io/badge/MCP-compatible-purple\" alt=\"MCP Compatible\">\n    <img src=\"https://img.shields.io/badge/self--hosted-100%25-orange\" alt=\"Self-Hosted\">\n  </p>\n</p>\n\n---\n\nEvery AI coding session starts with amnesia. Your agent forgets the architectural decisions you explained yesterday, the workaround you discovered last week, and the deployment rule your team agreed on last month. You re-explain, re-discover, re-enforce — over and over.\n\n**free-context-hub** is a self-hosted, open-source [MCP](https://modelcontextprotocol.io/) server that gives AI assistants (Claude Code, Cursor, etc.) **persistent knowledge across sessions and agents** — decisions, preferences, workarounds, and guardrails that survive after a conversation ends.\n\nIt also provides a **web GUI** for humans to review, approve, and refine AI-generated knowledge — bridging **AI-to-AI** and **AI-to-Human** collaboration.\n\n> Inspired by [ContextStream](https://contextstream.io/). Free, local, for small teams.\n\n---\n\n## What this actually is\n\nThe visible surface is memory, lessons, and guardrails for AI coding agents. The deeper arc — see [ROADMAP.md](ROADMAP.md) for the full picture — is a five-phase research program building the MCP-served, software-substrate implementation of the **Dead Light Framework (DLF)**: a governance methodology for hybrid human + AI organizations.\n\n```\nPhase 1 ─── Phase 2 ─── Phase 3 ─── Phase 4 ─── Phase 5\nMemory      Eval +      Governance  Benchmark   Runtime\n+ Knowledge RAG Quality Primitives  Governance  Enforcement\n✅ shipped   🔄 active   🔄 active   ⏳ planned   💡 research\n```\n\nPhase 1 is the core feature surface most users interact with today. Phases 2 and 3 are being built in parallel on separate branches — generation-quality evaluation (Phase 2) and the coordination / governance primitives drawn from DLF (Phase 3: motions, proxies, scope, approval, dispute, multi-tier routing). Phase 4 will benchmark Phase 3 across diverse governance scenarios. Phase 5 — pre-action runtime enforcement and isolation environments for dangerous tasks — is still in literature review.\n\nThe differentiated wedge: persistent semantic memory of decisions + DLF-derived collective-decision primitives + tenant-scope isolation under one MIT roof, served via MCP. Several expansion directions are scoped for future phases — see [ROADMAP.md](ROADMAP.md).\n\n---\n\n## Screenshots\n\n> 20 pages, 70+ REST endpoints, full human-in-the-loop workflow.\n\n### Dashboard — Knowledge health, insights, activity feed\n![Dashboard](docs/screenshots/dashboard.png)\n\n### AI Chat — Markdown rendering, tool calls, conversation history\n![Chat](docs/screenshots/chat.png)\n\n### Lessons — Search, filter, import/export, feedback signals\n![Lessons](docs/screenshots/lessons.png)\n\n### Review Inbox — Approve AI-generated lessons, trust levels\n![Review Inbox](docs/screenshots/review-inbox.png)\n\n### Lesson Detail — Rich editor, comments, version history\n![Lesson Detail](docs/screenshots/lesson-detail.png)\n\n### Analytics — Retrieval trends, dead knowledge, agent activity\n![Analytics](docs/screenshots/analytics.png)\n\n### Documents — Upload, link, generate lessons from docs\n![Documents](docs/screenshots/documents.png)\n\n### Guardrails — Test presets, \"What Would Block?\" simulate mode\n![Guardrails](docs/screenshots/guardrails.png)\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n|:------|:-----------|\n| **Backend** | Node.js + TypeScript, MCP protocol server |\n| **Frontend** | Next.js 16, React 19, Tailwind CSS 4 |\n| **Primary Database** | PostgreSQL 16 + pgvector (data + embeddings) |\n| **Knowledge Graph** | Neo4j 5 (optional — symbol extraction via ts-morph) |\n| **Job Queue** | RabbitMQ (background workers for git ingestion, reflection) |\n| **Cache** | Redis (tiered search caching) |\n| **AI Integration** | MCP (Model Context Protocol) — open standard for agent tool use |\n| **Embeddings** | Any OpenAI-compatible endpoint (LM Studio, Ollama, etc.) |\n| **Deployment** | Docker Compose — single-node, self-hosted, zero cloud dependency |\n\n---\n\n## Architecture\n\n```\n AI Agents (Claude Code, Cursor, etc.)\n        │ MCP :3000\n        ▼\n ┌─────────────────────────────────┐\n │       ContextHub Backend        │\n │  MCP Server · REST API · Chat   │\n │  Background Worker (jobs)       │\n │─────────────────────────────────│\n │        Services Layer           │\n │  lessons · guardrails · search  │\n │  git · jobs · docs · audit      │\n │─────────────────────────────────│\n │  Postgres   │ Neo4j  (optional) │\n │  + pgvector │ Redis  (optional) │\n │             │ Rabbit (optional) │\n └──────────────┬──────────────────┘\n                │ REST :3001\n                ▼\n ┌─────────────────────────────────┐\n │      GUI (Next.js :3002)        │\n │  20 pages · AI chat · Review    │\n │  Inbox · Analytics · Agents     │\n └─────────────────────────────────┘\n                │\n           Human (browser)\n```\n\n---\n\n## Core Features\n\n### 1. Persistent Lessons & Knowledge\nThe main value proposition. Store and retrieve team knowledge that persists across sessions and agents.\n\n- **`add_lesson`** — Capture decisions, preferences, workarounds, guardrails\n- **`search_lessons`** — Semantic search across all stored knowledge\n- **`list_lessons`** — Browse with filters (type, tags, status)\n- **`update_lesson_status`** — Lifecycle management (draft → active → superseded → archived)\n- **`reflect`** — LLM-synthesized answers from multiple lessons (optional, requires chat model)\n\n**Example workflow:**\n```\nAgent A (Monday):   add_lesson(\"We use JWT not sessions — legal requires stateless auth\")\nAgent B (Thursday): search_lessons(\"authentication approach\") → gets the decision instantly\nAgent C (Next month): Doesn't waste time debating sessions vs JWT\n```\n\n### 2. Guardrails\nPrevent repeated mistakes by enforcing team rules before risky actions.\n\n- **`check_guardrails`** — Pre-action safety verification (git push, deploy, migrations)\n- Guardrails are derived from lessons with `lesson_type: \"guardrail\"`\n- Returns `pass/fail` + prompt for user confirmation when blocked\n\n### 3. Session Bootstrap\nQuick onboarding for new agent sessions.\n\n- **`get_context`** — Bootstrap with project state + suggested next calls\n- **`get_project_summary`** — Full project briefing in one read\n- **`help`** — Tool discovery and sample workflows\n\n### 4. Human-in-the-Loop GUI\nA full web dashboard where humans review, approve, and refine AI-generated knowledge.\n\n- **Review Inbox** — Batch approve/reject AI-generated lessons with trust levels\n- **Rich Content Editor** — Markdown toolbar, live preview, keyboard shortcuts (Ctrl+B/I)\n- **AI Editor** — Clarify, simplify, expand lessons with diff view (accept/reject)\n- **Comments & Feedback** — Threaded comments, thumbs up/down, bookmarks\n- **Activity & Analytics** — Timeline, retrieval trends, dead knowledge detection\n- **Documents** — Upload reference docs, generate lessons from them\n- **Global Search** — Cmd+K across all knowledge\n\n### 5. Access Control & Agent Audit\nSecure multi-agent environments with role-based access and full audit trails.\n\n- **API Keys with Roles** — Admin, editor, viewer permissions via SHA-256 hashed keys\n- **Agent Audit Trail** — Unified timeline of all agent actions (guardrail checks, lessons created)\n- **Custom Lesson Types** — Define project-specific types beyond the defaults\n- **Feature Toggles** — Enable/disable capabilities per project\n\n### 6. Code Search (Supplementary)\nSemantic code search assists agents in finding relevant code. Supplementary — agents already have built-in Grep/Glob.\n\n- **`search_code_tiered`** — Multi-tier search with auto-selected profiles:\n  - *code-search*: ripgrep → symbol → FTS → semantic\n  - *relationship*: convention paths → KG imports → filtered ripgrep\n  - *semantic-first*: vector similarity → FTS (for docs/scripts)\n\n### 7. Git Intelligence (Supplementary)\nAuto-collect insights from commit history.\n\n- **`ingest_git_history`** / **`suggest_lessons_from_commits`** — Draft lessons from git\n- **`analyze_commit_impact`** — Commit impact over symbol/lesson graph\n\n### 8. Knowledge Graph (Optional)\nSymbol-level code structure for advanced queries. Requires Neo4j.\n\n- **`search_symbols`** / **`get_symbol_neighbors`** / **`trace_dependency_path`**\n- **`get_lesson_impact`** — Which code does a lesson affect?\n\n---\n\n## Quickstart\n\n### Prerequisites\n- **Node.js 20+** and **npm**\n- **Docker** (for PostgreSQL + pgvector)\n- **Embeddings server** — [LM Studio](https://lmstudio.ai/) or any OpenAI-compatible endpoint\n\n### Setup\n\n```bash\n# 1. Clone and install\ngit clone https://github.com/your-username/free-context-hub.git\ncd free-context-hub\nnpm install\n\n# 2. Configure environment\ncp .env.example .env\n# Edit .env — set DATABASE_URL and EMBEDDINGS_BASE_URL\n\n# 3. Start infrastructure\ndocker compose up -d\n\n# 4. Launch the backend (MCP + API)\nnpm run dev\n\n# 5. Verify everything works\nnpm run smoke-test\n\n# 6. (Optional) Launch the GUI\ncd gui && npm install && npm run dev\n```\n\n### Connect Your AI Tool\n\nAdd the MCP server URL in your tool's settings:\n\n```\nhttp://localhost:3000/mcp\n```\n\n| Service | URL |\n|:--------|:----|\n| MCP Server | `http://localhost:3000/mcp` |\n| REST API | `http://localhost:3001` |\n| Web GUI | `http://localhost:3002` |\n\nDetailed setup: [`docs/QUICKSTART.md`](docs/QUICKSTART.md)\n\n---\n\n## Self-Hosted Models\n\nContextHub uses OpenAI-compatible APIs. Run locally with [LM Studio](https://lmstudio.ai/) or any compatible server.\n\n### Recommended Combo (benchmarked)\n\nWe tested 8 embedding models and 8 reranker models ([embedding/reranker benchmark](docs/benchmarks/2026-03-28-embedding-model-benchmark.md)), plus 6 distillation models ([distillation benchmark](docs/benchmarks/2026-05-15-distillation-model-benchmark.md)). Best combo:\n\n| Role | Model | Config |\n|:-----|:------|:-------|\n| **Embeddings** | `qwen3-embedding-0.6b` | `EMBEDDINGS_DIM=1024` — best accuracy (18/18 pass, avg 0.652) |\n| **Reranker** | `qwen3-4b-instruct-ranker` | `RERANK_MODEL=qwen3-4b-instruct-ranker` — +9% accuracy at 180 lessons |\n| **Distillation** | `ibm/granite-4-h-tiny` | `DISTILLATION_ENABLED=true` — non-reasoning, ~100K context; reflect, compress, summarize |\n\n### Alternative Models\n\n**Embedding** (8 tested, lesson search accuracy):\n\n| Model | Dims | Pass Rate | Avg Score | Notes |\n|:------|:-----|:----------|:----------|:------|\n| **qwen3-embedding-0.6b** | 1024 | 18/18 | 0.652 | Recommended |\n| bge-m3 | 1024 | 18/18 | 0.575 | Fast, solid all-rounder |\n| mxbai-embed-large-v1 | 1024 | 17/18 | 0.648 | Close but 1 failure |\n\n**Reranker** (8 tested, 180 lessons / 33 queries):\n\n| Model | Type | Pass Rate | Latency | Notes |\n|:------|:-----|:----------|:--------|:------|\n| **qwen3-4b-instruct-ranker** | generative | 85% | 1.8s | Recommended — no thinking overhead |\n| qwen.qwen3-reranker-4b | generative | 85% | 1.9s | Thinking mode, same accuracy |\n| rank_zephyr_7b | generative | 82% | ~2s | RankGPT format |\n| (no rerank) | — | 76% | 99ms | Baseline |\n\n**Distillation** (6 tested — chat model for `reflect`/`compress`/summarize; [full benchmark](docs/benchmarks/2026-05-15-distillation-model-benchmark.md)):\n\n| Model | Reasoning | Speed | Notes |\n|:------|:----------|:------|:------|\n| **ibm/granite-4-h-tiny** | No | in-stack `add_lesson` ~5.6s | Recommended — 0 reasoning tokens, ~100K context (max 1M) |\n| microsoft/phi-4 | No | in-stack `add_lesson` ~3.7s | Faster, but only a 16K context window |\n| mistral-nemo-instruct-2407 | No | non-reasoning | Viable alternative, 128K context |\n| qwen3.5-9b | Yes | — | Reasoning cannot be disabled via the API |\n| deepseek-r1-distill-qwen-32b | Yes | ~5 tok/s | Non-thinking is possible (32B) but too slow |\n| nvidia/nemotron-3-nano | Yes | ~25-35s/call | Previous default — chain-of-thought overhead |\n\n> **Note:** Code search uses ripgrep/FTS (deterministic), not embeddings. Cross-encoder rerankers (bge-reranker, gte-reranker) don't work via LM Studio — they need a dedicated `/v1/rerank` API.\n\n---\n\n## Roadmap\n\n> For the **strategic five-phase arc** (Memory → Eval → Governance → Benchmark → Runtime Enforcement) and its DLF lineage, see [ROADMAP.md](ROADMAP.md). The list below is the **sprint-level history** mapped to the strategic phases.\n\n**Completed:**\n- [x] **Phase 1-2**: Core MVP — Lessons, Search, Guardrails\n- [x] **Phase 3**: Knowledge Distillation & Reflection\n- [x] **Phase 4**: Knowledge Graph (Neo4j, symbol-level)\n- [x] **Phase 5**: Git Intelligence & Automation\n- [x] **Phase 6**: Retrieval Quality Tuning & Tiered Search\n- [x] **Phase 7**: Interactive GUI & Human-in-the-Loop\n  - 23 pages, 105 REST endpoints, 45 MCP tools, 41 migrations\n  - Dashboard, Chat, Lessons, Review Inbox, Analytics, Documents, Guardrails, Settings, and more\n- [x] **Phase 8**: Advanced HITL\n  - Access control (API keys with roles), custom lesson types, rich content editor, agent audit trail, feature toggles\n- [x] **Phase 8D/E**: Polish & Testing\n  - Feature toggles BE, role enforcement middleware, layout fixes (viewport scroll, page sizing)\n  - E2E test suite: 198 tests (API smoke 75, GUI smoke 23, MCP smoke 36, API scenarios 34, GUI scenarios 21, Agent visual 9)\n- [x] **Phase 9**: Multi-Project UX Redesign\n  - \"All Projects\" first-class mode with project selector V2 (multi-select, checkboxes)\n  - ProjectBadge on all 23 pages, cross-project data on 8 pages (Dashboard, Lessons, Guardrails, Review, Analytics, Jobs, Activity, Agents)\n  - Per-project guards on 4 pages (Graph Explorer, Code Search, Sources, Settings)\n  - 6 backend services extended with `project_ids[]`, 9 `*Multi` API methods\n  - 11 sprints, 26 commits, 41 files changed\n- [x] **Phase 10**: Multi-Format Extraction Pipeline\n  - Fast text (pdf-parse + mammoth), Quality text (pdftotext + pandoc), Vision (LLM via OpenAI-compatible API with per-page async jobs, progress reporting, cancel)\n  - Chunking + pgvector embeddings with hierarchical/naive strategies, table/code/mermaid detection\n  - Hybrid semantic + FTS chunk search across 4 surfaces: REST endpoint, Cmd+K global search, chat `search_documents` tool, MCP `search_document_chunks` tool\n  - Chunk edit/delete with optimistic locking + re-embed; bulk vision re-extract\n  - Image upload UX (drag-drop + thumbnail preview + auto-Vision preselect)\n  - Mermaid diagram rendering everywhere MarkdownContent is used\n  - SSRF-hardened URL ingestion (private-range DNS check, redirect re-validation, streaming size cap)\n  - 7 sprints, 7 migrations, 47-test E2E suite incl real vision runs\n- [x] **Phase 11**: Knowledge Portability\n  - Zip+JSONL bundle format with sha256 per entry — streaming encoder/decoder\n  - Full project export (`GET /api/projects/:id/export`) via pg-cursor\n  - Full project import (`POST /api/projects/:id/import`) with 3 conflict policies (skip/overwrite/fail) + dry-run + cross-tenant UUID guard\n  - GUI Knowledge Exchange panel embedded in Project Settings (drag-drop + Preview + Apply)\n  - Cross-instance pull (`POST /api/projects/:id/pull-from`) with DNS-rebinding pinning + slow-loris body-stall defense\n  - Streaming JSONL decode (~99% jsonl peak memory reduction) + streaming base64 encode on import (~45% PDF peak reduction)\n  - Batched SELECT on import (~99% SELECT-count reduction)\n  - 9 sub-sprints, 61 API e2e + 1 GUI Playwright + 39 unit tests, all through v2.2 12-phase workflow with `/review-impl`\n- [x] **Phase 12**: RAG Quality Measurement & Rerank Optimization\n  - Retrieval measurement infrastructure: recall@k, MRR, latency budgets, golden-set harness\n  - 8 reranker models benchmarked; `qwen3-4b-instruct-ranker` recommended (+9% accuracy at 180 lessons, 1.8s latency)\n  - Rerank arc integrated into tiered search pipeline with configurable model + fallback\n  - 7 sprints\n- [x] **Phase 13**: Multi-Agent Coordination Protocol\n  - Artifact ownership / leasing with TTL + fencing tokens + abandoned-claim sweep\n  - `pending-review` lesson lifecycle state + Review Request queue\n  - Taxonomy profiles (unified with `lesson_types`); Dead Light Framework reference profile shipped\n  - 19-bug post-hoc review fully cleared; 7 sprints\n- [x] **Phase 14**: Global Embedding & Distillation Model Swap\n  - Embeddings: mxbai-large → bge-m3 (8192-token context, resolved silent 512-token truncation)\n  - Distillation: qwen-coder → nemotron-3-nano (later switched to ibm/granite-4-h-tiny per current benchmark)\n  - All projects re-embedded in place\n- [x] **Phase 15**: Multi-Actor Coordination Protocol\n  - Coordination substrate: durable append-only event log, Topic / Actor / participant model\n  - The Board: tasks with dependency gating, derived-identity artifacts, claims with fencing\n  - Request / Approval: multi-level routing, unilateral and collective procedures\n  - Collective Decision: motions, votes, tally, veto, quorum\n  - Intake mailbox, dispute resolution, 3-phase topic-close drain\n  - Primitive-outcome chaining, multi-tier collective routing\n  - Authorization model: non-owner level-grant, owner permanence, 3 HARD pre-prod triggers\n  - End-to-end tenant-scope enforcement; 12 sprints (15.1–15.12), migrations 0050–0063\n- [x] **DEFERRED-029**: MCP Tenant-Scope Enforcement\n  - `CallerScope` threaded through ~115 service functions across 8 domain PRs\n  - Scoped MCP token model via `api_keys.project_scope`; legacy `CONTEXT_HUB_WORKSPACE_TOKEN` retired\n  - 5 adversary review passes (4 static + 1 live hardened-mode) found 7 bypasses (2 CRITICAL / 4 HIGH / 1 MED), all fixed before merge\n  - 843 unit + 300 E2E tests green; 10 stacked PRs (#20–#29) + 1 orthogonal test-fix (#30)\n\n**In Progress:**\n- [ ] **Phase 16**: Production-Ready RAG with Generation-Quality Evaluation *(separate branch)*\n  - 152-row gen-eval dataset (127 retrieval queries + 25 hand-curated edge cases)\n  - Ragas judge sidecar (Python / FastAPI) running `google/gemma-4-26b-a4b-it`\n  - Metrics: faithfulness, answer_relevancy, context_precision, context_recall, refusal_correctness, groundedness_self_eval\n  - Threshold gates in WARN mode until 2 weeks of baseline variance data, then flip to BLOCK\n- [ ] **Phase 17**: Anti-Hallucination Experiments *(separate branch)*\n  - Citation-forced prompt templates, selective abstention\n  - Chain-of-Verification synthesizer\n  - `groundedness_self_eval` metric for model-side grounding check\n\n**Planned (no detailed design yet):**\n- [ ] **Phase 18 — Governance Benchmark Suite**\n  - Catalog of governance scenarios across org topologies (flat / hierarchical / federated), conflict patterns (collaborative / adversarial / byzantine), and human + AI mixes\n  - Per-scenario success metrics: right outcome, right number of steps, right principals, auditability intact\n- [ ] **Phase 19 — Runtime Enforcement & Isolation**\n  - Pre-action policy engine that blocks agent behavior before it occurs\n  - Isolated environments for experimental / dangerous tasks\n  - Open design questions: policy DSL (DLF-native vs OPA Rego / Cedar), enforcement location (gateway / SDK / OS sandbox), cryptographic identity (DIDs vs scoped API keys), isolation primitive (container / VM / WASM / seccomp)\n\n**Intentionally Dropped:**\n- ~~Multi-Agent Passive Collection~~ — Parsing agent conversations costs tokens and captures noise. `add_lesson` captures verified conclusions explicitly.\n- ~~Session History Sharing~~ — Transcripts are 50k-200k tokens. The value is conclusions, not the journey.\n- ~~IDE Extension~~ — Agents use MCP (done). Humans use the web GUI — works in any browser including VS Code's built-in browser.\n\n---\n\n## Project Stats\n\n| Metric | Count |\n|:-------|:------|\n| MCP Tools | 45+ |\n| REST Endpoints | 105+ |\n| GUI Pages | 23 |\n| Database Migrations | 63 |\n| Unit Tests | 843 |\n| E2E Tests | 300 (api 128 + gui 52 + smoke 111 + agent 9) |\n| Sprint Phases | **15 complete + DEFERRED-029 · Phase 16/17 active on separate branches** |\n| Strategic Arc | **Phase 1 shipped · Phase 2 + Phase 3 in progress · Phase 4 + Phase 5 planned** ([ROADMAP.md](ROADMAP.md)) |\n\n---\n\n## Contributing\n\nContributions are welcome! This is a solo project that grew into something useful — fresh eyes and ideas are appreciated.\n\n1. Fork the repo\n2. Create a feature branch (`git checkout -b feature/my-feature`)\n3. Make your changes\n4. Run `npm run smoke-test` to verify\n5. Submit a pull request\n\nPlease open an issue first for large changes so we can discuss the approach.\n\n---\n\n## Troubleshooting\n\n- **`Unauthorized: invalid workspace_token`**: Set `MCP_AUTH_ENABLED=false` in `.env` or provide the correct token.\n- **`dimension mismatch`**: Ensure `EMBEDDINGS_DIM=1024` matches your model's output.\n- **`401 Unauthorized` (LM Studio)**: Check `EMBEDDINGS_API_KEY` in your `.env`.\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE) for details.\n\n[Roadmap](ROADMAP.md) | [Whitepaper](WHITEPAPER.md) | [Quickstart Guide](docs/QUICKSTART.md) | [Knowledge Exchange Reference](docs/references/knowledge-exchange.md)\n"}