Notes RAG MCP Server
Provides semantic search over Obsidian markdown notes, supporting tags, categories, and incremental indexing.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ContextCortex (v2.28.2)
ContextCortex is a multi-repository Model Context Protocol (MCP) server providing syntax-aware Code RAG, Hybrid Retrieval (Dense + BM25), Tree-sitter AST chunking, Pluggable Dual-Engine Storage (PostgreSQL 16 + pgvector & SQLite), MCP 2026-07-28 OAuth 2.1 + 3-Tier RBAC, and Universal Git Provider indexing with an integrated Web Admin Dashboard.
Overview | Git Repositories |
|
|
Codebase Navigator | Search & Inspector |
|
|
Files & Storage | Settings |
|
|
Diagnostics & Logs | Add Repository Modal |
|
|
Deep Ocean (Dark Default) | Midnight Blue (Dark Space) |
|
|
Petrol spruce | Obsidian navy |
Lavender Haze (Light Purple) | Amber Warmth (Light Sandstone) |
:---: | :---: |
|
|
Lilac canvas | Sandstone |
🌟 Key Features
Pluggable Dual-Engine Storage:
PostgreSQL 16 + pgvector: Production profile with
vector(384)HNSW cosine indexing,tsvectorGIN full-text search, andpsycopg3pooling.SQLite + Qdrant: Zero-configuration embedded profile with WAL journaling (
15000msbusy timeout) and embedded or remote Qdrant RRF fusion.Live Vector Backend Switching: Test and switch vector backends (
pgvector<->Qdrant) from the Settings UI or REST API without restarts.
MCP 2026-07-28 OAuth 2.1 & 3-Tier RBAC:
RFC 9728 Discovery: Exposes
/.well-known/oauth-protected-resourcefor OAuth resource indicators and scopes.JWT/OIDC & API Keys: Validates RS256/ES256 bearer tokens via JWKS and SHA-256 hashed
cc_...API keys acrossadmin,editor, andviewerroles (AUTH_ENABLED=falseenables local dev bypass).
FastMCP 2.0 Dual Transports: Exposes SSE (
/sse+/messages/) and Streamable HTTP (/mcp) with bounded JSON pagination across all tools and resources.Universal Git Provider Indexing:
Supports GitHub, GitLab, Gitea/Forgejo, Bitbucket, Generic HTTP/HTTPS, and SSH (
git@.../ssh://...) with a 4-tier credential hierarchy.Shallow Clone & Commit Retention: Configure persistent
--depth 1clones (keep_shallow) for instant source navigation and retain0..50recent commits (retain_commits_count) for the Web UI and/admin/api/repos/{name}/commitsendpoint.
Multi-Language AST & Forensic Intelligence:
Extracts AST symbols, call graphs, and HTTP routes across Python, TypeScript/JS/TSX, C#, COBOL, Go, Rust, Java, and C/C++.
Provides multi-repo regex/literal
grep_code, stack-tracediagnose_issuetriage, cross-repo HTTPtrace_path, and vector-chunkread_filereconstruction.
Managed Local Storage & Enterprise Private-CA Support:
Upload, replace, preview, read, and delete files in
LOCAL_STORAGE_PATHwith immediate incremental indexing and path-traversal protection.Bootstraps private CA certificates (
certs/*.crt), custom OpenAI-compatible gateways (OPENAI_API_URL,LLM_EXTRA_HEADERS), and restricted-network mirror builds (docker-compose.enterprise.yml).
Related MCP server: mycelium
🛠️ MCP Tools, Resources & Prompts
See the full MCP Tools, Resources, and Pagination Reference for complete schemas, pagination conventions, tool parameter bounds, resource templates, and workflow prompts.
Tools & RBAC Permissions (10 Default Tools + Optional manage)
By default, ContextCortex registers 10 read/search/code-mode tools (including execute_script) so the entire tool surface fits on Page 1 in MCP clients. Set MCP_ENABLE_WRITE_TOOLS=true to also expose the gated manage admin/write tool (11 tools total).
Tool | Role | Key Parameters & Bounds | Description |
|
|
| Hybrid semantic + BM25 search across AST code chunks and docs/runbooks/ADRs/PDFs. |
|
|
| Literal/regex search with AST attribution; truncates lines |
|
|
| Forensic triage: a ranked call chain with evidence lines to the likely fault, plus stack frames, routes, and semantic candidates. |
|
|
| Deterministic exact or substring AST symbol lookup without broad token scans. |
|
|
| Reads bounded 1-based line slices ( |
|
|
| Traverses AST callers/callees and cross-repo HTTP route/client boundaries via BFS. |
|
|
| Discovers HTTP route handlers ( |
|
|
| Synthesizes language distribution, manifests, entry points, modules, hub symbols, and ADRs. |
|
|
| Lists Git repos, local paths, and storage inventory, with optional paginated files or index health status. |
|
|
| Code Mode: one sandboxed JavaScript script chains several tool calls and returns only the final result (limits: |
|
|
| Exposed only when |
Resources & Paginated Resource Templates
Resource URI / Template | MIME Type | Pagination / Scope | Description |
|
| Compact ( | Global catalog summary plus |
|
| Single | TypeScript declarations of every tool that an |
|
| Per-repo | Status, commit SHA, language breakdown, symbol/route/ADR counts, and sub-resource URIs. |
|
| Per-repo | Synthesized architecture overview (manifests, entry points, modules, hub symbols). |
|
|
| 1-indexed paginated file inventory ( |
|
|
| 1-indexed paginated API routes ( |
|
| Per-repo | Architecture Decision Records registered for |
Workflow Prompts (5 Prompts)
Prompt Name | Arguments | Description |
|
| Guided workflow across |
|
| Locates symbol definitions, AST outlines ( |
|
| Maps architecture, HTTP routes ( |
|
| Diagnoses stack traces or failing routes down to root-cause lines. |
|
| Evaluates blast radius across internal callers, cross-repo API clients ( |
⚙️ Environment Variables
Variable | Description | Default |
| SQLAlchemy URL ( |
|
| PostgreSQL container credentials ( |
|
| Level for the |
|
| Managed local storage root for direct uploads and incremental indexing |
|
| Enable MCP 2026-07-28 OAuth 2.1 and API Key RBAC |
|
| OIDC Issuer URL and optional custom JWKS URI override |
|
| RFC 8707 / RFC 9728 OAuth Resource Indicator |
|
| Bootstrap admin API key on container startup |
|
| Expose the |
|
| Vector backend ( |
|
| Vector mode ( |
|
| Active vector collection name |
|
| Remote Qdrant URL or embedded storage path |
|
| OpenAI-compatible gateway base URL and Bearer key |
|
| JSON object of custom HTTP headers sent to the AI gateway |
|
| Directory of private |
|
| Optional global Personal Access Tokens for private Git hosts |
|
| Persistent SQLite database path when |
|
| Markdown chunk limit, AST code function/symbol chunk limit, and overlap window |
|
🚀 Three Ways to Deploy ContextCortex
Deployment Mode | Relational Metadata DB | Vector Store | Best For |
1. Docker Compose (Recommended) | PostgreSQL 16 (or SQLite) |
| Production, homelab, and enterprise containers ( |
2. Windows Portable Bundle | Embedded PostgreSQL 16 | Embedded | Zero-admin Windows workstations ( |
3. Local Python ( | SQLite (or external Postgres) | Embedded Qdrant | Local development and lightweight CLI/MCP workflows |
Mode 1: Docker Compose (Recommended)
git clone git@github.com:spelech/contextcortex.git
cd contextcortex
cp .env.example .env
docker compose up -dSub-Configuration | Relational DB ( | Vector Store | Configuration |
1A. PostgreSQL 16 + |
|
| Default in |
1B. PostgreSQL + Remote Qdrant |
|
| Set |
1C. PostgreSQL + Embedded Qdrant |
|
| Stores vectors on |
1D. Single-Container SQLite + Qdrant |
|
| Use |
Open http://localhost:3000/admin/ -> Settings -> AI & Model Gateway to test OPENAI_API_URL and select your Embedding, Chat, and Vision OCR models. For corporate TLS proxies, private CAs (certs/*.crt), and internal package mirrors, see Restricted-Network Builds & Enterprise Deployment:
docker compose -f docker-compose.yml -f docker-compose.enterprise.yml up -d --buildMode 2: Windows Standalone Portable Deployment
Packages a frozen contextcortex.exe, user-space PostgreSQL 16, pre-compiled pgvector, private CA loader, and React Dashboard into dist\contextcortex-windows-x64:
.\scripts\build_portable_windows.ps1
.\dist\contextcortex-windows-x64\start-contextcortex.batSet PORTABLE_POSTGRES_ENABLED=true (default 127.0.0.1:54329 + pgvector) or PORTABLE_POSTGRES_ENABLED=false with VECTOR_STORE_PROVIDER=qdrant in dist\contextcortex-windows-x64\.env.
Mode 3: Local Python (venv)
Requires Python 3.11+, Node.js 20+, and Git:
git clone git@github.com:spelech/contextcortex.git
cd contextcortex
./setup.sh # Windows PowerShell: .\setup.ps1
source venv/bin/activate
python3 main.pyDefault endpoints on port 3000:
Web Dashboard:
http://localhost:3000/admin/MCP Streamable HTTP / SSE:
http://localhost:3000/mcpandhttp://localhost:3000/sseOAuth Metadata & Health:
http://localhost:3000/.well-known/oauth-protected-resource,/health,/ready
📡 Connecting MCP Clients
Configure Cursor, VS Code, Antigravity CLI, Claude Desktop, or Windsurf via Streamable HTTP (/mcp) or SSE (/sse):
{
"mcpServers": {
"contextcortex": {
"url": "http://localhost:3000/mcp",
"headers": {
"Authorization": "Bearer cc_live_your_api_key_here"
}
}
}
}(Omit headers when running locally with AUTH_ENABLED=false.)
🌐 REST Administration APIs & OAuth 2.1
All /admin/api/* routes enforce RBAC (viewer, editor, admin):
Endpoint Group | Routes | Role | Purpose |
Navigator |
|
| File hierarchy, AST outlines, and caller/callee impact graphs. |
Local Storage |
|
| Upload, replace, delete, read, and browse managed storage files. |
Ingestion Catalog |
|
| Multi-source inventory across Git repos, watched paths, and storage. |
API Keys |
|
| Issue scoped |
# Discover RFC 9728 OAuth metadata
curl http://localhost:3000/.well-known/oauth-protected-resource
# Issue a Viewer API key
curl -X POST http://localhost:3000/admin/api/auth/keys \
-H "Authorization: Bearer cc_admin_key" -H "Content-Type: application/json" \
-d '{"name": "Agent Viewer Key", "role": "viewer"}'📚 Documentation & Verification
Interactive Documentation Site (VitePress) (
npm run docs:dev/npm run docs:build)MCP Tools, Resources, and Pagination Reference (
docs/mcp-tools-and-resources.md)Benchmarks & Performance Baselines (
docs/reference/benchmarks.md) (benchmarks/README.md)Restricted-Network & Enterprise Builds (
docs/guide/enterprise-build.md)Software Requirements (
REQUIREMENTS.md) | Architecture (ARCHITECTURE.md) | Developer Docs (DEVELOPER_DOCS.md) | Test Coverage (docs/TEST_COVERAGE.md)
# Backend Pytest Suite
pytest -v --cov=app
# Frontend Unit (Vitest) & E2E (Playwright) Suites
cd frontend && npm run test && npx playwright test
# Isolated MCP Schema, Latency & OpenCode A/B Benchmarks (uses :18021)
./benchmarks/setup_and_run_server.sh start
python3 benchmarks/measure_tool_schemas.py
python3 benchmarks/run_micro_bench.py --runs 3
python3 -u benchmarks/run_benchmark.py --tasks-file benchmarks/examples/custom_tasks.example.json
./benchmarks/setup_and_run_server.sh stopTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Linked markdown notes as memory for AI apps: search, read, save and link notes over MCP.
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables managing and searching markdown notes with semantic search, question answering, and note generation, and provides an MCP server for GitHub Copilot integration.4-
- AlicenseNot gradedqualityCmaintenanceProvides MCP tools for semantic search over personal knowledge sources using pluggable embeddings and local vector indexing.1MIT
- AlicenseNot gradedqualityBmaintenanceProvides hybrid search (BM25 + vector) and staleness reporting for local markdown notes, exposing search and indexing tools to AI assistants via MCP.8 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables semantic and full-text search over markdown notes, with tools to create, edit, move, and delete notes, all through MCP. Runs entirely locally using Ollama for embeddings and SQLite for storage, working with Obsidian or standalone.MIT











