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., "@KnowledgeMCPsearch for security best practices in the aws-docs context"
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.
MCP Knowledge Server
A Model Context Protocol (MCP) server that enables AI coding assistants and agentic tools to leverage local knowledge through semantic search.
Status: ✅ Fully Operational - All user stories implemented and verified
Features
✅ Semantic Search: Natural language queries over your document collection
✅ Multi-Context Support: Organize documents into separate contexts for focused search
✅ Multi-Format Support: PDF, DOCX, PPTX, XLSX, HTML, and images (JPG, PNG, SVG)
✅ Smart OCR: Automatically detects scan-only PDFs and applies OCR when needed
✅ Async Processing: Background indexing with progress tracking
✅ Persistent Storage: ChromaDB vector store with reliable document removal
✅ HTTP & Stdio Transports: Compatible with GitHub Copilot CLI and Claude Desktop
✅ MCP Integration: Compatible with Claude Desktop, GitHub Copilot, and other MCP clients
✅ Local & Private: All processing happens locally, no data leaves your system
Multi-Context Organization
Organize your documents into separate contexts for better organization and focused search results.
What are Contexts?
Contexts are isolated knowledge domains that let you:
Organize by Topic: Separate AWS docs from healthcare docs from project-specific docs
Search Efficiently: Search within a specific context for faster, more relevant results
Multi-Domain Documents: Add the same document to multiple contexts
Flexible Organization: Each context is a separate ChromaDB collection
Creating and Using Contexts
MCP Context Tools
Default Context
All documents without a specified context go to the "default" context automatically. This ensures backward compatibility with existing workflows.
Smart OCR Processing
The server includes intelligent OCR capabilities that automatically detect when OCR is needed:
Automatic OCR Detection
The system analyzes extracted text quality and automatically applies OCR when:
Extracted text is less than 100 characters (likely a scan)
Text has less than 70% alphanumeric characters (gibberish/encoding issues)
Force OCR Mode
You can force OCR processing even when text extraction is available:
OCR Requirements
For OCR functionality, install Tesseract OCR:
OCR Configuration
Configure OCR behavior in config.yaml:
Processing Method Tracking
All documents include metadata showing how they were processed:
text_extraction: Standard text extractionocr: OCR processing was usedimage_analysis: Image-only documents
Check processing method in document metadata:
Quick Start
Prerequisites
Python 3.11+ or Python 3.12
Tesseract OCR (optional, for scanned documents)
Automated Setup
This will:
✅ Create virtual environment
✅ Install dependencies
✅ Download embedding model
✅ Run end-to-end demo
✅ Show next steps
Manual Installation
Basic Usage
Running the MCP Server
The server script provides:
✅ Background process management
✅ PID file tracking
✅ Log file management
✅ Status checking
✅ Graceful shutdown
Running Tests
MCP Tools Available
The server exposes 11 MCP tools for AI assistants:
Document Management
knowledge-add: Add documents to knowledge base (with optional context assignment)
knowledge-search: Semantic search with natural language queries (context-aware)
knowledge-show: List all documents (filterable by context)
knowledge-remove: Remove specific documents
knowledge-clear: Clear entire knowledge base
knowledge-status: Get statistics and health status
knowledge-task-status: Check async processing task status
Context Management
knowledge-context-create: Create a new context for organizing documents
knowledge-context-list: List all contexts with statistics
knowledge-context-show: Show details of a specific context
knowledge-context-delete: Delete a context (documents remain in other contexts)
Configuration
The server is configured via config.yaml in the project root. A default configuration is provided.
Configuration File
Custom Configuration
Create a custom configuration file:
Environment Variables
Configuration can be overridden with environment variables (prefix with KNOWLEDGE_):
Configuration Priority
Environment variables (highest priority)
config.yaml.local(if exists)config.yaml(default)
Key Settings
Setting | Description | Default | Notes |
| Characters per chunk | 500 | Larger = more context |
| Embeddings per batch | 32 | Higher = faster, more RAM |
| Computation device | cpu | Use 'cuda' for GPU |
| Max file size | 100 | Increase for large docs |
| Logging verbosity | INFO | Use DEBUG for development |
| ChromaDB collection prefix | knowledge_ | Used for context collections |
| Default context name | default | Backward compatibility |
Integration with AI Assistants
Claude Desktop
Add to claude_desktop_config.json:
Note: Claude Desktop uses stdio transport. The server automatically detects the transport mode.
GitHub Copilot CLI
The server exposes an HTTP endpoint for Copilot CLI integration using MCP Streamable HTTP.
Step 1: Start the server
Step 2: Configure Copilot CLI
Add to ~/.copilot/mcp-config.json:
Step 3: Verify integration
In Copilot CLI, the following tools will be available:
knowledge-add- Add documents to knowledge baseknowledge-search- Search with natural language queriesknowledge-show- List all documentsknowledge-remove- Remove documentsknowledge-clear- Clear knowledge baseknowledge-status- Get statisticsknowledge-task-status- Check processing status
Example usage in Copilot CLI:
Architecture
Vector Database: ChromaDB for semantic search with persistent storage
Embedding Model: all-MiniLM-L6-v2 (384 dimensions, fast inference)
OCR Engine: Tesseract for scanned documents
Protocol: MCP over HTTP (Streamable HTTP) and stdio transports
Server Framework: FastMCP for HTTP endpoint management
Performance
Verified performance on standard hardware (4-core CPU, 8GB RAM):
Indexing: Documents processed in <1s (HTML), up to 30s (large PDFs)
Search: <200ms for knowledge bases with dozens of documents
Memory: <500MB baseline, scales with document count
Embeddings: Batch processing, model cached locally
Project Structure
Key Scripts
server.sh- Start/stop/status managementquickstart.sh- Automated setup and demotests/e2e_demo.py- Full system demonstration
Documentation
Changelog - Version history and recent changes
Implementation Progress - Detailed progress report
Configuration Guide - Complete configuration reference
Server Management - Server lifecycle management
Specification - Feature specification
Implementation Plan - Technical plan
Tasks - Task breakdown
Quickstart Guide - Detailed usage guide
MCP Tool Contracts - API specifications
Development
Code Quality
Adding New Document Processors
Create processor in
src/processors/Inherit from
BaseProcessorImplement
extract_text()andextract_metadata()Register in
TextExtractor
Verified User Stories
✅ US1: Add Knowledge from Documents
Multi-format document ingestion
Intelligent text extraction vs OCR
Async processing with progress tracking
Multi-context assignment
✅ US2: Search Knowledge Semantically
Natural language queries
Relevance-ranked results
Fast semantic search
Context-scoped and cross-context search
✅ US3: Manage Knowledge Base
List all documents
Remove specific documents
Clear knowledge base
View statistics
Context filtering
✅ US4: Integrate with AI Tools via MCP
11 MCP tools implemented (7 document + 4 context tools)
JSON-RPC compatible
Ready for AI assistant integration
✅ US5: Multi-Context Organization
Create and manage contexts
Add documents to multiple contexts
Search within specific contexts
Context isolation with separate ChromaDB collections
License
MIT
Contributing
Contributions welcome! Please read the specification and implementation plan before submitting PRs.
Support
Issues: GitHub Issues
Documentation: See
docs/andspecs/directoriesQuestions: Check quickstart guide and API contracts
Built with: Python, ChromaDB, Sentence Transformers, FastAPI, MCP SDK