MCP Package Docs Server Featured
An MCP server that provides LLMs with efficient access to package documentation across multiple programming languages - sammcj/mcp-package-docs
sammcj
README
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.
<a href="https://glama.ai/mcp/servers/mrk7ul7nz7"><img width="380" height="200" src="https://glama.ai/mcp/servers/mrk7ul7nz7/badge" alt="Package Docs Server MCP server" /></a>
Features
-
Multi-Language Support:
- Go packages via
go doc
- Python libraries via built-in
help()
- NPM packages via registry documentation (including private registries)
- Go packages via
-
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
npx -y mcp-package-docs
Installing via Smithery
To install Package Docs for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-package-docs --client claude
Usage
As an MCP Server
- Add to your MCP settings configuration:
{
"mcpServers": {
"package-docs": {
"command": "npx",
"args": ["-y", "mcp-package-docs"],
"env": {
"ENABLE_LSP": "true" // Optional: Enable Language Server Protocol support
}
}
}
}
- 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:
{
"mcpServers": {
"package-docs": {
"command": "npx",
"args": ["-y", "mcp-package-docs"],
"env": {
"ENABLE_LSP": "true",
"TYPESCRIPT_SERVER": "{\"command\":\"/custom/path/typescript-language-server\",\"args\":[\"--stdio\"]}"
}
}
}
}
- The server provides the following tools:
lookup_go_doc
Fetches Go package documentation
{
"name": "lookup_go_doc",
"arguments": {
"package": "encoding/json", // required
"symbol": "Marshal" // optional
}
}
lookup_python_doc
Fetches Python package documentation
{
"name": "lookup_python_doc",
"arguments": {
"package": "requests", // required
"symbol": "get" // optional
}
}
search_package_docs
Search within package documentation
{
"name": "search_package_docs",
"arguments": {
"package": "requests", // required: package name
"query": "authentication", // required: search query
"language": "python", // required: "go", "python", or "npm"
"fuzzy": true // optional: enable fuzzy matching (default: true)
}
}
lookup_npm_doc
Fetches NPM package documentation from both public and private registries. Automatically uses the appropriate registry based on your .npmrc configuration.
{
"name": "lookup_npm_doc",
"arguments": {
"package": "axios", // required - supports both scoped (@org/pkg) and unscoped packages
"version": "1.6.0" // optional
}
}
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:
registry=https://nexus.mycompany.com/repository/npm-group/
@mycompany:registry=https://nexus.mycompany.com/repository/npm-private/
@mycompany-ct:registry=https://npm.pkg.github.com/
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
{
"name": "get_hover",
"arguments": {
"languageId": "typescript", // required: language identifier (e.g., "typescript", "javascript")
"filePath": "src/index.ts", // required: path to the source file
"content": "const x = 1;", // required: content of the file
"line": 0, // required: zero-based line number
"character": 6, // required: zero-based character position
"projectRoot": "/path/to/project" // optional: project root directory
}
}
get_completions
Get completion suggestions for a position in a document
{
"name": "get_completions",
"arguments": {
"languageId": "typescript", // required: language identifier
"filePath": "src/index.ts", // required: path to the source file
"content": "const arr = []; arr.", // required: content of the file
"line": 0, // required: zero-based line number
"character": 16, // required: zero-based character position
"projectRoot": "/path/to/project" // optional: project root directory
}
}
get_diagnostics
Get diagnostic information (errors, warnings) for a document
{
"name": "get_diagnostics",
"arguments": {
"languageId": "typescript", // required: language identifier
"filePath": "src/index.ts", // required: path to the source file
"content": "const x: string = 1;", // required: content of the file
"projectRoot": "/path/to/project" // optional: project root directory
}
}
Example Usage in an LLM
Looking up Documentation
// Looking up documentation
const docResult = await use_mcp_tool({
server_name: "package-docs",
tool_name: "lookup_python_doc",
arguments: {
package: "requests",
symbol: "post"
}
});
// Searching within documentation
const searchResult = await use_mcp_tool({
server_name: "package-docs",
tool_name: "search_package_docs",
arguments: {
package: "requests",
query: "authentication headers",
language: "python",
fuzzy: true
}
});
// Using LSP for hover information (when LSP is enabled)
const hoverResult = await use_mcp_tool({
server_name: "package-docs",
tool_name: "get_hover",
arguments: {
languageId: "typescript",
filePath: "src/index.ts",
content: "const axios = require('axios');\naxios.get",
line: 1,
character: 7
}
});
Requirements
- Node.js >= 20
- Go (for Go package documentation)
- Python 3 (for Python package documentation)
- Internet connection (for NPM package documentation)
- Language servers (for LSP functionality):
- TypeScript/JavaScript:
npm install -g typescript-language-server typescript
- HTML/CSS/JSON:
npm install -g vscode-langservers-extracted
- TypeScript/JavaScript:
Development
# Install dependencies
npm i
# Build
npm run build
# Watch mode
npm run watch
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.
Recommended Servers
playwright-mcp
A Model Context Protocol (MCP) server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages through structured accessibility snapshots, bypassing the need for screenshots or visually-tuned models.
Magic Component Platform (MCP)
It's like v0 but in your Cursor/WindSurf/Cline. 21st dev Magic MCP server for working with your frontend like Magic - 21st-dev/magic-mcp
Gitingest-MCP
mcp server for gitingest. Contribute to puravparab/Gitingest-MCP development by creating an account on GitHub.
Claude Code MCP
claude-code-mcp. Contribute to auchenberg/claude-code-mcp development by creating an account on GitHub.
@kazuph/mcp-taskmanager
Contribute to kazuph/mcp-taskmanager development by creating an account on GitHub.

Linear MCP Server
A server that integrates Linear's project management system with the Model Context Protocol (MCP) to allow LLMs to interact with Linear. - jerhadf/linear-mcp-server
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images - peng-shawn/mermaid-mcp-server
Linear MCP Server
MCP server for Linear (https://linear.app), forked from ibraheem4/linear-mcp (https://github.com/ibraheem4/linear-mcp) - tiovikram/linear-mcp
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor - rahulthedevil/Jira-Context-MCP

Sequential Thinking MCP Server
Contribute to arben-adm/mcp-sequential-thinking development by creating an account on GitHub.