package-documentation-mcp
by: cdugo
MCP Server to retrieve documentation for a package
πOverview
Purpose: The DocsFetcher MCP Server is designed to fetch package documentation across multiple programming languages for large language models (LLMs), eliminating the need for API keys.
Overview: This framework provides a seamless way to access comprehensive documentation about various software packages, catering to developers using LLMs like Claude. By crawling documentation sites, it extracts essential information and structured data to enhance summarization capabilities.
Key Features:
-
Multi-Language Support: Capable of fetching documentation for languages such as JavaScript, Python, Java, .NET, Ruby, PHP, Rust, Go, and Swift, ensuring broad applicability.
-
Comprehensive Documentation Fetching: Gathers extensive data including README files, API documentation, code examples, and repository information, enriching the user's understanding of the package.
-
Structured Data Provisioning: Delivers structured outputs specifically tailored for efficient summarization by LLMs alongside specialized prompts for documentation analysis.
-
No API Key Required: Functions natively without requiring users to manage API keys, simplifying setup and integration with various development tools.
π DocsFetcher MCP Server
An MCP server that fetches package documentation from multiple programming language ecosystems for LLMs like Claude without requiring API keys.
β¨ Features
- Supports multiple programming languages (JavaScript, Python, Java, .NET, Ruby, PHP, Rust, Go, Swift)
- Fetches documentation for packages by name or URL
- Crawls documentation sites to extract comprehensive information
- Extracts README, API docs, code examples, and repository info
- Provides structured data for LLM summarization
- Includes specialized prompts for documentation analysis
- No API key required - works natively with Claude Desktop and Cursor IDE
π Installation
Claude Desktop
- Open Claude Desktop β Settings β Developer
- Click "Edit Config" and add:
{
"mcpServers": {
"docsFetcher": {
"command": "npx",
"args": [
"-y",
"@smithery/cli@latest",
"run",
"@cdugo/mcp-get-docs",
"--config",
"'{}'"
]
}
}
}
Cursor IDE Configuration
- Open Cursor IDE β Settings β MCP β Add New MCP Server
- Add:
Name: docsFetcher
Command: npx -y @smithery/cli@latest run @cdugo/mcp-get-docs --config "{}"
Prerequisites
- Node.js 18 or later
πββοΈ Running Locally
git clone https://github.com/cdugo/package-documentation-mcp
cd package-documentation-mcp
npm install
npm run build
Run the server locally:
npm start
For development with auto-restart on file changes:
npm run dev
Specify a custom port:
PORT=8080 npm start
π οΈ Available Tools
- fetch-url-docs: Fetch docs from a specific URL
- fetch-package-docs: Fetch docs for a package with optional language specification
- fetch-library-docs: Smart tool that works with either package name or URL
- fetch-multilingual-docs: Fetch docs for a package across multiple language ecosystems
π Available Prompts
- summarize-library-docs: Create a comprehensive library summary
- explain-dependency-error: Generate dependency error explanations
π‘ Example Queries
Basic Library Information
- What is Express.js and how do I use it?
- Tell me about the React library
- How do I use requests in Python?
Multi-language Support
- Show me documentation for lodash in JavaScript
- Compare pandas in Python and data.table in R
Using Tools
- @fetch-package-docs with packageName='express' and language='javascript'
- @fetch-package-docs with packageName='requests' and language='python'
- @fetch-multilingual-docs with packageName='http' and languages=['javascript', 'python', 'rust']
Using Prompts
- @summarize-library-docs with libraryName='express'
- @explain-dependency-error with packageName='dotenv'
β Troubleshooting
Local Installation
- Server not showing up: Verify absolute path in configuration
- Connection errors: Restart Claude Desktop or Cursor IDE
- Fetch failures: Some packages may have non-standard documentation
- Language support: If a language isn't working, try using the package's direct URL
π License
MIT