Skip to main content

Infrahub MCP Server

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.

Installation

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

Quickstart

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

What you can do with it

  • Query your infrastructure data from natural language — find devices, interfaces, IP addresses, or any kind in your schema, with attribute filtering and partial-match search.
  • Explore your schema without leaving the conversation — the server exposes your catalog, per-kind attribute/filter maps, and the GraphQL SDL as MCP resources.
  • Make changes on isolated branches — writes land on an auto-created session branch (mcp/session-YYYYMMDD-<hex>); the default branch is never touched directly.
  • Submit changes for human review — call propose_changes to open a Proposed Change for approval before merging.
  • Run arbitrary GraphQL — execute any query or mutation against the Infrahub API when you need full control.

Documentation

Full documentation, including client configuration for Cursor, VS Code, Claude Desktop, and Claude Code, is available at the Infrahub MCP Server docs site.

About Infrahub

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.

License

Apache 2.0 — see LICENSE.

Metadata

Release files for infrahub-mcp 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for infrahub-mcp 1.2.0
File Size Uploaded
infrahub_mcp-1.2.0.tar.gz 876.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for infrahub-mcp 1.2.0
File Interpreter ABI Platform
infrahub_mcp-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 938.1 kB

Release files / infrahub_mcp-1.2.0.tar.gz

Download URL infrahub_mcp-1.2.0.tar.gz
Size 876.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7a0fc196e01c7b82881df0c382c8cb532fa0e05348d5a8ba4e1fc4a379a772e9
BLAKE2b-256 checksum
How to use checksums
bfba17127af0eb84656e8bac84ea894447df80ca63206d4ea974d5f4507edc55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / infrahub_mcp-1.2.0-py3-none-any.whl

Download URL infrahub_mcp-1.2.0-py3-none-any.whl
Size 61.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0ce95d1bd0ba8fa98effc7afab68d1f2b6ed05d65b23f4dd7cfd1bbb1eca159
BLAKE2b-256 checksum
How to use checksums
c1f9ab0078fedef7b241a2742532c08b8ec9e460dea540ec51a98acc5929504d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page