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.3.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.3.0
File Size Uploaded Provenance Actions
infrahub_mcp-1.3.0.tar.gz 859.5 kB Without provenance Details for infrahub_mcp-1.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 926.1 kB

Release files / infrahub_mcp-1.3.0.tar.gz

Download URL infrahub_mcp-1.3.0.tar.gz
Size 859.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fb2a6087422c556c400e493d12625d7f2786a4e252c2653be445a71dd271c5e3
BLAKE2b-256 checksum
How to use checksums
121006897f9ca4256385fe0b7381023a36022eb45a746cb22245ba0f6c633d8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.3.0-py3-none-any.whl

Download URL infrahub_mcp-1.3.0-py3-none-any.whl
Size 66.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a902b206644d8b1659c0ad8a7dce1a2963bdcf612abca01872e22e0d161b3748
BLAKE2b-256 checksum
How to use checksums
454fd616e2beaf65bae913bb877fa3dabe7f2bf8d52b4939c8c133a2b8be0af5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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}

Security for infrahub-mcp 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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