Enterprise Knowledge MCP Server
Provides read-only, citation-backed semantic search and retrieval-augmented generation over enterprise documents via standardized MCP tools, with local embeddings for privacy.
README
Enterprise Knowledge MCP Server
MCP server that exposes semantic search + RAG over enterprise documents as standardized tools, so any MCP client (Claude Desktop, etc.) gets read-only, citation-backed access without touching source systems directly.
Connector #1 (local PDF/DOCX/XLSX) is implemented. Embeddings run locally
via sentence-transformers — no document text leaves the machine.
Architecture
connector.list_documents() # SourceDocument objects
v
ingestion/extractor.py # per-mime text extraction -> ExtractedSection
v
ingestion/chunker.py # sentence-packed chunks w/ overlap -> Chunk
v
ingestion/embedder.py # sentence-transformers -> vectors
v
storage/vector_store.py # Chroma upsert/query (metadata filtering)
v
rag/retriever.py (KnowledgeService) # orchestrates the above; search() + build_rag_context()
v
server.py # FastMCP tools wrapping KnowledgeService
Adding a new source (SharePoint, Confluence, Notion, Google Drive, Slack)
means writing one class implementing connectors/base.py::BaseConnector
(list_documents, get_document). Nothing downstream changes.
Setup
pip install -r requirements.txt
Drop files into data/raw/ (or point at another directory), then from
src/:
from connectors.local_files import LocalFileConnector
from rag.retriever import KnowledgeService
svc = KnowledgeService()
svc.ingest_connector(LocalFileConnector(root_dir="../data/raw"))
Or just run the ingest tool through the MCP server itself once connected.
Running the server
python src/server.py
Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"enterprise-knowledge": {
"command": "python",
"args": ["/absolute/path/to/enterprise-knowledge-mcp/src/server.py"]
}
}
}
Tools exposed
| Tool | Purpose |
|---|---|
ingest_local_directory(directory?) |
Scan + index PDF/DOCX/XLSX from a directory |
search_knowledge(query, top_k?, source_type?, department?, author?) |
Semantic search with metadata filters |
get_rag_context(query, top_k?, source_type?, department?) |
Retrieved chunks + citation markers, ready for an LLM prompt |
list_indexed_documents() |
All indexed docs + chunk counts |
index_stats() |
Total indexed chunk count |
Metadata schema (per chunk)
doc_id, title, source_type, path_or_uri, section_label, author, department, tags, modified_at, ingested_at — section_label is page number (PDF),
heading/table (DOCX), or sheet name (XLSX), so citations point to a specific
location, not just a document title.
Config
Environment variables (see src/config.py): EKM_RAW_DIR, EKM_CHROMA_DIR,
EKM_COLLECTION, EKM_CHUNK_SIZE, EKM_CHUNK_OVERLAP, EKM_EMBEDDING_MODEL,
EKM_TOP_K.
Roadmap (modular connectors, in priority order)
- Local files — done.
- SharePoint — Microsoft Graph API (
/sites/{id}/drive/items), delta queries for incremental sync, app-only auth via client credentials. - Confluence — REST API v2 (
/wiki/api/v2/pages), CQL search for incremental sync, API token auth. - Notion — Notion API (
/v1/search, block children pagination), integration token auth. - Google Drive — Drive API v3, service account or OAuth, export Google Docs/Sheets as text/csv before extraction.
- Slack —
conversations.history+ file downloads, bot token auth, respect channel membership for access control.
Security notes for production
- Never embed credentials in connector code — use env vars / a secrets manager per connector.
- Enforce source-level ACLs at query time (filter
whereclauses by the requesting user's permitted departments/channels), not just at ingest time. - Log every
search_knowledge/get_rag_contextcall (query + returned doc_ids) for audit trails. - Rate-limit and sandbox connector network calls; SharePoint/Confluence/ Notion/Drive/Slack connectors will need outbound HTTPS to their respective APIs only.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.