Skip to main content

Unified MCP server for homelab infrastructure — Nginx Proxy Manager, Docker, and DNS management

Project description

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 call
  • teardown_service — reverse of expose
  • service_status — full picture of a service across all three systems
  • infrastructure_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:

  1. First call returns details + a one-time token
  2. Pass the token to confirm_destructive to 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

homelab_infra_mcp-0.1.1.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

homelab_infra_mcp-0.1.1-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file homelab_infra_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: homelab_infra_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for homelab_infra_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4fe8feb0d6e61bfa04b6f6e39b957bb2d50f887eb54b94f042abe170ae3c5fff
MD5 8339eb05c1c09f3d7056bbf89c5d196e
BLAKE2b-256 56a667760bc1edf30e6ca087e6bdabf832e2643da0061de961b79f7f68f4105a

See more details on using hashes here.

File details

Details for the file homelab_infra_mcp-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for homelab_infra_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0c419f65d767d83dd1fc98d825e1b1830ea4b7bff8dfccb7c691addd70a631f
MD5 9c9cf5904bf69ce5683f2465960cddc4
BLAKE2b-256 6cec424a767e2b808ac94f5a23a533c0986a44336641997767321ad98611d411

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page