by opsmill
Provides an MCP interface that connects AI assistants and IDE agents to Infrahub, enabling query, creation, update, and proposal of infrastructure changes through a consistent, audited workflow.
Enables AI assistants and development‑time agents to interact with Infrahub's infrastructure data model via the Model Context Protocol. Agents can read, write (on isolated branches), and propose changes without custom glue code.
Installation
pip install infrahub-mcp or uv pip install infrahub-mcpdocker pull registry.opsmill.io/opsmill/infrahub-mcp:latest (or run with Docker Compose).Running the server
export INFRAHUB_ADDRESS=http://localhost:8000
export INFRAHUB_API_TOKEN=<your-token>
infrahub-mcp
infrahub-mcp --transport streamable-http --host 0.0.0.0 --port 8001
Full client configuration details are available in the online docs.
mcp/session-YYYYMMDD-<hex>).propose_changes.Q: Do writes affect the main branch directly? A: No. All writes are performed on an auto‑created session branch and require explicit approval to merge.
Q: Which clients are compatible? A: Any client implementing the Model Context Protocol, including Claude Desktop, VS Code extensions, Cursor, and custom CLI agents.
Q: How is authentication handled?
A: Provide an Infrahub API token via INFRAHUB_API_TOKEN. Additional authentication modes are documented online.
Q: Can I run the server in a containerized environment? A: Yes. Use the official Docker image or Docker Compose as described in the README.
Q: Is there a way to execute arbitrary GraphQL queries?
A: The run_graphql method allows execution of any GraphQL query or mutation against the Infrahub API.
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.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
by zylon-ai
Provides an open-source API layer that enables local OpenAI‑compatible models to be used for production AI applications, offering standardized message handling, document ingestion, retrieval‑augmented generation, tool integration, and MCP connectivity.
by danny-avila
Provides a self‑hosted ChatGPT‑style interface supporting numerous AI models, agents, code interpreter, image generation, multimodal interactions, and secure multi‑user authentication.
by block
Automates engineering tasks on local machines, executing code, building projects, debugging, orchestrating workflows, and interacting with external APIs using any LLM.
by RooCodeInc
Provides an autonomous AI coding partner inside the editor that can understand natural language, manipulate files, run commands, browse the web, and be customized via modes and instructions.
by pydantic
A Python framework that enables seamless integration of Pydantic validation with large language models, providing type‑safe agent construction, dependency injection, and structured output handling.
by mcp-use
A Python SDK that simplifies interaction with MCP servers and enables developers to create custom agents with tool‑calling capabilities.
by lastmile-ai
Build effective agents using Model Context Protocol and simple, composable workflow patterns.
by Klavis-AI
Provides production‑ready MCP servers and a hosted service for integrating AI applications with over 50 third‑party services via standardized APIs, OAuth, and easy Docker or hosted deployment.