Homelab Infrastructure MCP
A unified MCP server for homelab ops — manage Nginx Proxy Manager, Docker, and Cloudflare DNS from Claude Code, Cursor, or any MCP-compatible AI assistant.
One server. Three domains. 46 tools.
Why?
Homelabbers manage infrastructure across disconnected tools. Existing MCP servers handle these individually, but real homelab tasks span all three:
"Expose my new container to the internet" = start container + create proxy host + add DNS record
This server does that in one expose_service call.
Modules
NPM (14 tools)
Proxy hosts, SSL certificates, redirections, access lists. Full CRUD via the NPM REST API.
Docker (16 tools)
Containers (list, start, stop, restart, remove, logs, stats), images (list, pull, remove), volumes, networks, prune.
DNS (8 tools)
Cloudflare zones, records (CRUD), zone export. More providers planned.
Cross-Domain (4 tools)
expose_service— DNS + proxy + container verification in one callteardown_service— reverse of exposeservice_status— full picture of a service across all three systemsinfrastructure_overview— dashboard in a tool call
Safety (4 tools)
- Three modes:
normal,read-only,dry-run - Destructive operations require confirmation tokens (60s expiry)
- Selective module loading — only enable what you use
Quick Start
Claude Code (stdio)
pip install homelab-infra-mcp
claude mcp add homelab -- python -m homelab_infra_mcp
Set environment variables:
export NPM_URL=http://localhost:81
export NPM_EMAIL=admin@example.com
export NPM_PASSWORD=changeme
export CLOUDFLARE_API_TOKEN=your-token
Docker
services:
homelab-mcp:
image: ghcr.io/seayniclabs/homelab-infra-mcp:latest
environment:
- TZ=America/Chicago
- NPM_URL=http://host.docker.internal:81
- NPM_EMAIL=admin@example.com
- NPM_PASSWORD=changeme
- DOCKER_HOST=unix:///var/run/docker.sock
- DNS_PROVIDER=cloudflare
- CLOUDFLARE_API_TOKEN=your-token
- HOMELAB_MCP_MODE=normal
- HOMELAB_MCP_TRANSPORT=sse
- HOMELAB_MCP_PORT=8200
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
ports:
- "8200:8200"
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
NPM_URL |
Yes | http://localhost:81 |
NPM API URL |
NPM_EMAIL |
Yes | — | NPM admin email |
NPM_PASSWORD |
Yes | — | NPM admin password |
DOCKER_HOST |
No | unix:///var/run/docker.sock |
Docker socket |
DNS_PROVIDER |
No | cloudflare |
DNS provider |
CLOUDFLARE_API_TOKEN |
Cond. | — | Required for DNS module |
CLOUDFLARE_ZONE_ID |
No | — | Default zone ID |
HOMELAB_MCP_MODE |
No | normal |
normal / readonly / dryrun |
HOMELAB_MCP_MODULES |
No | npm,docker,dns |
Comma-separated enabled modules |
HOMELAB_MCP_TRANSPORT |
No | stdio |
stdio or sse |
HOMELAB_MCP_PORT |
No | 8200 |
SSE server port |
Selective Modules
Don't use NPM? Disable it:
export HOMELAB_MCP_MODULES=docker,dns
Only NPM tools will register. No Docker/DNS connection errors.
Safety
All destructive operations (delete, prune, remove) follow a two-step confirmation pattern:
- First call returns details + a one-time token
- Pass the token to
confirm_destructiveto execute
Tokens expire after 60 seconds. Dry-run mode previews all changes without executing.
Contributing
Contributions welcome. See CONTRIBUTING.md for guidelines.
License
MIT. See LICENSE.
Built by Seaynic Labs.
Metadata
Release files for homelab-infra-mcp 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| homelab_infra_mcp-1.0.0.tar.gz | 22.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| homelab_infra_mcp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.3 kB
Release files / homelab_infra_mcp-1.0.0.tar.gz
| Download URL | homelab_infra_mcp-1.0.0.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fed476e32ced6c755b142cdee3b5454ea92c3c1248794c175fb67c4fb1b8d840
|
|
BLAKE2b-256 checksum How to use checksums |
788f65bd0239239924595689fbbf12dc6260a35d3461995f2adbe8325808a1d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / homelab_infra_mcp-1.0.0-py3-none-any.whl
| Download URL | homelab_infra_mcp-1.0.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7c3c62b35adf8d013ad2d7597519a27a980ec3dfa476d5d62e19f4052803cd4
|
|
BLAKE2b-256 checksum How to use checksums |
ece33672308ccd84d3948a8876767e1ae6490004619bb19fcf91292f155d7b48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|