PluginBench
MCP Server
Active
Apache-2.0

com.opsmill/infrahub-mcp MCP Server

com.opsmill/infrahub-mcp

Connect AI assistants to Infrahub infrastructure data with audited, branch-isolated changes.

What is the com.opsmill/infrahub-mcp MCP server?

The Infrahub MCP Server connects AI assistants and IDE agents to Infrahub, an open-source infrastructure data management platform, using the Model Context Protocol standard. It enables agents to query, create, update, and propose changes to infrastructure data through a consistent, audited interface with all writes isolated to branches requiring human approval before merging.

This server bridges AI assistants to Infrahub, letting you query infrastructure data in natural language, explore your schema, make changes on isolated branches, and submit changes for human review. All modifications are branch-isolated and require approval before touching your default branch, making it safe for AI-assisted infrastructure management.

How to install com.opsmill/infrahub-mcp

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • INFRAHUB_ADDRESS
    required

    The URL/address of your Infrahub instance

  • INFRAHUB_API_TOKEN
    required
    secret

    Your Infrahub API token for authentication

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "infrahub-mcp": {
      "command": "uvx",
      "args": [
        "infrahub-mcp"
      ],
      "env": {
        "INFRAHUB_ADDRESS": "<YOUR_INFRAHUB_ADDRESS>",
        "INFRAHUB_API_TOKEN": "<YOUR_INFRAHUB_API_TOKEN>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • query_infrastructure_data — Query infrastructure data from natural language — find devices, interfaces, IP addresses, or any kind in your schema with attribute filtering and partial-match search.
  • explore_schema — Explore your Infrahub schema without leaving the conversation — access your catalog, per-kind attribute/filter maps, and GraphQL SDL as MCP resources.
  • make_changes_on_branches — Make changes on isolated session branches (mcp/session-YYYYMMDD-<hex>) — the default branch is never touched directly.
  • propose_changes — Submit changes for human review by calling propose_changes to open a Proposed Change for approval before merging.
  • run_graphql — Execute arbitrary GraphQL queries or mutations against the Infrahub API for full control when needed.

Use cases

  • Query infrastructure inventory (devices, interfaces, IP addresses) using natural language and filters
  • Explore your infrastructure schema and data model without leaving the AI conversation
  • Create or update infrastructure records on isolated branches with automatic session tracking
  • Propose infrastructure changes for human review and approval before merging to production
  • Generate infrastructure configurations or reports by querying and analyzing your source of truth

com.opsmill/infrahub-mcp MCP server FAQ

What is the Infrahub MCP Server?

It's an MCP server that connects AI assistants (Claude, Cursor, VS Code) to Infrahub, an open-source infrastructure data management platform. It lets agents query, create, update, and propose changes to infrastructure data with all writes isolated to branches requiring human approval.

Is it free?

Yes. The Infrahub MCP Server is Apache 2.0 licensed. Infrahub itself is open source under AGPLv3.

How do I install it?

Install via pip: `pip install infrahub-mcp` or `uv pip install infrahub-mcp`. For Docker: `docker pull registry.opsmill.io/opsmill/infrahub-mcp:latest`. Then configure your Infrahub instance URL and API token via environment variables.

How do I connect it to Cursor or Claude Desktop?

Run the server with `infrahub-mcp` (stdio transport by default), then configure your client to use it. Full setup instructions for Cursor, VS Code, Claude Desktop, and Claude Code are in the official documentation at docs.infrahub.app/mcp.

What authentication does it require?

You need an Infrahub API token and the address of your Infrahub instance, provided via INFRAHUB_API_TOKEN and INFRAHUB_ADDRESS environment variables. Multiple authentication modes are documented in the configuration reference.

Are changes made by the AI applied immediately?

No. All writes land on auto-created session branches and never touch your default branch directly. You must call `propose_changes` to open a Proposed Change for human approval before merging.

README (reference)

Source of truth, from the repository.

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.

Related MCP servers

Options analytics: 17 pricing models, 17 Greeks, GEX, IV, 23 screeners, unusual, dark pool, max pain

4
TypeScript
MIT
View repository →

Unusual options activity on 7,000+ US stocks: top prints, streaks, IV rank, sentiment, sectors.

0
View repository →

Read-only booking info for Opus Lumiere photography, London: services, prices, availability.

Local-first security check for AI coding agents: secrets, .env exposure, git-history leaks, CVEs.

Deep security scans of repos you own from your editor: dependency CVEs, SAST, git-history secrets.

Free no-account URL security scan: 0-100 Launch Readiness score for any live site in ~15 seconds.