The MCP Package Docs Server provides access to package documentation and Language Server Protocol (LSP) capabilities for multiple programming languages:
Documentation Access: Retrieve structured documentation for Go, Python, NPM, and Rust packages, optionally focusing on specific symbols or versions.
Search Capabilities: Perform fuzzy or exact searches within package documentation across supported languages.
LSP Support: Enable hover information, code completions, and diagnostics for TypeScript/JavaScript files.
Registry Configuration: Support for public and private NPM registries using
.npmrc
configurations.Filtering Options: Filter documentation by query, section, or maximum length.
Performance Features: Includes caching and efficient parsing with minimal memory footprint.
Provides Language Server Protocol (LSP) support for CSS through vscode-css-language-server
Supports private npm registries including GitHub Packages via .npmrc configuration
Supports private npm registries including GitLab via .npmrc configuration
Provides Language Server Protocol (LSP) support for JavaScript, including hover information, code completions, and diagnostics
Provides documentation lookups for NPM packages via registry documentation, supporting both public and private registries with automatic configuration detection from .npmrc
Provides documentation lookups for Python libraries via built-in help() function, including specific symbol/function lookups and search capabilities
Provides Language Server Protocol (LSP) support for TypeScript, including hover information, code completions, and diagnostics
Package Documentation MCP Server
An MCP (Model Context Protocol) server that provides LLMs with efficient access to package documentation across multiple programming languages and language server protocol (LSP) capabilities.
Features
Multi-Language Support:
Go packages via
go doc
Python libraries via built-in
help()
NPM packages via registry documentation (including private registries)
Rust crates via crates.io and docs.rs
Smart Documentation Parsing:
Structured output with description, usage, and examples
Focused information to avoid context overload
Support for specific symbol/function lookups
Fuzzy and exact search capabilities across documentation
Advanced Search Features:
Search within package documentation
Fuzzy matching for flexible queries
Context-aware results with relevance scoring
Symbol extraction from search results
Language Server Protocol (LSP) Support:
Hover information for code symbols
Code completions
Diagnostics (errors and warnings)
Currently supports TypeScript/JavaScript
Extensible for other languages
Performance Optimised:
Built-in caching
Efficient parsing
Minimal memory footprint
Installation
Installing via Smithery
To install Package Docs for Claude Desktop automatically via Smithery:
Usage
As an MCP Server
Add to your MCP settings configuration:
The LSP functionality includes default configurations for common language servers:
TypeScript/JavaScript:
typescript-language-server --stdio
HTML:
vscode-html-language-server --stdio
CSS:
vscode-css-language-server --stdio
JSON:
vscode-json-language-server --stdio
You can override these defaults if needed:
The server provides the following tools:
lookup_go_doc / describe_go_package
Fetches Go package documentation
lookup_python_doc / describe_python_package
Fetches Python package documentation
describe_rust_package
Fetches Rust crate documentation from crates.io and docs.rs
search_package_docs
Search within package documentation
lookup_npm_doc / describe_npm_package
Fetches NPM package documentation from both public and private registries. Automatically uses the appropriate registry based on your .npmrc configuration.
The tool reads your ~/.npmrc file to determine the correct registry for each package:
Uses scoped registry configurations (e.g., @mycompany:registry=...)
Supports private registries (GitHub Packages, GitLab, Nexus, Artifactory, etc.)
Falls back to the default npm registry if no custom registry is configured
Example .npmrc configurations:
Language Server Protocol (LSP) Tools
When LSP support is enabled, the following additional tools become available:
get_hover
Get hover information for a position in a document
get_completions
Get completion suggestions for a position in a document
get_diagnostics
Get diagnostic information (errors, warnings) for a document
Example Usage in an LLM
Looking up Documentation
Requirements
Node.js >= 20
Go (for Go package documentation)
Python 3 (for Python package documentation)
Internet connection (for NPM package documentation and Rust crate documentation)
Language servers (for LSP functionality):
TypeScript/JavaScript:
npm install -g typescript-language-server typescript
HTML/CSS/JSON:
npm install -g vscode-langservers-extracted
Development
Contributing
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature
)Commit your changes (
git commit -m 'Add some amazing feature'
)Push to the branch (
git push origin feature/amazing-feature
)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityFacilitates searching and accessing programming resources across platforms like Stack Overflow, MDN, GitHub, npm, and PyPI, aiding LLMs in finding code examples and documentation.Last updated -639AGPL 3.0
- AsecurityAlicenseAqualityFetches and extracts comprehensive package documentation from multiple programming language ecosystems (JavaScript, Python, Java, etc.) for LLMs like Claude without requiring API keys.Last updated -41615MIT License
- -securityAlicense-qualityA server that provides structured access to markdown documentation from NPM packages, Go Modules, or PyPi packages, enabling informed code generation by exposing these docs as resources or tools.
- AsecurityAlicenseAqualityFetches up-to-date, version-specific documentation and code examples from the source and adds them to your LLM prompts, helping eliminate outdated code generations and hallucinated APIs.
Appeared in Searches
- MCP Server that uses npm execAsync functionality
- Tips for Naming Variables and Functions in Go Programming Language
- An MCP for managing documentation, optimizing token usage, and overseeing project development to deployment
- Tools and resources for Python development
- An MCP for extracting and analyzing documentation using AI