SuperAPIAI Directory

nginx-proxy-manager-mcp

github.com · AI developer platforms

nginx-proxy-manager-mcp is an MCP server for Nginx Proxy Manager (NPM) that lets MCP clients such as Claude manage reverse proxy configurations through typed tools, without clicking through the NPM admin UI item by item. It provides 34 MCP tools covering proxy hosts, redirection hosts, TCP/UDP streams, Let's Encrypt certificates (HTTP-01/DNS-01), and access lists; all mutating tools support dry_run previews, and a read-only mode can be set to expose only query tools. It supports running as an SSE Docker sidecar or locally via stdio, uses JWT authentication for the NPM API, and caches tokens in memory.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Purpose

nginx-proxy-manager-mcp is an MCP (Model Context Protocol) server for letting Claude and other MCP clients manage Nginx Proxy Manager (NPM) through typed tools. It targets repetitive reverse proxy operations in scenarios such as home labs—for example, creating hosts, pointing them at containers, attaching certificates, and restricting access lists—and hands these operations to an AI assistant equipped with narrowly scoped typed tools instead of manually clicking in the NPM admin UI.

Key capabilities

  • Provides 34 MCP tools covering common NPM operations, including proxy hosts, redirection hosts, TCP/UDP streams, Let's Encrypt certificates, and access lists.
  • All mutating tools support dry_run=True, allowing the NPM request to be previewed before it is actually applied; the preview includes method and path, and json when there is a request body; HTTPS workflows return two previews in steps.
  • Provides a one-shot create_proxy_host_with_letsencrypt workflow: first request a certificate, then create a proxy host that enforces HTTPS.
  • Supports Let's Encrypt HTTP-01 or DNS-01 (wildcard), with the request structure chosen based on the NPM version returned by GET /api/ .
  • When NPM_READ_ONLY=true is set, only the 12 list_ / get_ / find_ read-only tools are registered.
  • List tools support optional server-side filtering:domain performs case-insensitive substring matching on domain names for proxy hosts, redirection hosts, and certificates;enabled filters proxy hosts, redirection hosts, and streams by status; all four accept compact=True to return only summary fields. Filters can be combined, and calling without parameters returns the complete, unmodified NPM list.
  • Uses JWT authentication for the NPM API, caches tokens in memory, and automatically re-authenticates once on a 401.
  • Provides a Docker sidecar deployment that binds the MCP port to localhost by default.
  • Includes an offline pytest test suite using mocked NPM API responses, including end-to-end calls through the MCP protocol layer; CI runs on Python 3.10–3.13.
  • Provides a Ruff quality gate, contributor templates, Python wheel build verification, and MCP catalog metadata.
  • Does not persist tokens and does not hardcode credentials.

Usage

Docker sidecar

The repository's bundled docker-compose.yml starts both Nginx Proxy Manager and this MCP sidecar from source. If you already have NPM, just copy the nginx-proxy-manager-mcp service into your existing compose file.NPM_URL defaults to http://app:81, i.e. the NPM admin API on the internal Docker network; keep the default when both services are in the same compose stack, otherwise point it at your NPM host. You can also use the published GHCR image instead of a local build.

When registering the SSE server with Claude Code, you need to include --transport sse, otherwise claude mcp add treats the URL as a command to execute. You can also add it manually to the MCP client configuration. Theexamples/ directory contains examples for Claude Desktop, Claude Code, Cursor, and Windsurf.

uvx / pipx

If you don't want to use Docker, you can run it from PyPI (package name nginx-proxy-manager-mcp-server), or check it out and run it locally, or install it into an isolated environment. The published 0.6.0 wheel requires Python 3.12+, while the source supports Python 3.10+.

stdio

Use stdio when you want the MCP client to launch the server process directly instead of connecting to a sidecar. See the repository for an example client configuration. Setting NPM_READ_ONLY=true exposes only read-only tools. If required variables are missing, the server exits at startup with a clear error instead of failing on the first API call.

SSE mode also exposes GET /healthz, an unauthenticated liveness endpoint that returns a small JSON response; it does not contact NPM or validate credentials and is intended only for container and reverse-proxy health checks.

When to use it

  • Managing a reverse proxy from an MCP client such as Claude Code in a home lab.
  • Operational changes that need a preview before being applied.
  • Read-only inspection scenarios that only need to check configuration, optionally paired with a view-only NPM user and NPM_READ_ONLY=true.

Limitations

  • Covers only proxy hosts, redirection hosts, streams, certificates, and access lists; 404 hosts, users, audit logs, and settings are not implemented.
  • Certificates support only Let's Encrypt (HTTP-01, or DNS-01 via a certbot DNS plugin known to NPM); custom certificate upload or download is not supported.
  • update_access_list replaces the basic-auth users entirely when items are provided, and each item requires a password (NPM cannot return stored passwords).
  • Integration tests against a live NPM container (CI, NPM 2.16.0) cover only version probing and proxy host create/list/delete; other request structures are checked against NPM schema files and mock tests.
  • One NPM instance per server process; multi-tenant or multi-host routing is not supported.
  • Optional SSE bearer token authentication protects the HTTP endpoints, but there is no per-tool authorization after client authentication.
  • /healthz reports only process liveness, not NPM reachability.
  • Built against the NPM v2 API; older or forked NPM builds may differ.
  • Anything that can reach this MCP server has the NPM permissions of the NPM_EMAIL account and can change proxy hosts and certificates; do not expose the MCP endpoint publicly, and keep the Docker port bound to 127.0.0.1 unless there is another trusted network boundary.
  • create_letsencrypt_cert When using DNS-01, DNS provider credentials are passed as tool parameters and will appear in MCP client records; NPM does not return these credentials, and the dry-run preview shows <redacted>。
  • get_access_list discards NPM's password hint field, which leaks the first character and length of every basic-auth password.

Security and permissions

The server does not need NPM administrator privileges and only calls /api/tokens、/api/nginx/* and the unauthenticated GET /api/, and does not touch users, settings, or audit logs. Create a dedicated NPM user instead of reusing an administrator login. Permissions are per resource: proxy hosts, redirection hosts, streams, access lists, and certificates each have manage, view, or hidden; grant manage only on the resources the assistant needs to change. Set project visibility to all to see hosts created by others, or to user to limit it to items you created. Inspection-only scenarios can pair a view-permission user with NPM_READ_ONLY=true, the former enforced by NPM and the latter enforced by the server. On NPM 2.13+, Let's Encrypt registers using that user's email, so provide a real address. Use environment variables or a secrets manager for credentials, and do not commit .env. The NPM JWT is kept only in process memory, sent only via the Authorization header, and is neither logged nor written to disk. The container runs as a non-root user.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools