Connects Claude and other MCP clients to your Infrahub infrastructure database so agents can query devices, interfaces, IP addresses, and any schema kind using natural language or raw GraphQL. All writes land on isolated session branches and require a human approved Proposed Change before merging to default. You get tools for CRUD operations, schema introspection as MCP resources, and filtering with partial match search. Works over stdio for desktop clients or streamable HTTP for remote deployments. Reach for this when you want AI assisted infrastructure queries and change proposals without giving agents direct write access to your source of truth.
Infrahub MCP Server connects AI assistants and IDE agents to Infrahub using the open Model Context Protocol standard — so agents can query, create, update, and propose changes to your infrastructure data through a consistent, audited interface. It works with any MCP-compatible client (Claude Desktop, VS Code, Cursor, CLI agents, and more) with no custom glue code required.
All writes are branch-isolated and require human approval before merging — agents never modify your default branch directly.
pip install infrahub-mcp
# or
uv pip install infrahub-mcp
Docker:
docker pull registry.opsmill.io/opsmill/infrahub-mcp:latest
# or use Docker Compose:
docker compose up -d
Point the server at your Infrahub instance via environment variables, then run it over the transport your client expects.
stdio (default — for Claude Desktop, VS Code, Cursor):
export INFRAHUB_ADDRESS=http://localhost:8000
export INFRAHUB_API_TOKEN=<your-token>
infrahub-mcp
Streamable HTTP (for remote clients, sidecar deployments):
infrahub-mcp --transport streamable-http --host 0.0.0.0 --port 8001
mcp/session-YYYYMMDD-<hex>); the default branch is never touched directly.propose_changes to open a Proposed Change for approval before merging.Full documentation, including client configuration for Cursor, VS Code, Claude Desktop, and Claude Code, is available at the Infrahub MCP Server docs site.
Infrahub is an open source infrastructure data management and automation platform (AGPLv3), developed by OpsMill. It gives infrastructure and network teams a unified, schema-driven source of truth — devices, topology, IP space, configuration — with built-in version control, a generator framework for automation, and native integrations with Git, Ansible, Terraform, and CI/CD pipelines.
Apache 2.0 — see LICENSE.
INFRAHUB_ADDRESS*The URL/address of your Infrahub instance
INFRAHUB_API_TOKEN*secretYour Infrahub API token for authentication