mcp-docs-server
Search and fetch MCP protocol documentation using BM25 search with weighted scoring and stemming.
README
MCP Docs Server
A Model Context Protocol (MCP) server for searching MCP protocol documentation. Built with TypeScript using the official MCP SDK.
Features
- BM25 Search - High-quality ranked search using BM25 algorithm with Porter stemming
- Fast Startup - Indexes document titles at startup, fetches content on-demand
- Markdown Aware - Weights headers, code blocks, and links for better relevance
- stdio Transport - Runs as a local process for easy integration
Installation
Quick Start (Recommended)
Add to your MCP client configuration (Claude Desktop, Kiro, etc.):
{
"mcpServers": {
"mcp-docs-server": {
"command": "npx",
"args": ["-y", "@praveenc/mcp-docs-server"]
}
}
}
That's it! The server will be downloaded and run automatically.
Global Install
npm install -g @praveenc/mcp-docs-server
Then configure your MCP client:
{
"mcpServers": {
"mcp-docs-server": {
"command": "mcp-docs-server"
}
}
}
Tools
search_mcp_docs
Search MCP protocol documentation with ranked results.
Parameters:
query(string, required): Search query stringk(number, optional): Maximum results to return (default: 5). Returns fewer if fewer documents match.
Example:
{
"query": "transports",
"k": 5
}
Returns:
[
{
"url": "https://modelcontextprotocol.io/specification/2025-11-25/basic/transports.md",
"title": "Transports",
"score": 15.725,
"snippet": "MCP uses JSON-RPC to encode messages..."
}
]
fetch_mcp_doc
Fetch full document content by URL.
Parameters:
uri(string, required): Document URL from modelcontextprotocol.io
Example:
{
"uri": "https://modelcontextprotocol.io/specification/2025-11-25/server/tools.md"
}
Returns:
{
"url": "https://modelcontextprotocol.io/specification/2025-11-25/server/tools.md",
"title": "Tools",
"content": "# Tools\n\nTools enable servers to expose executable functionality..."
}
Testing with MCP Inspector
npx @modelcontextprotocol/inspector npx -y @praveenc/mcp-docs-server
Development
Clone the repository for local development:
git clone https://github.com/praveenc/mcp-docs-server.git
cd mcp-docs-server
npm install
Commands
# Run in development mode
npm run dev
# Run tests
npm test
# Type check
npm run typecheck
# Build
npm run build
# Test with MCP Inspector (development)
npm run inspect:dev
Local MCP Client Config (Development)
{
"mcpServers": {
"mcp-docs-server": {
"command": "npx",
"args": ["tsx", "/path/to/mcp-docs-server/src/index.ts"]
}
}
}
Architecture
src/
├── index.ts # MCP server entry point
├── config.ts # Configuration
├── tools/
│ └── docs.ts # search_mcp_docs, fetch_mcp_doc
└── utils/
├── cache.ts # Document caching
├── doc-fetcher.ts # HTTP fetching & HTML parsing
├── indexer.ts # BM25 search index
├── logger.ts # Logging utilities
├── stopwords.ts # Stop words list
├── text-processor.ts # Text utilities
└── url-validator.ts # URL validation
Search Algorithm
The search uses BM25 (Best Matching 25) with enhancements:
- Porter Stemming - Matches word variants (e.g., "running" → "run")
- Bigrams - Captures phrase matches (e.g., "tool input")
- Weighted Scoring:
- Title matches: 3-8x boost
- Header matches: 4x weight
- Code blocks: 2x weight
- Link text: 2x weight
- Domain Term Preservation - Technical terms like "mcp", "json", "stdio" are not stemmed
License
MIT
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.