{
  "markdown": "# MCP Docs Server\n\nA Model Context Protocol (MCP) server for searching MCP protocol documentation. Built with TypeScript using the official MCP SDK.\n\n[![npm version](https://img.shields.io/npm/v/@praveenc/mcp-docs-server.svg)](https://www.npmjs.com/package/@praveenc/mcp-docs-server)\n[![MCP Registry](https://img.shields.io/badge/MCP-Registry-blue)](https://registry.modelcontextprotocol.io/v0.1/servers/io.github.praveenc%2Fmcp-docs-server/versions/0.1.0)\n\n## Features\n\n- **BM25 Search** - High-quality ranked search using BM25 algorithm with Porter stemming\n- **Fast Startup** - Indexes document titles at startup, fetches content on-demand\n- **Markdown Aware** - Weights headers, code blocks, and links for better relevance\n- **stdio Transport** - Runs as a local process for easy integration\n\n## Installation\n\n### Quick Start (Recommended)\n\nAdd to your MCP client configuration (Claude Desktop, Kiro, etc.):\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-docs-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@praveenc/mcp-docs-server\"]\n    }\n  }\n}\n```\n\nThat's it! The server will be downloaded and run automatically.\n\n### Global Install\n\n```bash\nnpm install -g @praveenc/mcp-docs-server\n```\n\nThen configure your MCP client:\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-docs-server\": {\n      \"command\": \"mcp-docs-server\"\n    }\n  }\n}\n```\n\n## Tools\n\n### search_mcp_docs\n\nSearch MCP protocol documentation with ranked results.\n\n**Parameters:**\n\n- `query` (string, required): Search query string\n- `k` (number, optional): Maximum results to return (default: 5). Returns fewer if fewer documents match.\n\n**Example:**\n\n```json\n{\n  \"query\": \"transports\",\n  \"k\": 5\n}\n```\n\n**Returns:**\n\n```json\n[\n  {\n    \"url\": \"https://modelcontextprotocol.io/specification/2025-11-25/basic/transports.md\",\n    \"title\": \"Transports\",\n    \"score\": 15.725,\n    \"snippet\": \"MCP uses JSON-RPC to encode messages...\"\n  }\n]\n```\n\n### fetch_mcp_doc\n\nFetch full document content by URL.\n\n**Parameters:**\n\n- `uri` (string, required): Document URL from modelcontextprotocol.io\n\n**Example:**\n\n```json\n{\n  \"uri\": \"https://modelcontextprotocol.io/specification/2025-11-25/server/tools.md\"\n}\n```\n\n**Returns:**\n\n```json\n{\n  \"url\": \"https://modelcontextprotocol.io/specification/2025-11-25/server/tools.md\",\n  \"title\": \"Tools\",\n  \"content\": \"# Tools\\n\\nTools enable servers to expose executable functionality...\"\n}\n```\n\n## Testing with MCP Inspector\n\n```bash\nnpx @modelcontextprotocol/inspector npx -y @praveenc/mcp-docs-server\n```\n\n## Development\n\nClone the repository for local development:\n\n```bash\ngit clone https://github.com/praveenc/mcp-docs-server.git\ncd mcp-docs-server\nnpm install\n```\n\n### Commands\n\n```bash\n# Run in development mode\nnpm run dev\n\n# Run tests\nnpm test\n\n# Type check\nnpm run typecheck\n\n# Build\nnpm run build\n\n# Test with MCP Inspector (development)\nnpm run inspect:dev\n```\n\n### Local MCP Client Config (Development)\n\n```json\n{\n  \"mcpServers\": {\n    \"mcp-docs-server\": {\n      \"command\": \"npx\",\n      \"args\": [\"tsx\", \"/path/to/mcp-docs-server/src/index.ts\"]\n    }\n  }\n}\n```\n\n## Architecture\n\n```text\nsrc/\n├── index.ts          # MCP server entry point\n├── config.ts         # Configuration\n├── tools/\n│   └── docs.ts       # search_mcp_docs, fetch_mcp_doc\n└── utils/\n    ├── cache.ts      # Document caching\n    ├── doc-fetcher.ts # HTTP fetching & HTML parsing\n    ├── indexer.ts    # BM25 search index\n    ├── logger.ts     # Logging utilities\n    ├── stopwords.ts  # Stop words list\n    ├── text-processor.ts # Text utilities\n    └── url-validator.ts  # URL validation\n```\n\n## Search Algorithm\n\nThe search uses BM25 (Best Matching 25) with enhancements:\n\n- **Porter Stemming** - Matches word variants (e.g., \"running\" → \"run\")\n- **Bigrams** - Captures phrase matches (e.g., \"tool input\")\n- **Weighted Scoring**:\n  - Title matches: 3-8x boost\n  - Header matches: 4x weight\n  - Code blocks: 2x weight\n  - Link text: 2x weight\n- **Domain Term Preservation** - Technical terms like \"mcp\", \"json\", \"stdio\" are not stemmed\n\n## License\n\nMIT\n",
  "bytes": 4016,
  "sha": "0462c87061ee225f3c392f7df6ec911826620beb226bf521e1f31462233e05c8",
  "repo_slug": "praveenc/mcp-docs-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_praveenc_mcp_docs_server_f9dfc5d9/readme"
}