infrahub-mcp
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| INFRAHUB_ADDRESS | No | The address of the Infrahub instance | http://localhost:8000 |
| INFRAHUB_API_TOKEN | Yes | The API token for authentication |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| query_graphqlA | Execute a read-only GraphQL query against Infrahub — use for reads only, never mutations. Mutations are rejected at the AST level: use To discover available kinds and their attributes, read the |
| get_nodesA | List nodes of a specific kind — the default read path for typed queries with optional filtering and pagination. Prefer this over To discover available kinds, read the Filter keys follow the schema's filter map. Attribute filters use
Use |
| search_nodesA | Find nodes of a specific kind by partial substring — use when you only know part of a value. Matches the query as a substring against all attributes of the kind
via Infrahub's For a filter on one specific attribute (or combining multiple filters),
use Each result is labelled with the node's To discover available kinds, read the |
| get_session_infoA | Return the current MCP session state — call before writes to know which branch they target. Reports the active session branch (if any) and the Infrahub instance address.
A session branch is lazily auto-created on the first write tool call
( Typical uses:
|
| get_schemaA | Discover available schema kinds — call this first when you don't know what kinds or filters exist. Without a Prefer reading the |
| find_pathsA | Find the shortest path(s) between two nodes in the Infrahub graph. Use this to answer "how are these two objects connected?". A result with
|
| find_reachableA | Find nodes of the given kinds reachable from a source node (impact analysis). Use this to answer "what depends on / is connected to this object?" — for blast-radius and dependency discovery. Requires Infrahub 1.10+. |
| node_upsertA | Create or update a node in Infrahub on the active session branch. The session branch is auto-created on the first write of the session
(
Only scalar attribute fields are accepted in |
| node_deleteA | Delete a node in Infrahub on the active session branch. The deletion is applied to the session branch only and is not visible on the
default branch until a proposed change is merged.
To discover available kinds, read the |
| propose_changesA | Open a proposed change (pull request) from the active session branch to the default branch. Creates a |
| mutate_graphqlA | Execute a GraphQL mutation against Infrahub — use only for complex writes that typed tools can't express. Prefer The mutation always runs on the active session branch (auto-created on the
first write of the session, To discover available kinds and their attributes, read the |
| reset_session_branchA | Reset or switch the active session branch for the calling client. Use this to recover or take control of which branch your writes target:
Note: a merged or deleted session branch is recovered automatically on the next write — this tool is the explicit override on top of that. Scope: the session branch is kept per authenticated caller, and per MCP session when the client has one. Without credentials or an MCP session, all clients of the server share one session branch. A reset or switch applies to every conversation that shares the session branch. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| infrahub_agent | System prompt for the Infrahub infrastructure agent. |
| answer_infra_question | Read-only pipeline for answering infrastructure questions using Infrahub data. |
| make_infra_change | Write workflow for making infrastructure changes through Infrahub. |
| explore_schema | Schema discovery prompt for exploring Infrahub's data model. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Schema Catalog | All non-internal schema kinds available in this Infrahub instance, as a JSON object mapping kind names to their human-readable labels. Use this to discover what kinds exist before calling get_nodes or node_upsert. |
| GraphQL Schema | Full GraphQL schema SDL for this Infrahub instance. Use as a reference when constructing complex query_graphql calls. |
| Branches | All branches currently present in this Infrahub instance, including the active session branch when one has been created. Read this to know which branches are available before querying or proposing changes. |
TDQS
Scored across 12 tools
Most tools have distinct purposes: typed reads (get_nodes/search_nodes), generic GraphQL reads (query_graphql), typed writes (node_upsert/node_delete), complex writes (mutate_graphql), session management, schema discovery, and graph traversal. The main overlap is between query_graphql and the typed read tools, but the descriptions clearly guide when to prefer each, so boundaries remain workable.
Most tools follow a verb_noun pattern (get_nodes, search_nodes, get_schema, find_paths, propose_changes), but node_upsert and node_delete use resource_action ordering, and some names like reset_session_branch are more phrase-like. The set is still readable, but the mixed conventions are noticeable.
Twelve tools is well-scoped for an Infrahub server covering schema discovery, typed reads/writes, GraphQL escape hatches, sessions, proposed changes, and graph traversal. Each tool appears to earn its place without excessive surface area.
The surface covers the core lifecycle: schema discovery, typed reads and searches, create/update via upsert, delete, complex mutations, proposed changes, and session control. Relationship edits require the generic mutate_graphql escape hatch, and there is no direct merge/approve tool, but these are reasonable design choices rather than critical gaps.