ACI MCP Server
A Model Context Protocol server that lets AI clients read and configure a live Cisco ACI fabric via the APIC REST API, with confirmation required for state changes and built-in safety checks.
README
ACI MCP Server
A Model Context Protocol (MCP) server that gives Claude (or any MCP-compatible AI client) natural-language tools to read and configure a live Cisco ACI fabric through the APIC REST API — with confirmation required before any state-changing action, and structural safety checks that can't be bypassed by confirmation alone.
Built and tested against Cisco's free DevNet "ACI Simulator Always-On" sandbox. Full build write-up: (link to HackerNoon article here once published).
Why this exists
Most AI assistants can explain Cisco ACI's object model. This gives Claude the ability to actually operate one — read fabric state, build a real Tenant → Application Profile → EPG → Bridge Domain → VRF hierarchy, apply contracts between EPGs, and audit the result — through conversation, with every write gated behind explicit confirmation.
Features
- 15 tools spanning fabric visibility, tenant/application management, the full ACI object hierarchy, and policy enforcement via contracts
- Dry-run by default — every state-changing tool describes what it
would do and requires a second call with
confirm=Trueto actually apply it - Unconditional guardrails where they matter —
delete_tenantrefuses to touchcommon,infra, ormgmtregardless ofconfirm - Pre-flight dependency checks —
create_bridge_domainandapply_contractverify their target VRF/contract actually exists before creating a reference to it, rather than silently accepting a dangling one (see CHANGELOG.md for the real bug this fixed) - A structural audit tool, not just a lister —
get_tenant_detailwalks an entire tenant's object tree in one call and flags anything incomplete
Tool reference
| Tool | Type | Description |
|---|---|---|
list_tenants |
Read | List every tenant on the fabric |
get_fabric_health |
Read | Fabric-wide health score |
get_faults |
Read | Active faults filtered by severity |
get_port_config |
Read | EPG static binding + AAEP for a pod/node/interface |
get_tenant_detail |
Read | Full-subtree audit of a tenant, flags incomplete objects |
create_tenant |
Write | Create a tenant |
delete_tenant |
Write | Delete a tenant — hard-refuses common/infra/mgmt |
create_application_profile |
Write | Create an AP inside a tenant |
create_epg |
Write | Create an EPG inside an AP, optional BD binding |
create_bridge_domain |
Write | Create a BD with a VRF (pre-flight checked) |
associate_epg_bridge_domain |
Write | Bind an existing EPG to an existing BD |
create_vrf |
Write | Create a VRF (Context) inside a tenant |
create_contract |
Write | Create a contract + filter, optional port restriction |
apply_contract |
Write | Apply a contract between provider and consumer EPGs (pre-flight checked) |
add_static_path_binding |
Write | Bind an EPG to a physical port with a VLAN |
All Write tools require confirm=True to actually execute; called
without it, they return a description of the intended change instead.
Requirements
- Python 3.10+ (the
mcpSDK requires it — 3.9 will fail to install it) - Access to an APIC controller (a free DevNet sandbox works fine — get current credentials at devnetsandbox.cisco.com, search "ACI Simulator")
- An MCP-compatible client (Claude Code, Claude Desktop, etc.)
Setup
git clone https://github.com/<your-username>/aci-mcp-server.git
cd aci-mcp-server
pip install -r requirements.txt
cp .env.example .env
# edit .env with your real APIC_URL / APIC_USER / APIC_PASSWORD
Sanity check before wiring in an AI client — confirm the server starts cleanly on its own:
python3 aci_mcp_server.py
It should hang silently (waiting on stdio) with no traceback — that's
success. Ctrl+C to stop.
Registering with Claude Code
claude mcp add aci-lab --scope user -- python3 /full/path/to/aci_mcp_server.py
If your APIC/environment is only reachable from a remote host (e.g. behind SSH, or inside a container), pass credentials explicitly and route through that instead:
claude mcp add aci-lab --scope user -- ssh user@host docker exec -i \
-e APIC_URL=https://your-apic \
-e APIC_USER=admin \
-e "APIC_PASSWORD=your-password" \
container-name python3 /path/in/container/aci_mcp_server.py
Start a fresh Claude Code session, run /mcp to confirm aci-lab shows
connected with 15 tools, then try:
"List all tenants"
"Check fabric health"
A worked example
docs/testcase_app_to_db.md walks through a
complete test case: building a fresh tenant from nothing — VRF, two Bridge
Domains, an Application Profile, an App-tier EPG and a DB-tier EPG — then
applying a contract that permits only TCP/5432 between them, with the DB
tier correctly configured as the provider and the App tier as the
consumer.
Design notes
- MCP is a protocol, not an AI feature. This server works unmodified with any MCP-compatible client — Claude, ChatGPT via its Agents SDK, Gemini, or a local model — since nothing in the code is Claude-specific.
- The dry-run/confirm pattern is enforced in code, not by the model's
judgment. A write tool called without
confirm=Truecannot reach APIC — the check happens before any network call, not after. - Not every guardrail is the same strength on purpose. Most writes are
soft-gated (confirm and proceed); deleting a system tenant is hard-gated
(no confirmation path exists at all). See
delete_tenant.
Security
.envis git-ignored — never commit real credentials.- This is built and tested against a free, shared DevNet sandbox. If you point this at a production APIC, review the credential-handling pattern first — storing a real password as a plaintext environment variable passed on a command line (as shown in the SSH example above) is acceptable for a lab, not for production. Use a proper secrets manager instead.
License
Author
Built by Real Paul — network automation engineer, NetDevOps. More at GitHub and HackerNoon.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。