nginx-proxy-manager-mcp
Allows requesting and managing Let's Encrypt SSL/TLS certificates for proxy hosts via HTTP-01 or DNS-01 challenges.
Provides tools for managing Nginx Proxy Manager, including creating and managing proxy hosts, streams, redirection hosts, 404 hosts, and Let's Encrypt certificates.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nginx-proxy-manager-mcp Point myapp.example.com to 192.168.1.100:8080 with SSL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nginx-proxy-manager-mcp
A Model Context Protocol server that exposes the Nginx Proxy Manager (NPM) REST API to AI agents. Let assistants like Claude Desktop, Hermes, Cursor, or any MCP-compatible client create reverse proxies, TCP/UDP streams, redirects, 404 hosts, and request/renew Let's Encrypt certificates for you — in plain English.
"Hey Hermes, point
grafana.example.comat192.168.1.50:3000and get a Let's Encrypt cert for it." →npm_create_proxy_host+npm_create_certificate+npm_update_proxy_host
Features
Proxy hosts — create / list / update / delete / enable / disable reverse proxies
Streams — TCP & UDP port forwarding
Redirection hosts — domain → domain redirects (301/302)
Dead (404) hosts — return 404 for parked/unused domains
Certificates — request Let's Encrypt (HTTP-01 or DNS-01), renew, delete, download
Users & audit log — inspect users and recent actions
Raw passthrough —
npm_raw_requestfor anything not covered30 tools total, all typed with JSON schemas for reliable agent use
Two transports —
stdio(default, for local agents) and StreamablehttpNo runtime deps besides the official MCP SDK + zod
Related MCP server: Nginx Proxy Manager MCP
Quick start
1. Install
git clone https://github.com/linuskang/nginx-proxy-manager-mcp.git
cd nginx-proxy-manager-mcp
npm install
npm run buildOr run directly without cloning (npx once published):
npx nginx-proxy-manager-mcp2. Configure
Copy .env.example → .env and fill in your NPM admin credentials:
cp .env.example .envVariable | Required | Description |
| ✅ | Base URL of NPM, e.g. |
| ✅* | Admin email ( |
| ✅* | Admin password ( |
| ✅* | Pre-existing JWT token (takes precedence over email/password) |
| ❌ | Request timeout, default |
| ❌ | Verbose stderr logging, default |
| ❌ |
|
| ❌ | HTTP port, default |
| ❌ | HTTP bind address, default |
| ❌ | HTTP endpoint path, default |
* Provide either NPM_TOKEN or both NPM_EMAIL + NPM_PASSWORD.
3. Wire it up to your agent
Claude Desktop (or Claude Code)
Edit claude_desktop_config.json (macOS:
~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"nginx-proxy-manager": {
"command": "node",
"args": ["D:/Code/Git/nginx-proxy-manager-mcp/dist/index.js"],
"env": {
"NPM_BASE_URL": "http://npm.local:81",
"NPM_EMAIL": "[email protected]",
"NPM_PASSWORD": "your-password",
},
},
},
}Hermes
In your Hermes agent config (or MCP registry), add a server entry pointing at the
same command/env above. Hermes speaks standard MCP over stdio, so no special
setup is needed — just point it at node dist/index.js with your NPM_* env.
Remote / HTTP transport (browser agents, remote runners)
MCP_TRANSPORT=http MCP_PORT=3000 MCP_HOST=0.0.0.0 node dist/index.js
# POST your JSON-RPC messages to http://localhost:3000/mcpAvailable tools (30)
Proxy hosts
Tool | Description |
| List all reverse proxies |
| Get one by id |
| Create a reverse proxy (the headline tool) |
| Update fields on an existing proxy |
| Delete by id |
| Enable a disabled proxy |
| Disable a proxy (without deleting) |
Streams (TCP/UDP port forwarding)
Tool | Description |
| List all streams |
| Get one by id |
| Create a TCP/UDP port forward |
| Update a stream |
| Delete a stream |
Redirection hosts
Tool | Description |
| List redirections |
| Create a redirect (301/302) |
| Update a redirect |
| Delete a redirect |
Dead (404) hosts
Tool | Description |
| List 404 hosts |
| Create a 404 host |
| Update a 404 host |
| Delete a 404 host |
Certificates (Let's Encrypt & custom)
Tool | Description |
| List all certificates |
| Request a new Let's Encrypt cert (HTTP-01 or DNS-01) |
| Renew an existing cert |
| Delete a certificate |
| Download cert / private key / chain (PEM) |
Users, audit & power tools
Tool | Description |
| Health check the NPM instance |
| List NPM users |
| Get a user by id |
| Browse recent audit log entries |
| Authenticated escape hatch to any |
Example: create a proxy host
// npm_create_proxy_host
{
"domain_names": ["grafana.example.com"],
"forward_scheme": "http",
"forward_host": "192.168.1.50",
"forward_port": 3000,
"block_exploits": true,
"allow_websocket_upgrade": true,
"certificate_id": 0,
"ssl_forced": false,
"enabled": true,
}A natural-language request like "Proxy grafana.example.com → 192.168.1.50:3000
with a Let's Encrypt cert" will typically run npm_create_proxy_host, then
npm_create_certificate (provider letsencrypt), then
npm_update_proxy_host with the returned certificate_id and ssl_forced: true.
Deploying with Docker
A prebuilt multi-arch image (linux/amd64 + linux/arm64) is published to the
GitHub Container Registry on every push to main/master and on version tags:
docker pull ghcr.io/linuskang/nginx-proxy-manager-mcp:latestImage tags: latest, :vX.Y.Z, :X.Y, :X, :sha-<short>, :master.
Which transport? Use stdio when the agent runs on the same machine (Claude Desktop, Hermes, Cursor) and you launch the container as a child process. Use http when a remote agent or browser client needs to POST JSON-RPC over the network.
Option A — stdio (local agent on the same machine)
Your agent config launches the container and speaks MCP over its stdin/stdout.
Point the agent's command at docker and pass run -i --rm plus the env vars:
// Claude Desktop / Hermes MCP server config
{
"mcpServers": {
"nginx-proxy-manager": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"NPM_BASE_URL",
"-e",
"NPM_EMAIL",
"-e",
"NPM_PASSWORD",
"ghcr.io/linuskang/nginx-proxy-manager-mcp:latest",
],
"env": {
"NPM_BASE_URL": "http://your-npm-host:81",
"NPM_EMAIL": "[email protected]",
"NPM_PASSWORD": "your-password",
},
},
},
}-i keeps stdin open so the agent can talk to the server; --rm cleans up the
container when the agent exits. No port is published because stdio doesn't need
one. Transport defaults to stdio, so you don't have to set MCP_TRANSPORT.
Option B — HTTP (remote / networked agents)
Expose a Streamable HTTP endpoint that any MCP client can POST to:
docker run -d --name npm-mcp \
-p 3000:3000 \
-e MCP_TRANSPORT=http \
-e MCP_PORT=3000 \
-e MCP_HOST=0.0.0.0 \
-e NPM_BASE_URL=http://your-npm-host:81 \
-e [email protected] \
-e NPM_PASSWORD=your-password \
ghcr.io/linuskang/nginx-proxy-manager-mcp:latestMCP endpoint: http://localhost:3000/mcp
Verify it's up:
curl -s http://localhost:3000/mcp -X POST \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'You should get a JSON-RPC response with serverInfo.name == "nginx-proxy-manager-mcp".
Point your agent at the URL and it will initialize, call tools/list, and
start driving your NPM instance.
Option C — docker compose
For a persistent HTTP deployment, use the bundled docker-compose.yml:
cp .env.example .env
# edit .env: set NPM_BASE_URL, NPM_EMAIL, NPM_PASSWORD,
# MCP_TRANSPORT=http, MCP_PORT=3000, MCP_HOST=0.0.0.0
docker compose up -dLogs:
docker compose logs -fStop / remove:
docker compose downPutting NPM and the MCP server on the same Docker network (recommended)
If Nginx Proxy Manager itself runs in Docker, put the MCP container on the same network so you can address NPM by service name — no published ports needed:
docker network create npm-net
docker network connect npm-mcp npm-net # if MCP created its own net
docker network connect <npm-container> npm-net # for the NPM containerThen set NPM_BASE_URL=http://<npm-service-name>:81 (e.g. http://npm:81) and
the MCP server talks to NPM over the private bridge.
Build locally (optional, same Dockerfile used by CI)
docker build -t nginx-proxy-manager-mcp .
# stdio:
docker run -i --rm \
-e NPM_BASE_URL=http://npm:81 -e NPM_EMAIL=a@b.c -e NPM_PASSWORD=secret \
nginx-proxy-manager-mcp
# http:
docker run -d -p 3000:3000 \
-e MCP_TRANSPORT=http -e MCP_PORT=3000 -e MCP_HOST=0.0.0.0 \
-e NPM_BASE_URL=http://npm:81 -e NPM_EMAIL=a@b.c -e NPM_PASSWORD=secret \
nginx-proxy-manager-mcpTroubleshooting
npm:54/ connection refused on port 81 —NPM_BASE_URLmust point at the admin API port (81), not 80/443. If NPM is in another container, use the service name and a shared Docker network.NPM_TOKEN or both NPM_EMAIL and NPM_PASSWORD must be set— provide either a JWT (NPM_TOKEN) or an email + password pair.Tools call returns HTTP 401 — your token expired or the credentials are wrong. Remove
NPM_TOKENto fall back to email/password auto-refresh, or regenerate the token from the NPM UI.Want to debug requests? Set
-e NPM_DEBUG=trueto log every request URL to stderr (docker logs -f npm-mcp).
Development
npm install # install deps
npm run dev # run from source (tsx)
npm run build # compile to dist/
npm run typecheck # typecheck only
npm run lint # eslint
npm run format # prettier write
npm run check # lint + typecheck + format:checkProject layout:
src/
config.ts # env-based configuration
types.ts # NPM API TypeScript types
client.ts # NPM REST client (auth, retry, JSON)
index.ts # MCP server + stdio/http transports
tools/
_shared.ts # tool helpers (ok/fail/guard)
proxy-hosts.ts
streams.ts
redirection-hosts.ts
dead-hosts.ts
certificates.ts
misc.ts # ping, users, audit, raw request
index.ts # aggregatorCompatibility
Nginx Proxy Manager 2.x (REST API on port 81)
Node.js ≥ 18 (uses global
fetch,AbortSignal.timeout)MCP protocol version 2024-11-05 and later
Security notes
Credentials are passed via environment variables only — never logged unless
NPM_DEBUGis on (and even then, only request URLs, never the password).The exposed tools use your NPM admin token, so they can do anything an admin can. Run this server in a trusted environment and restrict network exposure.
Prefer scoped NPM users if your deployment supports it.
Contributing
PRs welcome! Please open an issue first for larger changes. Run npm run check
before submitting. See CONTRIBUTING.md.
License
Licensed under Creative Commons Attribution-NonCommercial 4.0 International
(CC BY-NC 4.0) — see
LICENSE. You are free to share and adapt for non-commercial
purposes with attribution. Commercial use requires a separate license from the
author.
Available Tools
30 toolsnpm_create_certificateA
Request a new Lets Encrypt certificate (HTTP-01 challenge) or upload a custom certificate. Use provider "letsencrypt" for standard HTTP challenge runs.
Inputs: domain_names (required), meta, provider, nice_name.
npm_create_dead_hostA
Create a 404 (dead) host for one or more domains.
Inputs: domain_names (required), meta, enabled, certificate_id, +1 more.
npm_create_proxy_hostB
Create a new reverse proxy host. This is the main way to expose a service via a domain through NPM.
Inputs: domain_names (required), forward_host (required), forward_port (required), forward_scheme (required), +12 more.
npm_create_redirection_hostB
Create a redirection host that forwards one domain to another.
Inputs: domain_names (required), forward_scheme (required), forward_http_code (required), forward_domain_name (required), +6 more.
npm_create_streamC
Create a TCP/UDP port forward (stream).
Inputs: incoming_port (required), forwarding_host (required), forwarding_port (required), meta, +3 more.
npm_delete_certificateC
Delete a certificate by id.
Inputs: id (required).
npm_delete_dead_hostB
Delete a 404 (dead) host by id.
Inputs: id (required).
npm_delete_proxy_hostB
Delete a proxy host by id.
Inputs: id (required).
npm_delete_redirection_hostC
Delete a redirection host by id.
Inputs: id (required).
npm_delete_streamB
Delete a stream by id.
Inputs: id (required).
npm_disable_proxy_hostB
Disable a proxy host (without deleting it).
Inputs: id (required).
npm_download_certificateB
Download a certificate, its private key, or the chain (PEM).
Inputs: id (required), format (required).
npm_enable_proxy_hostB
Enable a disabled proxy host.
Inputs: id (required).
npm_get_proxy_hostB
Get a single proxy host by id.
Inputs: id (required).
npm_get_streamB
Get a single stream by id.
Inputs: id (required).
npm_get_userA
Get a single user by id.
Inputs: id (required).
npm_list_audit_logC
List recent audit log entries.
Inputs: page, count.
npm_list_certificatesA
List all SSL certificates (Lets Encrypt and custom).
Inputs: no named parameters.
npm_list_dead_hostsA
List all 404 (dead) hosts.
Inputs: no named parameters.
npm_list_proxy_hostsA
List all Nginx Proxy Manager proxy hosts (reverse proxies).
Inputs: no named parameters.
npm_list_redirection_hostsA
List all redirection hosts.
Inputs: no named parameters.
npm_list_streamsA
List all TCP/UDP stream port forwards.
Inputs: no named parameters.
npm_list_usersA
List all NPM users.
Inputs: no named parameters.
npm_pingA
Health check — verify the NPM instance is reachable.
Inputs: no named parameters.
npm_raw_requestA
Escape hatch: send any authenticated request to the NPM API. Use path like "/api/nginx/proxy-hosts". Method is upper-case. Optional query (object) and body (object) are JSON-encoded.
Inputs: path (required), method (required), body, query.
npm_renew_certificateB
Renew (re-request) an existing Lets Encrypt certificate by id.
Inputs: id (required).
npm_update_dead_hostA
Update a 404 (dead) host. Provide only fields to change.
Inputs: id (required), enabled, domain_names, certificate_id, +1 more.
npm_update_proxy_hostA
Update an existing proxy host. Provide only fields you want to change.
Inputs: id (required), enabled, locations, ssl_forced, +12 more.
npm_update_redirection_hostA
Update a redirection host. Provide only fields to change.
Inputs: id (required), enabled, domain_names, preserve_path, +6 more.
npm_update_streamA
Update an existing stream. Provide only fields to change.
Inputs: id (required), enabled, incoming_port, tcp_forwarding, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 30 tools
Every tool targets a specific resource and action (e.g., proxy hosts, streams, certificates), and even similar host types (redirection vs dead) have distinct purposes. The descriptions clearly separate list/get/create/update/delete/control operations, so an agent can reliably select the intended tool.
The vast majority of tools follow a consistent verb_noun pattern (e.g., npm_list_proxy_hosts, npm_create_certificate). However, npm_ping and npm_raw_request deviate from this pattern, and the mix of plural list names with singular get names is a minor inconsistency.
With 30 tools, the server clearly exceeds the 25+ threshold for 'too many'. While each tool covers a distinct operation, the sheer number makes the surface area heavy and potentially overwhelming for agents, even though the underlying domain (NPM) is broad.
The set provides comprehensive CRUD coverage for proxy hosts, streams, redirection hosts, and dead hosts, plus certificate management. Minor gaps exist: no get-by-id for redirection/dead hosts, no user write operations, and no certificate get-by-id; the npm_raw_request escape hatch helps work around these gaps.
Related MCP Connectors
Manage NodePal Minecraft servers, worlds, mods, backups and console from AI agents.
Manage hosts, redirects, SSL, and traffic analytics from Claude and other AI assistants.
Manage Laravel Forge servers, sites, and deployments from your AI assistant.
Inspect and control your Northflank projects, services, jobs, and builds from your AI assistant.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables AI assistants to query and manage Traefik reverse proxy configurations, including routers, services, and middlewares, through natural language. It supports monitoring service health, viewing statistics, and performing administrative tasks across various providers like Docker.66-
- AlicenseBqualityDmaintenanceEnables management of Nginx Proxy Manager instances for configuring proxy hosts, requesting Let's Encrypt SSL certificates, and managing access lists. It allows users to control their web proxy infrastructure through natural language commands in MCP-compatible environments.503MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Nginx Proxy Manager instances through natural language, covering 28 tools for proxy hosts, certificates, streams, and more.MIT
- AlicenseCqualityDmaintenanceMCP server that abstracts the Nginx Proxy Manager API, enabling management of proxy hosts, redirections, streams, certificates, access lists, and users through natural language.548 npm1AGPL 3.0