home / mcp / package documentation mcp server

Package Documentation MCP Server

An MCP server that provides LLMs with efficient access to package documentation across multiple programming languages

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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"
      }
    }
  }
}

Additional notes

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.

Available tools

describe_go_package

Fetches Go package documentation, with optional symbol lookup to retrieve details about a specific symbol.

describe_python_package

Fetches Python package documentation, with optional symbol lookup for a specific function or method.

describe_rust_package

Fetches Rust crate documentation from crates.io and docs.rs, with optional specific version lookup.

search_package_docs

Searches within package documentation with options for language and fuzzy matching to return relevant results.

describe_npm_package

Fetches NPM package documentation from public or private registries, honoring per-package registry configurations.

get_hover

Returns hover information for a position in a code document for languages supported by the LSP layer.

get_completions

Returns completion suggestions for a specific position in a code document.

get_diagnostics

Returns diagnostic information (errors, warnings) for a document in the context of the configured language server.