Nexus

io.github.addozhangPublished by GitHub account addozhangv0.1.1Updated Oct 24, 2026

Query Sonatype Nexus Repository (OSS/Pro) for Maven, Python, and Docker artifacts

VerifiedSTDIODesktop onlyCloud & InfrastructureDeveloper Tools

Overview

AI-generated overview

Read-only MCP server that lets an assistant query a Sonatype Nexus Repository Manager 3 instance for Maven, Python and Docker artifacts.

What you can do
Search Maven artifacts and list an artifact's versions with pagination, including group, artifact and repository filters. Search Python packages and list their versions with pagination. List Docker images in a repository and get the tags of a given image. All six tools only read from the Nexus REST API; no create, update or delete operations are offered.
When to use it
Useful when you work with a self-hosted Nexus Repository Manager 3 (OSS or Pro) and want an assistant to look up which artifact, package or image versions exist before adding a dependency or deploying. Not needed if you only use public registries or have no Nexus instance.
Requirements
A running Nexus Repository Manager 3.x instance reachable over the network, plus a Nexus account with read permission on the repositories. The server is a Python package (nexus-mcp-server) run locally, or a Docker image; it listens on a host and port (default 0.0.0.0:8000) using SSE or streamable-http transport. Credentials are supplied per request via the X-Nexus-Url, X-Nexus-Username and X-Nexus-Password headers, or via NEXUS_BASE_URL, NEXUS_USERNAME and NEXUS_PASSWORD.
Before you install
The server needs Nexus credentials: the X-Nexus-Password header or the NEXUS_PASSWORD secret, which are stored in the MCP client configuration and sent with each request. The optional X-Nexus-Verify-SSL header set to false disables certificate verification, so only use it with trusted self-signed instances. The default bind address 0.0.0.0 exposes the server on all interfaces; restrict it to localhost where possible. All tools are read-only, so no data is changed in Nexus.

Installation

In SourceWeft

  1. Open Nexus in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

ToolDescriptionParameters
search_maven_artifactSearch for Maven artifactsgroup_id, artifact_id, version, repository
get_maven_versionsGet all versions of a Maven artifact (paginated)group_id, artifact_id, repository, page_size, continuation_token

🐍 Python/PyPI Tools

ToolDescriptionParameters
search_python_packageSearch for Python packagesname, repository
get_python_versionsGet all versions of a Python package (paginated)package_name, repository, page_size, continuation_token

🐳 Docker Tools

ToolDescriptionParameters
list_docker_imagesList all Docker images in a repositoryrepository
get_docker_tagsGet all tags for a Docker imagerepository, image_name

Note: All tools are read-only and safe to use. No write operations (create/update/delete) are supported.

Installation

From Source

bash
# Clone the repositorygit clone https://github.com/your-org/nexus-mcp-server.gitcd nexus-mcp-server
# Create virtual environmentpython -m venv venvsource venv/bin/activate  # or venv/bin/activate.fish
# Install in development modepip install -e ".[dev]"
# Run the server (defaults to http://0.0.0.0:8000)python -m nexus_mcp

Using Docker

bash
# Quick startdocker run -p 8000:8000 addozhang/nexus-mcp-server:latest
# Or use docker-composedocker-compose up
# See DOCKER.md for detailed deployment guide

For detailed deployment guide, see DOCKER.md.

Configuration

Server Configuration

The server can be configured using command line arguments or environment variables:

VariableCLI ArgumentDescriptionDefault
NEXUS_MCP_HOST--hostHost to bind to0.0.0.0
NEXUS_MCP_PORT--portPort to listen on8000
NEXUS_MCP_TRANSPORT--transportTransport mode (sse or streamable-http)sse

Priority: CLI arguments > Environment variables > Default values

Transport Modes:

  • sse (default) - Server-Sent Events transport, compatible with most MCP clients
  • streamable-http - Streamable HTTP transport for clients that prefer this protocol

Running the Server

