MCP Package Docs Server
パッケージドキュメント MCP サーバー
複数のプログラミング言語と言語サーバー プロトコル (LSP) 機能にわたるパッケージ ドキュメントへの効率的なアクセスを LLM に提供する MCP (モデル コンテキスト プロトコル) サーバー。
特徴
多言語サポート:
go doc経由のGoパッケージ組み込みの
help()経由の Python ライブラリレジストリドキュメント経由の NPM パッケージ (プライベートレジストリを含む)
crates.io と docs.rs 経由の Rust クレート
スマートドキュメント解析:
説明、使用法、例を含む構造化された出力
コンテキストの過負荷を避けるための焦点を絞った情報
特定のシンボル/関数の検索のサポート
ドキュメント全体にわたるあいまい検索と正確な検索機能
高度な検索機能:
パッケージドキュメント内を検索
柔軟なクエリのためのあいまい一致
関連性スコアリングによるコンテキスト認識結果
検索結果からのシンボル抽出
言語サーバープロトコル (LSP) サポート:
コードシンボルのホバー情報
コード補完
診断(エラーと警告)
現在TypeScript/JavaScriptをサポート
他の言語にも拡張可能
パフォーマンスの最適化:
組み込みキャッシュ
効率的な解析
最小限のメモリフットプリント
Related MCP server: UseKeen Documentation MCP Server
インストール
npx -y mcp-package-docsSmithery経由でインストール
Smithery経由で Claude Desktop のパッケージドキュメントを自動的にインストールするには:
npx -y @smithery/cli install mcp-package-docs --client claude使用法
MCPサーバーとして
MCP 設定構成に追加します:
{
"mcpServers": {
"package-docs": {
"command": "npx",
"args": ["-y", "mcp-package-docs"],
"env": {
"ENABLE_LSP": "true" // Optional: Enable Language Server Protocol support
}
}
}
}LSP 機能には、共通言語サーバーのデフォルト構成が含まれます。
TypeScript/JavaScript:
typescript-language-server --stdioHTML:
vscode-html-language-server --stdioCSS:
vscode-css-language-server --stdioJSON:
vscode-json-language-server --stdio
必要に応じてこれらのデフォルトを上書きできます。
{
"mcpServers": {
"package-docs": {
"command": "npx",
"args": ["-y", "mcp-package-docs"],
"env": {
"ENABLE_LSP": "true",
"TYPESCRIPT_SERVER": "{\"command\":\"/custom/path/typescript-language-server\",\"args\":[\"--stdio\"]}"
}
}
}
}サーバーは次のツールを提供します。
go_doc の参照 / go_package の説明
Go パッケージのドキュメントを取得します
{
"name": "describe_go_package",
"arguments": {
"package": "encoding/json", // required
"symbol": "Marshal" // optional
}
}Pythonドキュメントの検索 / Pythonパッケージの説明
Python パッケージのドキュメントを取得します
{
"name": "describe_python_package",
"arguments": {
"package": "requests", // required
"symbol": "get" // optional
}
}Rustパッケージの説明
crates.io と docs.rs から Rust クレートドキュメントを取得します。
{
"name": "describe_rust_package",
"arguments": {
"package": "serde", // required: crate name
"version": "1.0.219" // optional: specific version
}
}検索パッケージドキュメント
パッケージドキュメント内を検索
{
"name": "search_package_docs",
"arguments": {
"package": "requests", // required: package name
"query": "authentication", // required: search query
"language": "python", // required: "go", "python", "npm", "swift", or "rust"
"fuzzy": true // optional: enable fuzzy matching (default: true)
}
}npmドキュメントの検索 / npmパッケージの説明
NPMパッケージのドキュメントをパブリックレジストリとプライベートレジストリの両方から取得します。.npmrcの設定に基づいて適切なレジストリを自動的に使用します。
{
"name": "describe_npm_package",
"arguments": {
"package": "axios", // required - supports both scoped (@org/pkg) and unscoped packages
"version": "1.6.0" // optional
}
}ツールは ~/.npmrc ファイルを読み取り、各パッケージの正しいレジストリを決定します。
スコープ指定されたレジストリ構成を使用します (例: @mycompany:registry=...)
プライベート レジストリ (GitHub Packages、GitLab、Nexus、Artifactory など) をサポートします
カスタムレジストリが設定されていない場合は、デフォルトのnpmレジストリにフォールバックします。
.npmrc 構成の例:
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/言語サーバープロトコル(LSP)ツール
LSP サポートを有効にすると、次の追加ツールが使用できるようになります。
ゲットホバー
ドキュメント内の位置のホバー情報を取得する
{
"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_completeions
文書内の位置の補完候補を取得する
{
"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
}
}診断情報を取得する
ドキュメントの診断情報(エラー、警告)を取得する
{
"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
}
}LLMでの使用例
ドキュメントの検索
// Looking up Go documentation
const goDocResult = await use_mcp_tool({
server_name: "package-docs",
tool_name: "describe_go_package",
arguments: {
package: "encoding/json",
symbol: "Marshal"
}
});
// Looking up Python documentation
const pythonDocResult = await use_mcp_tool({
server_name: "package-docs",
tool_name: "describe_python_package",
arguments: {
package: "requests",
symbol: "post"
}
});
// Looking up Rust documentation
const rustDocResult = await use_mcp_tool({
server_name: "package-docs",
tool_name: "describe_rust_package",
arguments: {
package: "serde"
}
});
// Searching within documentation
const searchResult = await use_mcp_tool({
server_name: "package-docs",
tool_name: "search_package_docs",
arguments: {
package: "serde",
query: "serialize",
language: "rust",
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
}
});要件
Node.js >= 20
Go (Go パッケージのドキュメント用)
Python 3 (Python パッケージのドキュメント用)
インターネット接続(NPM パッケージのドキュメントと Rust クレートドキュメント用)
言語サーバー(LSP機能用):
TypeScript/JavaScript:
npm install -g typescript-language-server typescriptHTML/CSS/JSON:
npm install -g vscode-langservers-extracted
発達
# Install dependencies
npm i
# Build
npm run build
# Watch mode
npm run watch貢献
リポジトリをフォークする
機能ブランチを作成します(
git checkout -b feature/amazing-feature)変更をコミットします (
git commit -m 'Add some amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
@latest documentation and code examples to 9000+ libraries for LLMs and AI code editors in a singl…
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Docsy gives AI assistants current, version-specific documentation for libraries, frameworks and SDKs. Resolve library IDs and versions, then search and fetch focused official documentation with original source links using five read-only MCP tools. Hosted Streamable HTTP with OAuth 2.1 sign-in.
Related MCP Servers
- AlicenseDqualityDmaintenanceFetches and extracts comprehensive package documentation from multiple programming language ecosystems (JavaScript, Python, Java, etc.) for LLMs like Claude without requiring API keys.433 npm15MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search documentation of packages and services to find implementation details, examples, and specifications.MIT
- AlicenseAqualityDmaintenanceProvides LLMs with up-to-date, version-specific documentation and code examples directly from library sources, eliminating outdated training data and hallucinated APIs by fetching current documentation at prompt time.21,132,421 npmMIT
- AlicenseNot gradedqualityDmaintenanceProvides up-to-date, version-specific documentation and code examples for software libraries directly to LLMs, enabling resolution of library identifiers and retrieval of relevant documentation with code snippets.MIT