
Nexus
io.github.addozhang由 GitHub 账号 addozhang 发布v0.1.1更新于 Oct 24, 2026
Query Sonatype Nexus Repository (OSS/Pro) for Maven, Python, and Docker artifacts
概览
只读 MCP 服务器,让助手查询 Sonatype Nexus Repository Manager 3 中的 Maven、Python 和 Docker 制品。
- 可以做什么
- 搜索 Maven 制品并按分页列出某个制品的所有版本,可按 group、artifact 和仓库筛选。搜索 Python 包并按分页列出其版本。列出仓库中的 Docker 镜像,并获取指定镜像的所有标签。六个工具全部只读取 Nexus REST API,不提供创建、更新或删除操作。
- 适用场景
- 当你使用自建的 Nexus Repository Manager 3(OSS 或 Pro),并希望助手在添加依赖或部署前确认存在哪些制品、包或镜像版本时适用。若只使用公共仓库或没有 Nexus 实例,则无需安装。
- 运行要求
- 需要一个可通过网络访问的 Nexus Repository Manager 3.x 实例,以及对该仓库有读取权限的 Nexus 账号。服务器是本地运行的 Python 包(nexus-mcp-server)或 Docker 镜像,监听主机和端口(默认 0.0.0.0:8000),使用 SSE 或 streamable-http 传输。凭据通过 X-Nexus-Url、X-Nexus-Username 和 X-Nexus-Password 请求头逐次传入,或使用 NEXUS_BASE_URL、NEXUS_USERNAME 和 NEXUS_PASSWORD。
安装
在 SourceWeft 中
- 打开 控制台中的 Nexus,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Nexus MCP Server
English | 简体中文
MCP (Model Context Protocol) server for Sonatype Nexus Repository Manager 3 (OSS and Pro), enabling AI assistants to query Maven, Python (PyPI), and Docker repositories.
Features
- Multiple transport modes - SSE (default) or streamable-http transport
- HTTP streaming transport - Modern SSE-based transport with header authentication
- Per-request authentication - Credentials passed via HTTP headers (no hardcoded secrets)
- Maven support - Search artifacts, list versions, get metadata
- Python support - Search packages, list versions, get metadata
- Docker support - List images, get tags, image metadata
- FastMCP framework - Fast, modern Python implementation
Compatibility
Supported Nexus versions:
- ✅ Nexus Repository Manager 3.x OSS (Open Source)
- ✅ Nexus Repository Manager 3.x Pro
This server uses the standard Nexus REST API v1 (/service/rest/v1), which is available in both OSS and Pro editions.
Available Tools
This MCP server provides 6 read-only tools for querying Nexus repositories:
📦 Maven Tools
🐍 Python/PyPI Tools
🐳 Docker Tools
Note: All tools are read-only and safe to use. No write operations (create/update/delete) are supported.
Installation
From Source
Using Docker
For detailed deployment guide, see DOCKER.md.
Configuration
Server Configuration
The server can be configured using command line arguments or environment variables:
Priority: CLI arguments > Environment variables > Default values
Transport Modes:
sse(default) - Server-Sent Events transport, compatible with most MCP clientsstreamable-http- Streamable HTTP transport for clients that prefer this protocol
Running the Server
Local Development
Using Docker
For detailed deployment guide, see DOCKER.md.
Authentication via HTTP Headers
Credentials are passed as HTTP headers with each request:
Note: Set X-Nexus-Verify-SSL: false when connecting to self-hosted Nexus instances with self-signed certificates.
MCP Client Configuration (Claude Desktop)
Add to your Claude Desktop configuration (~/.config/claude/claude_desktop_config.json):
For self-signed certificates:
MCP Client Configuration (Other Clients)
For other MCP clients that support HTTP transport:
MCP Tools
Maven Tools
Pagination example:
Python Tools
Pagination: Same pattern as Maven - check hasMore and use continuationToken for subsequent pages.
Docker Tools
Development
Running Tests
Type Checking
Linting
Project Structure
Troubleshooting
Connection Errors
- Verify the MCP server is running (
python -m nexus_mcp) - Check that port 8000 is accessible
- Verify
X-Nexus-Urlheader is correct and accessible - Check network connectivity to your Nexus instance
- Ensure HTTPS certificates are valid (or use HTTP for local instances)
Authentication Errors
- Verify
X-Nexus-UsernameandX-Nexus-Passwordheaders are correct - Ensure the user has read permissions on the repositories
- Check if the Nexus instance requires specific authentication methods
Missing Credentials Error
- Ensure all three headers are set:
X-Nexus-Url,X-Nexus-Username,X-Nexus-Password - Check that your MCP client supports HTTP headers
Empty Results
- Verify the repository name is correct
- Check that the package/artifact exists in Nexus
- For Python packages, try both hyphen and underscore naming
Transport Mode Issues
Connection timeout with streamable-http:
- Ensure your client supports streamable-http transport
- Try using SSE mode instead:
python -m nexus_mcp --transport sse - Check firewall rules allow HTTP connections
Tools not appearing:
- Both SSE and streamable-http expose the same tools
- Verify headers are correctly passed (X-Nexus-*)
- Check server logs for authentication errors
License
MIT
Contributing
Contributions welcome! Please run tests and linting before submitting PRs.
来源:README.md,提交 0c4a68a
工具
0版本历史
1- v0.1.1最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。