This MCP server acts as a lightweight middleware layer between Cisco ACI (Application Centric Infrastructure) and any MCP-compatible client. It allows an LLM to query the ACI fabric, inspect tenants, EPGs, bridge domains, faults, and fabric health β and to create or delete policy objects β all through structured MCP tools.
This is a community based project and is not officially supported by any Cisco Business or Technical entity.
The server communicates with the APIC REST API using cookie-based authentication and supports 50 operations covering the full ACI policy model.
.env filePython dependencies (requirements.txt):
| Package | Purpose |
|---|---|
fastmcp |
MCP server framework |
httpx |
Async-capable HTTP client for APIC API calls |
python-dotenv |
Load credentials from .env |
pydantic |
Data validation |
requests |
Supplementary HTTP support |
| Tool | Description |
|---|---|
aci_simple_test() |
Verify connectivity to the MCP server |
| Tool | Description |
|---|---|
aci_tenants_get() |
List all tenants |
aci_application_profiles_get() |
List all application profiles |
aci_endpoint_groups_get() |
List all EPGs |
aci_bridge_domains_get() |
List all bridge domains |
aci_contexts_get() |
List all VRFs |
aci_subnets_get() |
List all subnets |
aci_contracts_get() |
List all contracts |
aci_contract_subjects_get() |
List all contract subjects |
aci_filters_get() |
List all filters |
aci_filter_entries_get() |
List all filter entries |
aci_endpoints_get() |
List all learned endpoints |
aci_faults_get() |
List all faults (fault summary) |
| Tool | Description |
|---|---|
aci_fabric_nodes_get() |
List all fabric nodes (leaves, spines, APICs) |
aci_fabric_health_get() |
Get overall fabric health score |
aci_fabric_links_get() |
List all fabric links |
aci_physical_interfaces_get() |
List all physical interfaces |
aci_ethernet_interfaces_get() |
List all ethernet interface states |
aci_vlan_pools_get() |
List all VLAN pools |
aci_domains_get() |
List all physical domains |
aci_critical_faults_get() |
List only critical-severity faults |
| Tool | Parameters | Description |
|---|---|---|
aci_tenant_create |
tenant_name, description? |
Create a new tenant |
aci_vrf_create |
tenant_name, vrf_name, description? |
Create a VRF |
aci_bridge_domain_create |
tenant_name, vrf_name, bd_name, subnet_ip? |
Create a bridge domain |
aci_application_profile_create |
tenant_name, app_name, description? |
Create an application profile |
aci_epg_create |
tenant_name, app_name, epg_name, bd_name |
Create an EPG |
aci_contract_create |
tenant_name, contract_name, description? |
Create a contract |
aci_contract_subject_create |
tenant_name, contract_name, subject_name, filter_name |
Create a contract subject |
aci_filter_create |
tenant_name, filter_name, description? |
Create a filter |
aci_filter_entry_create |
tenant_name, filter_name, entry_name, protocol?, dst_port? |
Create a filter entry |
aci_epg_contract_provider_bind |
tenant_name, app_name, epg_name, contract_name |
Bind EPG as contract provider |
aci_epg_contract_consumer_bind |
tenant_name, app_name, epg_name, contract_name |
Bind EPG as contract consumer |
aci_epg_domain_bind |
tenant_name, app_name, epg_name, domain_name, domain_type? |
Attach EPG to physical or VMM domain |
aci_subnet_create |
tenant_name, bd_name, subnet_ip, scope? |
Add a subnet to a bridge domain |
| Tool | Description |
|---|---|
aci_l3_outside_get() |
List all L3Outs |
aci_external_networks_get() |
List all external EPGs |
aci_bgp_peers_get() |
List all BGP peers |
aci_l3out_create |
Create a new L3Out |
aci_external_epg_create |
Create an external EPG under an L3Out |
| Tool | Description |
|---|---|
aci_vlan_pool_create |
Create a VLAN pool with encap block |
aci_physical_domain_create |
Create a physical domain and attach a VLAN pool |
aci_create_3tier_app |
Deploy a complete 3-tier app (Web/App/DB) with BDs, EPGs, filters, contracts |
aci_create_web_app_stack |
Deploy a web + app stack end-to-end |
aci_tenant_delete |
Delete a tenant (use with caution) |
aci_epg_delete |
Delete an EPG |
aci_contract_delete |
Delete a contract |
aci_get_operations_summary |
Return a structured list of all 50 operations |
| Mode | Description |
|---|---|
stdio |
Standard I/O β for local clients managed by VS Code, Claude Desktop, etc. |
The server in scripts/server.py runs in stdio mode. VS Code manages the process lifecycle automatically via mcp.json.
Clone the repository and run the interactive setup script:
git clone <your-repo-url> cd aci_mcp_devnet_submission ./setup.sh
The setup.sh script will:
scripts/.envpipAlternatively, set up manually:
cd aci_mcp_devnet_submission pip install -r requirements.txt # Create scripts/.env manually: cat > scripts/.env <<EOF APIC_URL=https://<your-apic-ip>/ USERNAME=<your-username> PASSWORD=<your-password> EOF
The server authenticates to the APIC using cookie-based session authentication (aaaLogin). Credentials are loaded from scripts/.env at startup.
scripts/.env format:
APIC_URL=https://10.x.x.x/ USERNAME=admin PASSWORD=yourpassword
The server automatically re-authenticates when the APIC session token expires (HTTP 403), so long-running sessions stay connected without manual intervention.
Security note: The
scripts/.envfile is listed in.gitignoreβ never commit real credentials to source control.
cd scripts
python3 server.pycd aci_mcp_devnet_submission ./setup.sh # Follow prompts, then: cd scripts && python3 server.py
cd scripts
fastmcp dev server.pyGitHub Copilot in VS Code 2 has a built-in MCP client. Add the ACI MCP server to your VS Code mcp.json to use it directly from the Copilot chat window.
Open your VS Code user mcp.json (Cmd+Shift+P β Open MCP Servers Configuration) and add:
{
"servers": {
"my-aci-mcp-server": {
"type": "stdio",
"command": "python3",
"args": [
"/absolute/path/to/aci_mcp_devnet_submission/scripts/server.py"
]
}
}
}Replace
/absolute/path/to/with the actual path on your machine.
VS Code starts the server automatically when you open a Copilot chat session. You can also manually start/restart it from the MCP panel in the VS Code status bar.
Open GitHub Copilot Chat (Cmd+Shift+I) and try natural language prompts:
π Query the fabric:
Show me all faults in the fabric
List the top 10 tenants
What is the current fabric health score?
ποΈ Provision policy:
Create a new tenant called "MyApp_Tenant"
Deploy a 3-tier application called "ECommerceApp" in tenant "Prod_Tenant"
Add a subnet 192.168.10.1/24 to bridge domain "app_bd" in tenant "Prod_Tenant"
π©Ί Troubleshoot:
Show me all critical faults
Get all BGP peers in the fabric
List all endpoints currently learned in the fabric
The LLM will automatically select the right MCP tool(s), call the APIC REST API, and return structured results in the chat window.
Owner
Contributors
Categories
Data CenterProducts
Application Centric Infrastructure (ACI)AI
MCP ServersDeploy Type
stdioFeatures / Capabilities
ToolsLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community