Infrahub MCP server
{
"mcpServers": {
"opsmill-infrahub": {
"command": "uvx",
"args": [
"infrahub-mcp"
],
"env": {
"INFRAHUB_API_TOKEN": "<infrahub_api_token>"
}
}
}
}{
"mcpServers": {
"opsmill-infrahub": {
"command": "uvx",
"args": [
"infrahub-mcp"
],
"env": {
"INFRAHUB_API_TOKEN": "<infrahub_api_token>"
}
}
}
}{
"mcpServers": {
"opsmill-infrahub": {
"command": "uvx",
"args": [
"infrahub-mcp"
],
"env": {
"INFRAHUB_API_TOKEN": "<infrahub_api_token>"
}
}
}
}{
"servers": {
"opsmill-infrahub": {
"command": "uvx",
"args": [
"infrahub-mcp"
],
"env": {
"INFRAHUB_API_TOKEN": "${input:infrahub_api_token}"
}
}
},
"inputs": [
{
"id": "infrahub_api_token",
"type": "promptString",
"description": "Infrahub api token",
"password": true
}
]
}{
"mcpServers": {
"opsmill-infrahub": {
"command": "uvx",
"args": [
"infrahub-mcp"
],
"env": {
"INFRAHUB_API_TOKEN": "<infrahub_api_token>"
}
}
}
}file .mcp.json (in your project root)file claude_desktop_config.jsonfile ~/.cursor/mcp.jsonfile .vscode/mcp.jsonfile ~/.codeium/windsurf/mcp_config.jsoninstall uvx infrahub-mcpversion 0.1.2
What it does
An MCP server that connects AI assistants to Infrahub, an infrastructure data management platform, enabling agents to query, create, and propose changes to infrastructure data through an audited interface. All writes are isolated to branches and require human approval before merging to production.
- Query infrastructure data like devices, interfaces, and IP addresses using natural language with attribute filtering and search.
- Explore your Infrahub schema and GraphQL API documentation without leaving the conversation.
- Propose infrastructure changes on isolated branches for human review and approval before merging to the default branch.
Tools this server exposes
| Tool | Does |
|---|---|
| query_infrastructure | Search and filter infrastructure data by kind and attributes with partial-match support. |
| get_schema | Retrieve the Infrahub schema catalog, attribute maps, and filters for a given kind. |
| graphql_query | Execute arbitrary GraphQL queries against the Infrahub API. |
| graphql_mutation | Execute GraphQL mutations to create or update infrastructure data on a session branch. |
| propose_changes | Submit changes from a session branch as a Proposed Change for human review and approval. |
| get_sdl | Retrieve the GraphQL Schema Definition Language for the Infrahub instance. |
Before you enable it
An MCP server runs with whatever access you give it. Start with a development account rather than production, and check which tools the server exposes before you let an agent call them unattended.