Wraps the official MCP protocol documentation in a searchable interface using BM25 ranking with Porter stemming. Exposes two tools: search_mcp_docs for ranked queries across the spec (with weighted scoring for titles, headers, and code blocks) and fetch_mcp_doc to pull full document content by URL. The indexer loads document titles at startup and fetches content on demand, so it's fast to spin up. Reach for this when you're building MCP servers or clients and need quick reference lookups without leaving your development context. Runs locally over stdio and works with npx for zero install friction.
A Model Context Protocol (MCP) server for searching MCP protocol documentation. Built with TypeScript using the official MCP SDK.
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.
npm install -g @praveenc/mcp-docs-server
Then configure your MCP client:
{
"mcpServers": {
"mcp-docs-server": {
"command": "mcp-docs-server"
}
}
}
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 full document content by URL.
Parameters:
uri (string, required): Document URL from modelcontextprotocol.ioExample:
{
"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..."
}
npx @modelcontextprotocol/inspector npx -y @praveenc/mcp-docs-server
Clone the repository for local development:
git clone https://github.com/praveenc/mcp-docs-server.git
cd mcp-docs-server
npm install
# 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
{
"mcpServers": {
"mcp-docs-server": {
"command": "npx",
"args": ["tsx", "/path/to/mcp-docs-server/src/index.ts"]
}
}
}
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
The search uses BM25 (Best Matching 25) with enhancements:
MIT