Project Memory MCP
Enables semantic search over a software project's Markdown and text documentation by indexing document chunks in Qdrant and exposing retrieval through MCP tools.
README
Project Memory MCP
Project Memory MCP is a small, local-first backend for semantic search over a software project's Markdown and text documentation. It indexes document chunks in Qdrant and exposes retrieval through a CLI and MCP tools. The server does not call an LLM; the MCP host uses the retrieved context to formulate its answer.
Architecture
HTTP, MCP, and CLI modules are thin entry adapters. The application services orchestrate document loading, chunking, embeddings, and vector storage through typed domain ports. Sentence Transformers and Qdrant remain isolated in infrastructure adapters.
Documentation
↓
Chunking
↓
Embeddings
↓
Qdrant
↑
MCP Search Tool
↑
AI Host
Markdown files are first split by their heading hierarchy and then by character count. Text files use character-based recursive splitting directly. Each chunk receives a stable SHA-256 ID and keeps its relative source path and Markdown section.
Requirements
- Python 3.12
- Docker with Docker Compose
Installation
Create and activate a virtual environment:
python -m venv .venv
Linux and macOS:
source .venv/bin/activate
Windows PowerShell:
.venv\Scripts\Activate.ps1
Install the direct runtime and development dependencies:
pip install -r requirements.txt
Copy the example configuration:
Linux and macOS:
cp .env.example .env
Windows PowerShell:
Copy-Item .env.example .env
Run Qdrant
docker compose up -d qdrant
Qdrant exposes HTTP on port 6333 and gRPC on port 6334. Its data is stored in the
named qdrant_storage volume.
Index sample documentation
The first run downloads the configured Sentence Transformers model.
python -m scripts.index_docs --path ./docs_sample
The command reports discovered files, created chunks, indexed files, and skipped files. Re-indexing replaces points for each processed path without deleting the whole collection.
Search from the CLI
python -m scripts.search_docs "Where are JWT tokens validated?" --top-k 5
Each result includes its cosine score, relative path, Markdown section, stable chunk ID, and text.
Run FastAPI
uvicorn app.api.main:app --reload
The current HTTP surface intentionally contains only:
GET /health
Run the MCP server
Open the server with MCP Inspector:
mcp dev mcp_server.py
The root module exports an MCP Python SDK v2 MCPServer named Project Memory MCP and
uses stdio safely: application logging is sent to stderr.
Available tools:
search_project_docs(query, top_k=5)searches the current project's indexed documentation and returns structured chunks.top_kmust be between 1 and 20.get_document(path)reads one UTF-8.mdor.txtdocument underDOCS_ROOT. Absolute paths, traversal outside that root, and unsupported file types are rejected.
Quality checks
pytest
ruff check .
docker compose config
Tests use fake embedding and vector-store implementations, so they do not need Qdrant or an embedding model download.
MVP limitations
- Only local
.mdand.txtfiles are supported. - Indexing is synchronous and manually triggered.
- Search is vector-only; there is no BM25, hybrid search, or reranking.
- There is no LLM call, generated answer, RAG prompt, authentication, multi-tenancy, background worker, GitHub integration, or web UI.
- The FastAPI application exposes health status only.
Possible next steps
- Reranking
- GitHub webhook and incremental indexing from webhook events
- Retrieval evaluation
- Hybrid search
- LangGraph query retry
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。