FastMCP server for document indexing and Git diff analysis with ChromaDB
Project description
Check Docs - FastMCP Document Indexing Server
A FastMCP server that uses ChromaDB for semantic document indexing and Git diff analysis to identify documentation that needs updates when code changes.
Features
- 📚 Document Indexing: Index markdown documentation with semantic search capabilities
- 🔍 Semantic Search: Search documentation using natural language queries
- 📝 Git Diff Analysis: Automatically identify documentation that needs updates based on code changes
- 🚀 Fast Embeddings: Uses Ollama's nomic-embed-text model for high-quality embeddings
- 💾 Persistent Storage: ChromaDB for reliable vector storage
Prerequisites
- Python 3.9+
- uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh
- Ollama with nomic-embed-text model
# Install Ollama (macOS) brew install ollama # Start Ollama service ollama serve # Pull the embedding model ollama pull nomic-embed-text
Quick Start
1. Clone and Setup
# Clone the repository
git clone <your-repo-url>
cd check_docs
# Install dependencies with uv
uv sync
# Activate the virtual environment
source .venv/bin/activate # On macOS/Linux
# or
.venv\Scripts\activate # On Windows
2. Configure Continue
Create a YAML configuration file at .continue/mcpServers/mcp-server.yaml:
name: Check Docs MCP server
version: 0.0.1
schema: v1
mcpServers:
- name: check_docs
command: uv
args:
- --directory
- /path/to/your/check_docs
- run
- python
- server.py
Replace /path/to/your/check_docs with your actual project path.
Usage Examples
Index Documentation
In Continue Agent, ask to index the example docs:
index_docs ./docs # or path to your docs folder
Search Documentation
Search through indexed documentation:
Search docs for "git integration"
Analyze Code Changes
Check which docs need updates based on code changes:
Check what documentation needs updating based on recent Git changes
Self-Documentation Check
Use the project on itself to ensure all features are documented:
-
First, index the project's own documentation:
index_docs ./ -
Then check if all code features are covered:
Check docs to see if all features in server.py are covered in the documentation
This will analyze the codebase and suggest any missing documentation for new features or tools.
For detailed information about available MCP tools, see available_tools.md.
Development
Running Tests
# Install dev dependencies
uv sync --dev
# Run tests
uv run pytest
Project Structure
check_docs/
├── server.py # Main FastMCP server implementation
├── pyproject.toml # Project configuration
├── README.md # This file
├── example.md # Implementation guide
├── chroma_db/ # ChromaDB storage (auto-created)
└── example_docs/ # Example documentation (optional)
Environment Variables
OLLAMA_HOST: Ollama API endpoint (default: http://localhost:11434)CHROMA_DB_PATH: ChromaDB storage path (default: ./chroma_db)
Architecture
The server uses:
- FastMCP for the MCP protocol implementation
- ChromaDB for vector storage and similarity search
- Ollama with nomic-embed-text for generating embeddings
- GitPython for repository analysis
- Pydantic for request/response validation
Troubleshooting
Ollama Connection Error
If you see "connection refused" errors:
# Check if Ollama is running
ollama list
# Start Ollama if needed
ollama serve
ChromaDB Persistence
The database is stored in ./chroma_db by default. To reset:
rm -rf chroma_db/
Memory Issues
For large documentation sets, you may need to:
- Increase chunk size to reduce total chunks
- Process files in batches
- Use a cloud ChromaDB instance
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests with
uv run pytest - Submit a pull request
License
MIT License - see LICENSE file for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file check_the_docs-0.1.0.tar.gz.
File metadata
- Download URL: check_the_docs-0.1.0.tar.gz
- Upload date:
- Size: 151.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15d7ee7e17835143ca4b9b35ecfbc4218f758fd4042b933880419d1c91cc879d
|
|
| MD5 |
aea4d4dfe2baff074b6f587e2932a1aa
|
|
| BLAKE2b-256 |
8b4fde7e81ae387c42e89d172fa7e1f507906f809188d5212132914bf2d689c1
|
File details
Details for the file check_the_docs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: check_the_docs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 162.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
487a5e708f2847099376097757dd03e9796eb9457a51ce2a146768327fc0ede9
|
|
| MD5 |
80e6ecb08de7476717676566fb968e17
|
|
| BLAKE2b-256 |
e0fd4cc4b960dc9afc216fedcb39d75de0780caef713af10069f1cdb208a5d4c
|