mcp-server-pacman

Pacman MCP 服务器
提供包索引查询功能的模型上下文协议 (MLM) 服务器。该服务器使 LLM 能够从 PyPI、npm、crates.io、Docker Hub 和 Terraform Registry 等包存储库中搜索和检索信息。
可用工具
search_package- 在包索引中搜索包index(字符串,必需):要搜索的包索引(“pypi”,“npm”,“crates”,“terraform”)query(字符串,必需):包名称或搜索查询limit(整数,可选):返回的最大结果数(默认值:5,最大值:50)
package_info获取特定包的详细信息index(字符串,必需):要查询的包索引(“pypi”,“npm”,“crates”,“terraform”)name(字符串,必需):包名称version(字符串,可选):获取信息的特定版本(默认值:最新)
search_docker_image- 在 Docker Hub 中搜索 Docker 镜像query(字符串,必需):图像名称或搜索查询limit(整数,可选):返回的最大结果数(默认值:5,最大值:50)
docker_image_info- 获取特定 Docker 镜像的详细信息name(字符串,必需):图像名称(例如,用户/repo 或库/repo)tag(字符串,可选):特定图像标签(默认值:最新)
terraform_module_latest_version- 获取 Terraform 模块的最新版本name(字符串,必需):模块名称(格式:命名空间/名称/提供程序)
提示
search_pypi
在 PyPI 上搜索 Python 包
参数:
query(字符串,必需):包名称或搜索查询
pypi_info
获取有关特定 Python 包的信息
参数:
name(字符串,必需):包名称version(字符串,可选):特定版本
搜索_npm
在 npm 上搜索 JavaScript 包
参数:
query(字符串,必需):包名称或搜索查询
npm_info
获取有关特定 JavaScript 包的信息
参数:
name(字符串,必需):包名称version(字符串,可选):特定版本
search_crates
在 crates.io 上搜索 Rust 软件包
参数:
query(字符串,必需):包名称或搜索查询
crates_info
获取有关特定 Rust 包的信息
参数:
name(字符串,必需):包名称version(字符串,可选):特定版本
搜索_docker
在 Docker Hub 上搜索 Docker 镜像
参数:
query(字符串,必需):图像名称或搜索查询
docker_info
获取有关特定 Docker 镜像的信息
参数:
name(字符串,必需):图像名称(例如,用户/仓库)tag(字符串,可选):特定标签
搜索_terraform
在 Terraform 注册表中搜索 Terraform 模块
参数:
query(字符串,必需):模块名称或搜索查询
terraform_info
获取有关特定 Terraform 模块的信息
参数:
name(字符串,必需):模块名称(格式:命名空间/名称/提供程序)
terraform_latest_version
获取特定 Terraform 模块的最新版本
参数:
name(字符串,必需):模块名称(格式:命名空间/名称/提供程序)
安装
使用 uv(推荐)
使用uv时无需特殊安装。我们将使用uvx直接运行mcp-server-pacman 。
使用 PIP
或者,您可以通过 pip 安装mcp-server-pacman :
pip install mcp-server-pacman安装后,您可以使用以下命令将其作为脚本运行:
python -m mcp_server_pacman使用 Docker
您还可以使用 Docker 镜像:
docker pull oborchers/mcp-server-pacman:latest
docker run -i --rm oborchers/mcp-server-pacmanRelated MCP server: JSR MCP
配置
为 Claude.app 配置
添加到您的 Claude 设置:
"mcpServers": {
"pacman": {
"command": "uvx",
"args": ["mcp-server-pacman"]
}
}"mcpServers": {
"pacman": {
"command": "docker",
"args": ["run", "-i", "--rm", "oborchers/mcp-server-pacman:latest"]
}
}"mcpServers": {
"pacman": {
"command": "python",
"args": ["-m", "mcp-server-pacman"]
}
}配置 VS Code
如需手动安装,请将以下 JSON 块添加到 VS Code 中的“用户设置 (JSON)”文件中。您可以按下Ctrl + Shift + P并输入Preferences: Open User Settings (JSON)来完成此操作。
或者,您可以将其添加到工作区中名为.vscode/mcp.json的文件中。这样您就可以与其他人共享该配置。
请注意,使用
mcp.json文件时需要mcp密钥。
{
"mcp": {
"servers": {
"pacman": {
"command": "uvx",
"args": ["mcp-server-pacman"]
}
}
}
}{
"mcp": {
"servers": {
"pacman": {
"command": "docker",
"args": ["run", "-i", "--rm", "oborchers/mcp-server-pacman:latest"]
}
}
}
}定制 - 用户代理
默认情况下,服务器将使用用户代理:
ModelContextProtocol/1.0 Pacman (+https://github.com/modelcontextprotocol/servers)可以通过将参数--user-agent=YourUserAgent添加到配置中的args列表来进行定制。
发展
运行测试
运行所有测试:
uv run pytest -xvs运行特定的测试类别:
# Run all provider tests uv run pytest -xvs tests/providers/ # Run integration tests for a specific provider uv run pytest -xvs tests/integration/test_pypi_integration.py # Run specific test class uv run pytest -xvs tests/providers/test_npm.py::TestNPMFunctions # Run a specific test method uv run pytest -xvs tests/providers/test_pypi.py::TestPyPIFunctions::test_search_pypi_success检查代码风格:
uv run ruff check . uv run ruff format --check .格式代码:
uv run ruff format .
调试
您可以使用 MCP 检查器来调试服务器。对于 uvx 安装:
npx @modelcontextprotocol/inspector uvx mcp-server-pacman或者,如果您已将软件包安装在特定目录中或正在其上进行开发:
cd path/to/pacman
npx @modelcontextprotocol/inspector uv run mcp-server-pacman发布流程
该项目使用 GitHub Actions 进行自动发布:
更新
pyproject.toml中的版本使用
git tag vX.YZ创建一个新标签(例如,git tag v0.1.0)使用
git push --tags推送标签
这将自动:
验证
pyproject.toml中的版本与标签匹配运行测试和 Lint 检查
构建并发布到 PyPI
构建并发布到 Docker Hub,作为
oborchers/mcp-server-pacman:latest和oborchers/mcp-server-pacman:XYZ
项目结构
代码库组织成以下结构:
src/mcp_server_pacman/
├── models/ # Data models/schemas
├── providers/ # Package registry API clients
│ ├── pypi.py # PyPI API functions
│ ├── npm.py # npm API functions
│ ├── crates.py # crates.io API functions
│ ├── dockerhub.py # Docker Hub API functions
│ └── terraform.py # Terraform Registry API functions
├── utils/ # Utilities and helpers
│ ├── cache.py # Caching functionality
│ ├── constants.py # Shared constants
│ └── parsers.py # HTML parsing utilities
├── __init__.py # Package initialization
├── __main__.py # Entry point
└── server.py # MCP server implementation测试遵循类似的结构:
tests/
├── integration/ # Integration tests (real API calls)
├── models/ # Model validation tests
├── providers/ # Provider function tests
└── utils/ # Test utilities贡献
我们鼓励您为扩展和改进 mcp-server-pacman 做出贡献。无论您是想添加新的软件包索引、增强现有功能还是改进文档,您的贡献都弥足珍贵。
有关其他 MCP 服务器和实现模式的示例,请参阅: https://github.com/modelcontextprotocol/servers
欢迎提交 Pull 请求!欢迎贡献新想法、错误修复或改进,让 mcp-server-pacman 更加强大实用。
执照
mcp-server-pacman 采用 MIT 许可证。这意味着您可以自由使用、修改和分发该软件,但需遵守 MIT 许可证的条款和条件。更多详细信息,请参阅项目仓库中的 LICENSE 文件。
Available Tools
5 toolsdocker_image_infoC
Get detailed information about a specific Docker image
Inputs: name (required), tag.
package_infoC
Get detailed information about a specific package
Inputs: index (required), name (required), version.
search_docker_imageB
Search for Docker images in Docker Hub
Inputs: query (required), limit.
search_packageB
Search for packages in package indices (PyPI, npm, crates.io, Terraform Registry)
Inputs: index (required), query (required), limit.
terraform_module_latest_versionB
Get the latest version of a Terraform module
Inputs: name (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct resource and action: Docker images have separate search and info tools, packages similarly, and Terraform modules have a dedicated version lookup. No overlap between resources.
Names use snake_case but the ordering of resource and action varies: e.g., 'docker_image_info' (resource_action) vs 'search_docker_image' (action_resource). 'terraform_module_latest_version' uses a different pattern with an adjective. This inconsistency could cause confusion.
With 5 tools, the server is focused and well-scoped for an informational package manager. It covers Docker, general packages, and Terraform modules without being too sparse.
The server provides search and info for Docker and packages, which is reasonable for an informational tool. However, only one Terraform module operation exists, and missing CRUD operations like install or delete are on the boundary of the domain.
Maintenance
Related MCP Connectors
Model Context Protocol server for Studex tools, notifications, and profile integrations
A Model Context Protocol server for Wix AI tools
Search and browse every MCP server in the Model Context Protocol registry.
Read-only MCP server for repository context: context packs, graph impact analysis, and validation.
Related MCP Servers
- FlicenseAqualityDmaintenanceA Model Context Protocol server that allows interaction with the RubyGems.org API to fetch metadata about Ruby packages, search gems, and explore dependencies and ownership information.61-
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server for the JSR (JavaScript Registry)4MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server for querying PyPI package information, dependencies, and compatibility checking. Supports advanced dependency analysis, download statistics, and trending analysis.64 PyPI19MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server for querying package registries (npm, PyPI, crates.io) to retrieve metadata, release timelines, and maintenance signals.1MIT