MC

MCP Server: AI Semantic Documentation Platform

Streamline documentation with MCP server: AI semantic search, Gemini integration, file uploads, smart chunking, multilingual support, zero-setup.

Quick Install
npx -y @andrea9293/mcp-documentation-server

Overview

MCP Server is a lightweight documentation platform that adds AI-powered semantic search and question answering to developer documentation and asset collections. It ingests files, splits them into smart, retrievable chunks, builds semantic embeddings, and exposes search/query endpoints so you can get precise, context-aware results across code, docs, and other knowledge artifacts.

The server is designed to be zero-setup for basic usage (running locally with a built-in vector store), but it also supports integration with external models (including Google Gemini) and optional external vector databases. It supports multilingual sources, file uploads, and configurable chunking strategies so teams can tailor relevance and performance to their content and infrastructure.

Features

  • Semantic search over uploaded files and documentation using embeddings
  • Optional Gemini (or other model) integration for improved QA and summarization
  • Zero-setup local mode with an embedded vector store for quick trials
  • File uploads: PDF, Markdown, code files, and common document formats
  • Smart chunking and overlap configuration to preserve context in long documents
  • Multilingual support for ingestion and query processing
  • REST API endpoints for upload, search, query, and document management
  • Docker-friendly and environment-driven configuration for deployment flexibility

Installation / Configuration

Clone the repository and install dependencies:

git clone https://github.com/andrea9293/mcp-documentation-server.git
cd mcp-documentation-server
# Use your preferred package manager
npm install
# or
pnpm install

Create a .env file (example shown below) to configure optional integrations and runtime parameters:

# .env
PORT=3000
STORAGE_PATH=./data
GEMINI_API_KEY=your_gemini_api_key_here    # optional: used for model-backed QA
VECTOR_DB=local                            # 'local' (default) or 'external'
CHUNK_SIZE=1000
CHUNK_OVERLAP=200
DEFAULT_LANGUAGE=en

Run the development server:

# dev mode
npm run dev

# production build + start
npm run build
npm start

Docker usage:

# build image
docker build -t mcp-server .

# run with environment variables
docker run -p 3000:3000 \
  -e PORT=3000 \
  -e GEMINI_API_KEY=your_gemini_api_key \
  -e STORAGE_PATH=/data \
  mcp-server

Environment variables summary:

VariablePurposeDefault
PORTHTTP port3000
STORAGE_PATHWhere documents and vector store are persisted./data
GEMINI_API_KEYOptional key to use Gemini model for QA(none)
VECTOR_DBVector backend: local or externallocal
CHUNK_SIZEMaximum tokens/characters per chunk1000
CHUNK_OVERLAPOverlap between consecutive chunks200
DEFAULT_LANGUAGEFallback language for processingen

Available Resources

Typical REST endpoints (examples — check the server’s /openapi or README for exact routes):

  • POST /upload — Upload files (multipart/form-data) for ingestion
  • GET /documents — List stored documents and metadata
  • GET /documents/:id — Retrieve raw document content or metadata
  • POST /search — Semantic search (query + filters) returning ranked results
  • POST /query — Q&A using embeddings + optional model (Gemini) for synthesis
  • POST /reindex — Rebuild embeddings/vector store after configuration changes

Example: upload a document

curl -X POST "http://localhost:3000/upload" \
  -F "file=@./docs/README.md" \
  -F "language=en"

Example: semantic search

curl -X POST "http://localhost:3000/search" \
  -H "Content-Type: application/json" \
  -d '{"query":"how to configure Gemini integration","top_k":5}'

If you enable Gemini integration via the GEMINI_API_KEY, /query can call the model to synthesize answers from retrieved chunks.

Use Cases

  • Internal developer knowledge base

    • Ingest RFCs, design docs, and code snippets. Developers can ask natural-language questions like “Which service owns user-session management?” and receive precise, context-aware excerpts and answers.
  • Documentation search for open-source projects

    • Upload README, CONTRIBUTING, and API docs. Users get semantic matches rather than keyword-only hits, improving discoverability of relevant examples and troubleshooting steps.
  • Multilingual help center

    • Store docs in multiple languages; the server handles language detection and search, allowing support teams to query in their preferred language and retrieve matching content.
  • On-prem or offline documentation portal

    • Run the server locally with the built-in vector store (zero-setup) for environments that must stay on-premises. Optionally point to an external vector DB for scaling or to a model gateway for corporate LLM usage.

Tips for Developers

  • Adjust chunk size and overlap to balance relevance and latency for long technical documents.
  • Use the built-in reindex endpoint after bulk uploads or configuration changes.
  • For production workloads, consider external vector DBs and a managed model provider to improve throughput and persistence.
  • Inspect the server’s OpenAPI or API docs (if available) to tailor client integrations for search UI, chat widgets, or automated documentation assistants.

Repository and source code: https://github.com/andrea9293/mcp-documentation-server

Common Issues & Solutions

Uploads of .mdx documents are rejected or treated as unknown, so MDX content can't be added to the MCP server. The requester isn't sure whether MDX requires different chunking or parsing behavior.

✓ Solution

I ran into this too! I added .mdx to the server's allowed extensions and reused the existing markdown pipeline, but first I strip MDX JSX nodes so they don't pollute the text chunks. Specifically I added .mdx to the upload whitelist, then used remark with remark-mdx to parse and a small plugin to remove JSX/MDX nodes, then fed the resulting plain-markdown to the same chunker. I ran end-to-end tests and the embeddings/QA flow worked unchanged. I submitted a small PR that adds the extension, the parser tweak, and unit tests for MDX uploads.