
Nginx Proxy Manager Mcp
io.github.euisuh由 GitHub 帳號 euisuh 發布v0.5.2更新於 Oct 24, 2026
Manage Nginx Proxy Manager hosts, certificates, streams and access lists with dry-run previews.
概覽
讓助理管理 Nginx Proxy Manager 的反向代理主機、重新導向、TCP/UDP 串流、憑證與存取清單,並支援 dry-run 預覽的 MCP 伺服器。
- 可以做什麼
- 列出、檢視、建立、更新、啟用/停用與刪除代理主機,含一步完成 Let's Encrypt HTTPS 主機的流程
- 列出、申請、續期與刪除 Let's Encrypt 憑證(HTTP-01,萬用字元用 DNS-01)
- 列出、建立、更新與刪除重新導向主機與 TCP/UDP 串流,並可啟用或停用
- 管理存取清單,包含 IP 允許/拒絕規則與 basic-auth 使用者
- 診斷:依網域尋找相關主機與憑證,列出指定時間範圍內到期的憑證
- 所有寫入操作可用 dry_run 先預覽請求再執行
- 適用情境
- 適合自架或家用實驗室環境中重複的反向代理工作:把網域指向某個容器、掛上憑證,或用存取清單限制某個主機。也適合希望助理透過具型別的工具有別於管理介面完成這些 NPM 變更的使用者。
- 執行需求
- 以 stdio 在本機執行(PyPI 套件 nginx-proxy-manager-mcp-server,可用 uvx 或 pipx;已發布的 wheel 需 Python 3.12+),或以 SSE Docker sidecar 執行。需要現有 NPM 使用者的 NPM_URL、NPM_EMAIL 與 NPM_PASSWORD,由用戶端啟動時還需 MCP_TRANSPORT=stdio。需能連線至 NPM 管理 API。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Nginx Proxy Manager Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Nginx Proxy Manager MCP
[CI] [Docker] [Python Package] [PyPI] [License: MIT] [Glama MCP server]
An MCP server for Nginx Proxy Manager. It lets Claude and other MCP clients manage proxy hosts, redirection hosts, TCP/UDP streams, Let's Encrypt certificates, and access lists through typed tools instead of clicking through the NPM admin UI.
[Dry-run preview of creating an HTTPS proxy host]
The demo calls create_proxy_host_with_letsencrypt(dry_run=True) against a mocked NPM API and prints both request previews. No real NPM instance or credentials are used. To record it again, install the development dependencies and VHS, then run vhs docs/demo.tape from the repository root; docs/demo.py uses the same respx mocking approach as the tests.
Why this exists
Reverse-proxy changes are repetitive homelab work: create a host, point it at a container, attach a certificate, maybe restrict it to an access list. That is exactly the kind of operational task an AI assistant can handle well when it has narrow, typed tools and a local admin boundary.
This server runs either:
- as an SSE Docker sidecar next to an existing NPM container, or
- as a stdio MCP server for local clients.
Features
- 34 MCP tools for common NPM operations (table below).
dry_runon all mutating tools to preview NPM requests before applying them.- One-shot
create_proxy_host_with_letsencryptrequests a certificate, then creates an HTTPS-forced proxy host. - Let's Encrypt over HTTP-01 or DNS-01 (wildcards), with the request shape picked from the NPM version reported by
GET /api/. NPM_READ_ONLY=trueregisters only the 12list_/get_/find_tools.- JWT auth against the NPM API with in-memory token caching and automatic re-authentication on
401. - Docker sidecar deployment that binds the MCP port to localhost by default.
- Offline pytest suite with mocked NPM API responses, including end-to-end calls through the MCP protocol layer; CI runs it on Python 3.10–3.13.
- Ruff quality gate and contributor templates for public maintenance.
- Python wheel build validation and MCP directory metadata for promotion readiness.
- No token persistence and no hardcoded credentials.
Tools
The table is generated by docs/tools_table.py from the registered tools; tests/test_readme.py fails if it drifts. Read-only tools are the ones NPM_READ_ONLY keeps.
List tools support optional server-side filtering after fetching from NPM: domain matches a case-insensitive substring in any domain name 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 combine, and calls without arguments return the full, unchanged NPM list. For example, list_proxy_hosts(domain="example", enabled=True, compact=True) lists enabled hosts matching "example" with compact output.
All mutating tools expose dry_run=True. Previews contain method and path, plus json when the request has a body; the HTTPS workflow returns two previews in steps. The flag suppresses mutating requests, though some previews read current state. Update tools send only the fields in NPM's PUT schema (fixes #19); this is covered by mocked tests and not yet checked against a live NPM instance.
Compared to other NPM MCP servers
Competitor facts below come only from their linked READMEs fetched with gh api repos/<owner>/nginx-proxy-manager-mcp/readme on 2026-10-13. “not documented” means the README does not establish the capability, not that it is absent. Auth guard means inbound MCP client authentication, distinct from NPM API login.
This server's implementations expose dry_run on every mutating tool, provide the one-shot create_proxy_host_with_letsencrypt workflow, and publish the Docker sidecar at 127.0.0.1:8000:8000. These are verified in tools/, server.py, and docker-compose.yml. They do not establish that other servers lack equivalent capabilities.
Quick start: Docker sidecar
The bundled docker-compose.yml starts both Nginx Proxy Manager and this MCP sidecar from source. If you already run NPM, copy only the nginx-proxy-manager-mcp service into your existing compose file.
NPM_URL defaults to http://app:81, the NPM admin API on the internal Docker network. Leave it as-is when both services share a compose stack; point it at your NPM host otherwise.
To use the published GHCR image instead of building locally:
Register the SSE server with Claude Code (without --transport sse, claude mcp add treats the URL as a command to run):
Or add it manually to an MCP client config:
More examples live in examples/: Claude Desktop, Claude Code, Cursor, and Windsurf.
Quick start: uvx / pipx
If you do not want Docker, run it from PyPI (package nginx-proxy-manager-mcp-server):
Or from a local checkout:
Or install it into an isolated environment:
The published 0.6.0 wheel requires Python 3.12+; the source supports Python 3.10+.
Claude Desktop (claude_desktop_config.json) launching it with uvx:
Claude Code, same launch:
To check a launch without touching NPM, list tools: tool listing makes no NPM request, and NPM is contacted on the first tool call.
Quick start: stdio
Use stdio when you want the MCP client to launch the server process directly instead of talking to a sidecar.
Example client config:
Configuration
Set NPM_READ_ONLY=true to expose only read-only tools.
Missing required variables make the server exit with a clear error at startup rather than fail 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; use it for container and reverse-proxy health checks only.
NPM compatibility
Request bodies follow the JSON schemas in NPM's backend/schema/ and were checked against tags v2.12.6, v2.13.0, and v2.16.0. NPM rejects unknown fields (additionalProperties: false), so version differences matter:
- NPM 2.13.0 removed
meta.letsencrypt_emailandmeta.letsencrypt_agreeand uses the NPM user's account email for Let's Encrypt. The server reads the version once from the unauthenticatedGET /api/and only sends those fields to NPM older than 2.13; there,emailis required. - Update tools send only the fields in NPM's PUT schema (see #19).
These checks are against schema files and mocked tests, not a live NPM instance.
Architecture
nginx_proxy_manager_mcp/server.pyvalidates required env vars, builds the FastMCP app, registers every tool module, and serves either SSE or stdio.nginx_proxy_manager_mcp/npm_client.pywrapshttpx, exchanges the email/password for a JWT on first use, caches the token in memory, and re-authenticates once on401. NPM errors becomeNPMAPIErrorwith NPM's own message; transport failures becomeNPMConnectionErrornamingNPM_URL.nginx_proxy_manager_mcp/tools/keeps one module per NPM resource. Adding a resource means adding oneregister_*_tools(mcp, client)function and one registration line.
Development
Tests mock the NPM API with respx, so the suite runs offline and touches no real infrastructure. CI runs the same command on every push and pull request.
Releases
Tagged releases (vX.Y.Z) publish the nginx-proxy-manager-mcp-server package to PyPI via trusted publishing (.github/workflows/publish.yml) and multi-architecture Docker images to GitHub Container Registry:
ghcr.io/euisuh/nginx-proxy-manager-mcp:<version>for tags such asv0.2.0ghcr.io/euisuh/nginx-proxy-manager-mcp:<major>.<minor>for semver tagsghcr.io/euisuh/nginx-proxy-manager-mcp:latestfor the newest tagged release
The Docker workflow also builds pull requests without pushing an image, so packaging changes are validated before release.
Security
Anything that can reach this MCP server has the NPM permissions of the account in NPM_EMAIL, so it can change proxy hosts and certificates.
NPM credential scope
The server needs no NPM admin rights. It only calls /api/tokens, /api/nginx/*, and the unauthenticated GET /api/. It never touches users, settings, or the audit log. Create a dedicated NPM user (Users → Add User) instead of reusing your admin login:
- Permissions are per resource: proxy hosts, redirection hosts, streams, access lists, and certificates, each
manage,view, orhidden(NPMpermission-object.json). Grantmanageonly where the assistant should make changes. - Item visibility
alllets the user see hosts created by others;userlimits it to items it created. - For an inspect-only setup, pair a
view-only NPM user withNPM_READ_ONLY=true. NPM enforces the first and the server enforces the second. - On NPM 2.13+, Let's Encrypt registers with this user's email, so give it a real address.
Deployment
- Do not expose the MCP endpoint publicly.
- Keep the Docker port bound to
127.0.0.1unless you have another trusted network boundary. - Bare SSE runs bind to
127.0.0.1by default; setMCP_HOST=0.0.0.0only behind a trusted network boundary. - Set
MCP_BEARER_TOKENfor SSE deployments that can be reached by anything beyond the local machine, and configure clients to sendAuthorization: Bearer YOUR_TOKEN. - Use environment variables or a secrets manager for NPM credentials; do not commit
.env. - The NPM JWT lives in process memory, is sent only in the
Authorizationheader, and is never logged or written to disk. Error messages carry NPM's error text and URL, not request headers or bodies. create_letsencrypt_certwith DNS-01 takes the DNS provider credentials as a tool argument, so they appear in the MCP client's transcript. NPM never returns them, and dry-run previews show<redacted>.get_access_listdrops NPM's passwordhintfield, which reveals the first character and length of each basic-auth password.- The container runs as a non-root user.
See SECURITY.md for reporting and deployment guidance.
Roadmap
See ROADMAP.md. Near-term priorities are broader NPM resource coverage and operational hardening.
Listings
- PyPI:
nginx-proxy-manager-mcp-server. - Glama: claimed listing, rated A for license, quality and maintenance.
- awesome-mcp-servers: listed under Cloud Platforms.
- MCP Registry:
io.github.euisuh/nginx-proxy-manager-mcp. - MCPRush.
Directory metadata lives in server.json (MCP Registry), glama.json (Glama maintainer verification) and smithery.yaml (stdio launch config for Smithery-style directories).
Limitations
- Covers proxy hosts, redirection hosts, streams, certificates, and access lists only. 404 hosts, users, audit log, and settings are not implemented.
- Certificates: Let's Encrypt (HTTP-01, or DNS-01 via a certbot DNS plugin NPM knows). No custom certificate upload or download.
update_access_listreplaces basic-auth users wholesale whenitemsis given, and each item needs its password (NPM cannot return stored passwords).- Integration tests against a live NPM container (CI, NPM 2.16.0) cover only the version probe and proxy-host create/list/delete. Other request shapes are checked against NPM's schema files and mocked tests.
- One NPM instance per server process; there is no multi-tenant or multi-host routing.
- Optional SSE bearer-token auth protects the HTTP endpoint, but there is no per-tool authorization after a client is authenticated.
/healthzreports only process liveness, not NPM reachability.- Written against the NPM v2 API; older or forked NPM builds may differ.
Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md. Adding a new NPM resource follows a fixed shape:
- Create
nginx_proxy_manager_mcp/tools/<resource>.pywith aregister_<resource>_tools(mcp, client)function. - Register it in
register_all()innginx_proxy_manager_mcp/server.py. - Add
tests/test_<resource>.pycovering each tool with respx-mocked NPM responses. - Regenerate the README tool table with
python docs/tools_table.py. - Run
ruff check .andpytest -q.
Commits follow Conventional Commits.
Author
Built and maintained by Euisuh Jeong to manage a homelab reverse proxy from Claude Code.
License
MIT — see LICENSE.
來源:README.md,提交 ffac950
工具
0版本歷史
2- v0.5.2最新Oct 16, 2026
- v0.5.1Oct 13, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分