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 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
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 a node of a specific kind by partial name — use when you only know part of the name. Matches substrings against the 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 |
| 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 targets the session branch by default, which is auto-created
on the first write of the session ( To discover available kinds and their attributes, read the |
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. |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/opsmill/infrahub-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server