mcpField
I
infrahub-mcp

infrahub-mcp

Local
github.com/opsmillCloud & Infra10Updated 1d ago

About infrahub-mcp

infrahub-mcp connects AI assistants and IDE agents to Infrahub infrastructure data, supporting queries and controlled changes with human review before merging.

Key features

  1. 01Query and filter infrastructure data
  2. 02Explore schema and GraphQL SDL resources
  3. 03Write changes on isolated branches
  4. 04Submit proposed changes for approval
  5. 05Run GraphQL queries and mutations

Use cases

  1. 01Find devices or IP addresses using natural language
  2. 02Inspect Infrahub schema from a conversation
  3. 03Prepare infrastructure updates for human review

MCP support

The MCP server exposes Infrahub data and schema resources, along with tools for queries, writes, proposed changes, and GraphQL operations. It supports stdio and Streamable HTTP transports.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"com-opsmill-infrahub": {
"command": "uvx",
"args": [
"infrahub-mcp"
],
"env": {
"INFRAHUB_ADDRESS": "<INFRAHUB_ADDRESS>",
"INFRAHUB_API_TOKEN": "<INFRAHUB_API_TOKEN>"
}
}
}
}
Run commanduvx infrahub-mcp
Environment variables to set
INFRAHUB_ADDRESSThe URL/address of your Infrahub instance
INFRAHUB_API_TOKENSecretYour Infrahub API token for authentication

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypiinfrahub-mcp0.1.2

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.