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 current MCP session. 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. Affects only the calling session; other sessions are unaffected. |
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
Each tool targets a distinct action and the descriptions explicitly route between the potentially overlapping ones (get_nodes vs. search_nodes vs. query_graphql; node_upsert vs. mutate_graphql). Read-only vs. write tools are cleanly separated, with clear escalation guidance to GraphQL for complex cases. find_paths and find_reachable are also clearly differentiated (connectivity vs. impact analysis).
Most tools follow a verb_noun pattern (get_nodes, search_nodes, get_schema, find_paths, propose_changes, reset_session_branch), and the verbs are semantically meaningful. However node_upsert and node_delete invert the order (noun_verb), creating a minor inconsistency in an otherwise predictable scheme.
Twelve tools is well within a comfortable range and each maps to a real need: schema discovery, three read paths, two graph traversals, three write paths, change proposal, and session management. No tool feels redundant or filler.
The surface covers the full lifecycle — discover schema, read, traverse, write, and open a proposed change — with session handling for branch isolation. Minor gaps remain: no way to list or inspect existing proposed changes, no explicit discard/delete of a session branch (reset only clears the cache), and relationship writes require dropping to raw GraphQL.