Notes RAG MCP Server
Provides semantic search over Obsidian markdown notes, supporting tags, categories, and incremental indexing.
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., "@Notes RAG MCP Serversearch my notes about MCP integration"
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.
ContextCortex (v2.7.0)
A high-performance, multi-repo Model Context Protocol (MCP) server providing syntax-aware Code RAG, Hybrid Retrieval (Dense + BM25), Tree-sitter AST chunking, Multi-Vector Database Backends (Qdrant & ChromaDB), and Universal Git Provider indexing with an integrated Web Admin Dashboard (ContextCortex) and real-time Diagnostic Observability.

๐ Key Features
FastMCP 2.0 Native Architecture: Built on the official Model Context Protocol Python SDK 2.0.0+ (
FastMCP), supporting modern decorator patterns, typed schemas, dynamic catalog resources, and custom agent prompts.Dual MCP Transports:
Server-Sent Events (SSE): Full streaming events at
/ssewith POST message routing at/messages/.Streamable HTTP: Bidirectional JSON-RPC transport endpoint at
/mcp.
Multi-Vector Database Backends:
Qdrant: High-scale vector engine supporting dense + sparse BM25 multi-vectors with Reciprocal Rank Fusion (RRF) in both embedded disk and remote server modes.
ChromaDB: Lightweight, zero-dependency embedded disk or remote vector store with automatic fallback.
Dynamic Backend Switching: Test and switch vector backends live from the Settings UI or REST API without server restarts.
Universal Git Provider Support:
Ingest repositories from any source where Git lives: GitHub, GitLab (Cloud, Enterprise & Self-Hosted), Gitea & Forgejo, Bitbucket (Cloud & Server), and Generic Git HTTP/HTTPS.
Provider-Aware Permalinks: Automatically generates exact deep-links for code results (
/blob/,/-/blob/,/src/branch/,/src/commit/,/src/#lines-).Custom Git Host Credential Vault: Register per-host tokens and authentication types for private internal domains (e.g.
gitlab.company.internalorhttp://git.lan:3000).
AST-Aware Code Chunking (Tree-sitter): Understands syntax structures across Python, TypeScript/JavaScript, Go, Rust, C#, C++, Java, Ruby, PHP, and more. Chunks along class, method, and function boundaries with exact line numbers and symbol names.
Ephemeral Repository Ingestion: The server performs authenticated shallow clones (
--depth 1), extracts AST symbols and hybrid vectors, and immediately removes the cloned repository from disk to conserve storage.Multi-Tier Git Authentication Hierarchy:
Per-repository override token & optional username.
Domain-level Custom Git Host Vault (
git_host_credentials).Global provider tokens (
GITHUB_TOKEN,GITLAB_TOKEN,GITEA_TOKENin DB or Settings UI).Environment variable fallback.
Fast Deterministic Symbol Lookup: Built-in SQLite symbol table (
ast_symbols) powers instantaneous symbol searches (find_symbol) and file outlines (get_file_outline) without token bloat.Diagnostic Logging & Observability: In-memory ring buffer (500 events) capturing server warnings, errors, indexing lifecycle events, and expandable stack traces with a REST API (
/admin/api/logs).Modern Tabbed Web Dashboard (
/admin/) - ContextCortex Dashboard:Overview: Real-time stats, vector counts, AST symbols, model specs, topic tag cloud, and manual full reindexing trigger.
Git Repositories: Register repos across GitHub, GitLab, Gitea, Bitbucket, or Generic Git, trigger shallow clone syncs, inspect commit SHAs, and manage sources.
Local Paths: Monitor local workspaces and notes vaults with recursive directory scanning and filesystem browser modal.
Search & Inspector: Interactive live hybrid search tester with RRF score previews, target type toggle (Code vs Docs), and syntax highlighted results.
Settings: Vector Database manager (Qdrant & ChromaDB switcher & connection tester), multi-provider token cards, GitHub rate limit monitor, and interactive Custom Git Host Credential Vault table/modal.
Diagnostics & Logs: Real-time log viewer with level filtering (ALL, INFO, WARNING, ERROR, DEBUG), keyword search, traceback modal/drawer, and buffer clearing.
Related MCP server: localrag
๐ ๏ธ MCP Tools, Resources & Prompts
Tools
Tool | Parameters | Description |
|
| Hybrid semantic + BM25 code search. Returns code blocks with line ranges & clickable git permalinks. |
|
| Hybrid search across markdown documentation, system architecture, and runbooks. |
|
| Instant exact or prefix AST symbol lookup (functions, classes, structs, interfaces). |
|
| Returns the AST structure (classes, methods, signatures, lines) without full file token costs. |
| None | Lists all registered Git repositories and local paths with commit SHAs and indexing status. |
|
| Triggers background shallow clone sync for a specific repository or all sources. |
| None | Returns vector counts, collection status, embedding models, and GitHub rate limits. |
Resources
Resource URI | MIME Type | Description |
|
| Dynamic catalog of all indexed repositories, document distributions, and AST symbol totals. |
Prompts
Prompt Name | Arguments | Description |
|
| Guided agent workflow to retrieve system architecture, container port mappings, and reverse proxy configs. |
|
| Guided agent workflow to locate symbol definitions, class signatures, and implementations. |
โ๏ธ Environment Variables
Variable | Description | Default |
| Vector database backend ( |
|
| Vector store mode ( |
|
| Vector collection name |
|
| URL to remote Qdrant vector database |
|
| Embedded Qdrant disk directory |
|
| Embedded ChromaDB disk directory |
|
| Embedding engine ( |
|
| FastEmbed dense model name |
|
| FastEmbed sparse BM25 model name |
|
| Optional GitHub Personal Access Token for rate limits & private repos |
|
| Default path to the markdown documentation directory |
|
| Path to persistent SQLite cache database |
|
| Maximum character length per chunk |
|
| Character overlap between consecutive chunks |
|
๐ Running via Docker
Docker Compose
services:
contextcortex:
image: ghcr.io/spelech/contextcortex:latest
container_name: contextcortex
restart: unless-stopped
ports:
- "8021:3000"
environment:
- VECTOR_STORE_PROVIDER=qdrant
- EMBEDDING_PROVIDER=local
- EMBEDDING_MODEL=BAAI/bge-small-en-v1.5
- GITHUB_TOKEN=ghp_your_optional_token
- VAULT_PATH=/docs
volumes:
- /path/to/my/docs:/docs:ro
- ./data:/app/data๐ก Connecting MCP Clients
Connect any MCP client (VS Code, Cursor, Antigravity CLI, Claude Desktop, or Windsurf) using either Server-Sent Events (SSE) or Streamable HTTP.
Server-Sent Events (SSE) Configuration (claude_desktop_config.json / Cursor)
{
"mcpServers": {
"contextcortex": {
"url": "http://localhost:3000/sse"
}
}
}Streamable HTTP Configuration
{
"mcpServers": {
"contextcortex-http": {
"url": "http://localhost:3000/mcp"
}
}
}๐ Documentation & Specifications
Software Requirements Specification (
REQUIREMENTS.md): Authoritative functional and non-functional requirements with test-traceability matrix and Mermaid ERD data models.System Architecture (
ARCHITECTURE.md): FastMCP 2.0 transport topologies, component interaction diagrams, SQLite schema ERD, and vector store data models.Developer Documentation (
DEVELOPER_DOCS.md): Setup, configuration, development workflow, and testing guidelines.Test Coverage Reports (
docs/TEST_COVERAGE.md): Pytest, Vitest, and Playwright verification metrics.
๐งช Testing & Verification
Run the full automated test suites across backend and frontend:
# Python Backend Tests & Code Coverage
pytest -v --cov=app
# Frontend Unit & Component Tests (Vitest)
cd frontend && npm run test
# Frontend End-to-End Tests (Playwright)
cd frontend && npx playwright testThis 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 Servers
- Flicense-qualityDmaintenanceEnables managing and searching markdown notes with semantic search, question answering, and note generation, and provides an MCP server for GitHub Copilot integration.4
- Alicense-qualityCmaintenanceProvides a search_docs tool for MCP clients to perform local semantic search over indexed files using embeddings, enabling grounded answers from personal notes.MIT
- Alicense-qualityBmaintenanceIndexes local Markdown/text files into a SQLite database with vector embeddings and provides MCP tools for semantic search without cloud dependencies.GPL 3.0
- Alicense-qualityAmaintenanceProvides MCP tools for semantic search over personal knowledge sources using pluggable embeddings and local vector indexing.1MIT
Related MCP Connectors
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.
Agentic search over your Dewey document collections from any MCP-compatible client.
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/spelech/contextcortex'
If you have feedback or need assistance with the MCP directory API, please join our Discord server