home / mcp / package documentation mcp server
An MCP server that provides LLMs with efficient access to package documentation across multiple programming languages
Configuration
View docs{
"mcpServers": {
"sammcj-mcp-package-docs": {
"command": "npx",
"args": [
"-y",
"mcp-package-docs"
],
"env": {
"ENABLE_LSP": "true",
"TYPESCRIPT_SERVER": "{\"command\":\"/custom/path/typescript-language-server\",\"args\":[\"--stdio\"]}"
}
}
}
}You run a specialized MCP server that gives you fast access to multi-language package documentation and LSP capabilities for code editors. It connects with your MCP client to fetch Go, Python, NPM, and Rust docs, while offering hover, completion, and diagnostics support when LSP is enabled.
You connect to this MCP server from your MCP client and start issuing documented tools to fetch package information or search within documentation. Use the available tools to look up documentation for a specific package or symbol, or perform targeted searches within a package’s docs. When LSP is enabled, you can request hover information, code completions, and diagnostics to assist you while coding.
From your MCP client, call the dedicated tools to retrieve or query documentation for Go, Python, Rust, and NPM packages. You can also enable LSP features to get hover details, code completions, and diagnostics for TypeScript/JavaScript projects.
Prerequisites you need before running the server: Node.js version 20 or newer, and an environment capable of running MCP servers. Ensure you have an environment where you can install global or project dependencies.
Install and run the MCP server using the following approach. You can run the server locally via a single command, and you may configure it within your MCP settings for automatic startup.
Recommended start command (as shown in the usage example):
{
"mcpServers": {
"package_docs": {
"command": "npx",
"args": ["-y", "mcp-package-docs"],
"env": {
"ENABLE_LSP": "true"
}
}
}
}Two key configuration points are shown for enabling the MCP server and LSP support. You can override default language servers if needed by supplying custom commands through your MCP client configuration.
Fetches Go package documentation, with optional symbol lookup to retrieve details about a specific symbol.
Fetches Python package documentation, with optional symbol lookup for a specific function or method.
Fetches Rust crate documentation from crates.io and docs.rs, with optional specific version lookup.
Searches within package documentation with options for language and fuzzy matching to return relevant results.
Fetches NPM package documentation from public or private registries, honoring per-package registry configurations.
Returns hover information for a position in a code document for languages supported by the LSP layer.
Returns completion suggestions for a specific position in a code document.
Returns diagnostic information (errors, warnings) for a document in the context of the configured language server.