MCP Documentation Server
Provides optional AI-powered document analysis and search using Google Gemini, enabled by setting GEMINI_API_KEY.
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., "@MCP Documentation Serversearch my documents for the API authentication setup"
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 Documentation Server
Local-first document management and semantic search for AI coding agents. No external databases, no cloud APIs, no vendor lock-in.
Unlike other MCP servers that are CLI-only, this one ships with a full web dashboard ā browse, search, upload, and manage your knowledge base from your browser. Every MCP tool is also exposed as a REST API, giving AI agents a lean, schema-free interface.
š Runs fully offline ā Orama vector DB with local AI embeddings (Transformers.js)
š Built-in Web UI ā starts automatically on port 3080 alongside the MCP server
š Hybrid search ā full-text + vector similarity with parent-child chunking
š¤ Optional AI search ā Google Gemini for advanced document analysis (bring your own key)
š Drag & drop uploads ā
.txt,.md,.pdfsupportš¦ Published on the MCP Registry ā installable via npx, no clone needed
Quick Start
{
"mcpServers": {
"documentation": {
"command": "npx",
"args": ["-y", "@Unity-Billal-mesloub/mcp-documentation-server"]
}
}
}š¤ Agent Skill (REST API) ā recommended for AI agents
Every MCP tool is also accessible via the REST API on ``. This is the recommended way to interact from AI agents (Claude Code, OpenCode, Gemini CLI, Cursor) because it avoids loading MCP tool schemas into the conversation context ā only the response JSON enters.
-H "Content-Type: application/json" \
-d '{"query": "your search", "limit": 5}'A ready-to-use skill is included at skills/documentation-server/SKILL.md ā it teaches your agent every endpoint with examples. Install it:
npx skills add https://github.com/Unity-Billal-mesloub/mcp-documentation-server --skill documentation-serverBasic workflow
Add documents using
add_documentor place.txt/.md/.pdffiles in the uploads folder and callprocess_uploads.Search across everything with
search_all_documents, or within a single document withsearch_documents.Use
get_context_windowto fetch neighboring chunks and give the LLM broader context.
Related MCP server: OpenLMlib
Web UI
The web interface starts automatically on port 3080 when the MCP server launches. From the web UI you can:
š Dashboard ā overview of all documents and stats
š Documents ā browse, view, and delete documents
ā Add Document ā create documents with title, content, and metadata
š Search All ā semantic search across all documents
šÆ Search in Doc ā search within a specific document
š¤ AI Search ā Gemini-powered analysis (if
GEMINI_API_KEYis set)š Upload Files ā drag & drop files and process them into the knowledge base
šŖ Context Window ā explore chunks around a specific index
Configure an MCP client
Minimal
{
"mcpServers": {
"documentation": {
"command": "npx",
"args": ["-y", "@Unity-Billal-mesloub/mcp-documentation-server"]
}
}
}With environment variables (all optional)
{
"mcpServers": {
"documentation": {
"command": "npx",
"args": ["-y", "@Unity-Billal-mesloub/mcp-documentation-server"],
"env": {
"MCP_BASE_DIR": "/path/to/workspace",
"GEMINI_API_KEY": "your-api-key-here",
"MCP_EMBEDDING_MODEL": "Xenova/all-MiniLM-L6-v2",
"START_WEB_UI": "true",
"WEB_HOST": "127.0.0.1",
"WEB_PORT": "3080"
}
}
}
}All environment variables are optional. Without GEMINI_API_KEY, only the local embedding-based search tools are available.
MCP Tools
The server registers the following tools (all validated with Zod schemas):
š Document Management
Tool | Description |
| Add a document (title, content, optional metadata) |
| List all documents with metadata and content preview |
| Retrieve the full content of a document by ID |
| Remove a document, its chunks, database entries, and associated files |
š File Processing
Tool | Description |
| Process all files in the uploads folder (chunking + embeddings) |
| Returns the absolute path to the uploads folder |
| Lists files in the uploads folder with size and format info |
| Returns the Web UI URL (e.g. http://localhost:3080) ā useful to open the dashboard or to locate the uploads folder from the browser |
š Search
Tool | Description |
| Semantic vector search within a specific document |
| Hybrid (full-text + vector) cross-document search |
| Returns a window of chunks around a given chunk index |
| š¤ AI-powered search using Gemini (requires |
Configuration
Configure via environment variables or a .env file in the project root:
Variable | Default | Description |
|
| Base directory for data storage |
|
| Embedding model name |
| ā | Google Gemini API key (enables |
|
| Enable/disable LRU embedding cache |
|
| Set to |
|
| Bind address for the web UI (use |
|
| Port for the web UI |
|
| Enable streaming reads for large files |
|
| Streaming buffer size in bytes (64KB) |
|
| Threshold to switch to streaming (10MB) |
Storage layout
~/.mcp-documentation-server/ # Or custom path via MCP_BASE_DIR
āāā data/
ā āāā orama-chunks.msp # Orama vector DB (child chunks + embeddings)
ā āāā orama-docs.msp # Orama document DB (full content + metadata)
ā āāā orama-parents.msp # Orama parent chunks DB (context sections)
ā āāā migration-complete.flag # Written after legacy JSON migration
ā āāā *.md # Markdown copies of documents
āāā uploads/ # Drop .txt, .md, .pdf files hereEmbedding Models
Set via MCP_EMBEDDING_MODEL:
Model | Dimensions | Notes |
| 384 | Default ā fast, good quality |
| 768 | Recommended ā best quality, multilingual |
Models are downloaded on first use (~80ā420 MB). The vector dimension is determined automatically from the provider.
ā ļø Important: Changing the embedding model requires re-adding all documents ā embeddings from different models are incompatible. The Orama database is recreated automatically when the dimension changes.
Architecture
Server (FastMCP, stdio)
āā Web UI (Express, port 3080)
ā āā REST API ā DocumentManager
āā MCP Tools
āā DocumentManager
āā OramaStore ā Orama vector DB (chunks DB + docs DB + parents DB), persistence, migration
āā IntelligentChunker ā Parent-child chunking (code, markdown, text, PDF)
āā EmbeddingProvider ā Local embeddings via @xenova/transformers
ā āā EmbeddingCache ā LRU in-memory cache
āā GeminiSearchService ā Optional AI search via Google GeminiOramaStore manages three Orama instances: one for document metadata/content, one for child chunks with vector embeddings, and one for parent chunks (context sections). All are persisted to binary files on disk and restored on startup.
IntelligentChunker implements the Parent-Child Chunking pattern: documents are first split into large parent chunks that preserve full context (sections, paragraphs), then each parent is further split into small child chunks for precise vector search. At query time, results are deduplicated by parent so that the LLM receives both the matched fragment and the broader context.
EmbeddingProvider lazily loads a Transformers.js model for local inference ā no API calls needed.
Development
git clone https://github.com/Unity-Billal-mesloub/mcp-documentation-server.git
cd mcp-documentation-server
npm installnpm run dev # FastMCP dev mode with hot reload
npm run build # TypeScript compilation
npm run inspect # FastMCP web UI for interactive tool testing
npm start # Direct tsx execution (MCP server + web UI)
npm run web # Run only the web UI (development)
npm run web:build # Run only the web UI (compiled)Contributing
Fork the repository
Create a feature branch:
git checkout -b feature/nameFollow Conventional Commits for messages
Open a pull request
Support
š Documentation
š Report Issues
š¬ MCP Community
š¤ Google AI Studio ā get a Gemini API key
Star History
This 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
- FlicenseNot gradedqualityBmaintenanceEnables any MCP-compatible AI assistant to search, filter, and retrieve information from a local document collection using a hybrid search pipeline with vector, BM25, reranking, and LLM enrichment.4
- AlicenseNot gradedqualityAmaintenanceProvides AI assistants with a local knowledge base and research library, enabling semantic and full-text retrieval, memory persistence, and multi-agent collaboration via 58 MCP tools.2MIT
- FlicenseNot gradedqualityDmaintenanceProvides tools for ingesting documents into a local vector database and retrieving relevant information via semantic search, enabling retrieval-augmented generation for MCP clients.6
- FlicenseAqualityBmaintenanceA local-first document retrieval engine that mounts as an MCP tool for agents to index files, search for relevant passages, and let the agent's own LLM answer.4
Related MCP Connectors
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
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/Unity-Billal-mesloub/mcp-documentation-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server