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-1.0.0.tar.gz (22.6 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-1.0.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for homelab_infra_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fed476e32ced6c755b142cdee3b5454ea92c3c1248794c175fb67c4fb1b8d840
MD5 04f8dd96f1f1d86e52133259f0c394e4
BLAKE2b-256 788f65bd0239239924595689fbbf12dc6260a35d3461995f2adbe8325808a1d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for homelab_infra_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7c3c62b35adf8d013ad2d7597519a27a980ec3dfa476d5d62e19f4052803cd4
MD5 1a96c79ec4aef1c3df5cda4bbb64e969
BLAKE2b-256 ece33672308ccd84d3948a8876767e1ae6490004619bb19fcf91292f155d7b48

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