mcp-package-docs logo

MCP Package Docs

by sammcj

8 forks
23 stars
Free

What is mcp-package-docs

mcp-package-docs is a versatile MCP (Model Context Protocol) server designed by sammcj to provide efficient access to package documentation across various programming languages. It is particularly useful for integrating with Large Language Models (LLMs), enabling them to access and understand code libraries and packages more effectively. This server also supports Language Server Protocol (LSP) capabilities, enhancing the development experience with features like code completions, hover information, and diagnostics.

How to Use mcp-package-docs

To use mcp-package-docs, you need to integrate it into your MCP settings. The server can be installed using Node.js with the command:

npx -y mcp-package-docs

For automatic installation for specific clients like Claude Desktop, you can use the Smithery CLI:

npx -y @smithery/cli install mcp-package-docs --client claude

Once installed, add the server configuration to your settings:

{
  "mcpServers": {
    "package-docs": {
      "command": "npx",
      "args": ["-y", "mcp-package-docs"],
      "env": {
        "ENABLE_LSP": "true"
      }
    }
  }
}

This configuration allows you to enable LSP features and customize language server settings as needed.

Key Features of mcp-package-docs

Multi-Language Support

  • Go: Access documentation via go doc.
  • Python: Leverage built-in help() for library documentation.
  • NPM: Retrieve package documentation, including from private registries.
  • Rust: Use crates.io and docs.rs for comprehensive crate documentation.

Smart Documentation Parsing

  • Provides structured outputs with descriptions, usage, and examples.
  • Supports both fuzzy and exact search capabilities for specific symbols or functions.

Advanced Search Features

  • Allows in-depth searches within package documentation.
  • Returns context-aware results with relevance scoring and symbol extraction.

Language Server Protocol (LSP) Support

  • Offers hover information, code completions, and diagnostics for code symbols.
  • Initially supports TypeScript/JavaScript, with options to extend to other languages.

Performance Optimized

  • Features built-in caching and efficient parsing to minimize memory usage and improve performance.

Example Use Cases

  • Look up documentation for Go, Python, Rust, or NPM packages.
  • Search within documentation using flexible queries.
  • Utilize LSP tools to enhance coding productivity with hover, completion, and diagnostic features.

mcp-package-docs is an essential tool for developers seeking to enhance their coding environment with robust documentation access and LSP functionalities. With its multi-language support and advanced features, it provides a seamless integration into development workflows, making it easier to understand and utilize code libraries effectively.

How to Use

To use the mcp-package-docs, follow these steps:

  1. Visit https://github.com/sammcj...
  2. Follow the setup instructions to create an account (if required)
  3. Connect the MCP server to your Claude Desktop application
  4. Start using mcp-package-docs capabilities within your Claude conversations

Additional Information

Created

December 29, 2024

Company

sammcj

Start building your own MCP Server

Interested in creating your own MCP Server? Check out the official documentation and resources.

Learn More