Local Development
bash
# SSE mode (default)python -m nexus_mcp
# Streamable-HTTP modepython -m nexus_mcp --transport streamable-http
# Custom portpython -m nexus_mcp --port 9000
# Custom host and portpython -m nexus_mcp --host 127.0.0.1 --port 9000
Using Docker
bash
# SSE mode (default)docker run -p 8000:8000 addozhang/nexus-mcp-server:latest
# Streamable-HTTP modedocker run -e NEXUS_MCP_TRANSPORT=streamable-http -p 8000:8000 addozhang/nexus-mcp-server:latest
# Custom portdocker run -e NEXUS_MCP_PORT=9000 -p 9000:9000 addozhang/nexus-mcp-server:latest
# Or use docker-composedocker-compose up
# See DOCKER.md for detailed deployment guide

For detailed deployment guide, see DOCKER.md.

Authentication via HTTP Headers

Credentials are passed as HTTP headers with each request:

HeaderDescriptionExampleRequired
X-Nexus-UrlNexus instance URLhttps://nexus.company.comYes
X-Nexus-UsernameUsernameadminYes
X-Nexus-PasswordPasswordsecret123Yes
X-Nexus-Verify-SSLVerify SSL certificatesfalseNo (default: true)

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):

json
{  "mcpServers": {    "nexus": {      "url": "http://localhost:8000/mcp",      "headers": {        "X-Nexus-Url": "https://nexus.company.com",        "X-Nexus-Username": "admin",        "X-Nexus-Password": "secret123"      }    }  }}

For self-signed certificates:

json
{  "mcpServers": {    "nexus": {      "url": "http://localhost:8000/mcp",      "headers": {        "X-Nexus-Url": "https://nexus.company.com",        "X-Nexus-Username": "admin",        "X-Nexus-Password": "secret123",        "X-Nexus-Verify-SSL": "false"      }    }  }}

MCP Client Configuration (Other Clients)

For other MCP clients that support HTTP transport:

json
{  "url": "http://localhost:8000/mcp",  "headers": {    "X-Nexus-Url": "https://nexus.company.com",    "X-Nexus-Username": "your-username",    "X-Nexus-Password": "your-password"  }}

MCP Tools

Maven Tools

ToolDescriptionParameters
search_maven_artifactSearch Maven repositoriesgroup_id, artifact_id, version, repository
get_maven_versionsGet versions of an artifact (paginated)group_id, artifact_id, repository, page_size (default 50), continuation_token

Pagination example:

python
# First pageresponse = get_maven_versions("com.example", "myapp")# response contains: versions, hasMore, continuationToken (if hasMore is true)
# Next pageif response["hasMore"]:    next_response = get_maven_versions(        "com.example",         "myapp",         continuation_token=response["continuationToken"]    )

Python Tools

ToolDescriptionParameters
search_python_packageSearch Python packagesname, repository
get_python_versionsGet versions of a package (paginated)package_name, repository, page_size (default 50), continuation_token

Pagination: Same pattern as Maven - check hasMore and use continuationToken for subsequent pages.

Docker Tools

ToolDescriptionParameters
list_docker_imagesList images in a repositoryrepository
get_docker_tagsGet tags for an imagerepository, image_name

Development

Running Tests

bash
pytest tests/ -v

Type Checking

bash
mypy src/

Linting

bash
ruff check src/ tests/

Project Structure

nexus-mcp-server/├── specs/                    # Requirements documents│   ├── authentication.md│   ├── maven-support.md│   ├── python-support.md│   ├── docker-support.md│   ├── mcp-architecture.md│   └── http-streaming.md├── src/nexus_mcp/           # Source code│   ├── __init__.py          # Package init with version│   ├── __main__.py          # CLI entry point│   ├── server.py            # FastMCP server with tools│   ├── nexus_client.py      # Nexus REST API client│   ├── auth.py              # Authentication types│   ├── dependencies.py      # Credential extraction from headers│   └── tools/               # Tool implementations│       ├── __init__.py│       └── implementations.py├── tests/                   # Test suite│   ├── conftest.py          # Fixtures and sample data│   ├── test_nexus_client.py # Client unit tests│   ├── test_tools.py        # Tool integration tests│   └── test_http_transport.py # HTTP transport tests├── AGENTS.md                # Operational guide├── IMPLEMENTATION_PLAN.md   # Task tracking└── pyproject.toml           # Python project metadata

Troubleshooting

Connection Errors

  • Verify the MCP server is running (python -m nexus_mcp)
  • Check that port 8000 is accessible
  • Verify X-Nexus-Url header 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-Username and X-Nexus-Password headers 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.

Source: README.md at commit 0c4a68a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.1LatestSep 16, 2026

Score

40% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.