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": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
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:
Returns:
Dict with |
| 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 clearly distinct action or resource: reads (get_nodes, search_nodes, query_graphql), graph analysis (find_paths, find_reachable), writes (node_upsert, node_delete, mutate_graphql), schema discovery (get_schema), and session/branch workflow (get_session_info, reset_session_branch, propose_changes). Descriptions explicitly clarify boundaries, such as when to prefer get_nodes/search_nodes over query_graphql and when to use node_upsert versus mutate_graphql.
Most tools follow a snake_case verb_noun pattern (query_graphql, get_nodes, search_nodes, find_paths, propose_changes, reset_session_branch). A few deviate with noun_verb ordering (node_upsert, node_delete) and a slightly shortened form (find_reachable), but the overall naming remains predictable and readable.
The 12 tools are well-scoped for a graph data platform that requires reads, writes, traversal, schema discovery, and branch/session management. Each tool has a clear role, and the set avoids both thinness and bloat.
Core lifecycle operations are covered: schema discovery, typed and GraphQL reads, graph traversal, node upsert/delete, complex mutations, session branch switching, and proposing changes. Minor gaps exist around the proposed-change lifecycle after creation, such as listing, inspecting, merging, or closing proposed changes.