
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.
概覽
將 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 用戶端,僅限桌面端。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Infrahub Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
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_changesto 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.
- Installation and client setup
- Docker / sidecar deployment
- Authentication modes
- Configuration reference
- Methods reference — tools, resources, prompts
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版本歷史
1- v0.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分