Infrahub Mcp

com.opsmill由 opsmill.com 发布v0.1.2更新于 Nov 10, 2026

An MCP server connects your AI assistants to Infrahub using the open MCP standard.

已验证STDIO仅桌面数据库云端与基础设施

概览

AI 生成的概览

将 AI 助手连接到 Infrahub,使其能够查询、创建和更新基础设施数据,并提交变更以供审核。

可以做什么
  • 用自然语言查询基础设施数据,按属性过滤和模糊匹配查找设备、接口、IP 地址或任意 schema 类型
  • 通过暴露的目录、各类型的属性与过滤映射以及 GraphQL SDL 资源浏览 schema
  • 在自动创建的隔离会话分支上进行修改,不直接触碰默认分支
  • 将变更提交为 Proposed Change,供人工审批后再合并
  • 对 Infrahub API 执行任意 GraphQL 查询或变更
适用场景
当你的基础设施或网络数据存放在 Infrahub 中,并希望助手代为查询、在分支上起草修改并交由人工审核,而不是手工编辑数据源时使用。
运行要求
以 Python 包(pip 或 uv 安装)或 Docker 镜像在本地运行,默认使用 stdio,也可用 Streamable HTTP。需要可访问的 Infrahub 实例地址(INFRAHUB_ADDRESS)和 API 令牌(INFRAHUB_API_TOKEN)。兼容任意 MCP 客户端,仅限桌面端。
安装前请注意
需要 Infrahub API 令牌,该令牌可访问你的基础设施数据。服务器能够创建和更新数据并执行任意 GraphQL 变更,因此具备写入能力;写入虽被隔离在分支上并设计为合并前需人工审批,仍应仔细审查提交的变更。数据会发送到你配置的 Infrahub 实例。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Infrahub Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Infrahub MCP Server

Infrahub MCP Server connects AI assistants and IDE agents to Infrahub using the open Model Context Protocol standard — so agents can query, create, update, and propose changes to your infrastructure data through a consistent, audited interface. It works with any MCP-compatible client (Claude Desktop, VS Code, Cursor, CLI agents, and more) with no custom glue code required.

All writes are branch-isolated and require human approval before merging — agents never modify your default branch directly.

Installation

pip install infrahub-mcp
# or
uv pip install infrahub-mcp

Docker:

docker pull registry.opsmill.io/opsmill/infrahub-mcp:latest
# or use Docker Compose:
docker compose up -d

Quickstart

Point the server at your Infrahub instance via environment variables, then run it over the transport your client expects.

stdio (default — for Claude Desktop, VS Code, Cursor):

export INFRAHUB_ADDRESS=http://localhost:8000
export INFRAHUB_API_TOKEN=<your-token>
infrahub-mcp

Streamable HTTP (for remote clients, sidecar deployments):

infrahub-mcp --transport streamable-http --host 0.0.0.0 --port 8001

What you can do with it

  • Query your infrastructure data from natural language — find devices, interfaces, IP addresses, or any kind in your schema, with attribute filtering and partial-match search.
  • Explore your schema without leaving the conversation — the server exposes your catalog, per-kind attribute/filter maps, and the GraphQL SDL as MCP resources.
  • Make changes on isolated branches — writes land on an auto-created session branch (mcp/session-YYYYMMDD-<hex>); the default branch is never touched directly.
  • Submit changes for human review — call propose_changes to open a Proposed Change for approval before merging.
  • Run arbitrary GraphQL — execute any query or mutation against the Infrahub API when you need full control.

Documentation

Full documentation, including client configuration for Cursor, VS Code, Claude Desktop, and Claude Code, is available at the Infrahub MCP Server docs site.

About Infrahub

Infrahub is an open source infrastructure data management and automation platform (AGPLv3), developed by OpsMill. It gives infrastructure and network teams a unified, schema-driven source of truth — devices, topology, IP space, configuration — with built-in version control, a generator framework for automation, and native integrations with Git, Ansible, Terraform, and CI/CD pipelines.

License

Apache 2.0 — see LICENSE.

来源:README.md,提交 46e13e7

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分