πŸ€– Cisco Nexus Dashboard MCP Server

Cisco Nexus Dashboard ND 4.2.1 MCP FastMCP Python HTTP

A data-driven MCP server built with FastMCP 3.2.0 that exposes 110 Nexus Dashboard 4.2.1 operations as MCP tools. Connect any MCP-compatible client and LLM to query, analyse, and manage your Cisco Nexus Dashboard environment through natural language.

Table of Contents

  1. Overview
  2. Features
  3. Architecture
  4. Requirements
  5. Available MCP Tools
  6. Transport
  7. Installation
  8. Configuration
  9. Running the Server
  10. Usage Example: VS Code

Overview

This MCP server acts as a lightweight middleware layer between Cisco Nexus Dashboard and any MCP-compatible client. It allows an LLM to query fabric health, anomalies, compliance, switches, interfaces, policies, VRFs/networks, and orchestration templates β€” all through 110 structured MCP tools.

This is a community based project and is not officially supported by any Cisco Business or Technical entity.


Features

  • 110 tools across 5 ND modules β€” Analyze, Infrastructure, Manage, OneManage, Orchestrator
  • Data-driven registration β€” tools sourced from a curated JSON shortlist, not hardcoded
  • Streamable HTTP transport β€” runs as a persistent HTTP server on port 8005
  • Full ND 4.2.1 coverage β€” anomaly analysis, compliance, fabric management, switch inventory, VRFs, networks, L4-L7 services, and orchestration
  • Raw API passthrough β€” nd_api_request tool gives direct access to any ND endpoint
  • No hardcoded credentials β€” all secrets sourced from .env
  • Token-based authentication β€” automatically re-authenticates on session expiry

Architecture

OpenAPI Specs (5 files)
        β”‚
        β–Ό
create_optimised_urls_4_2.py
        β”‚
        β”œβ”€β–Ί nd_4.2.1_urls_optimised.json   (1371 endpoints, full catalogue)
        └─► nd_4.2.1_urls_shortlisted.json (107 curated tools)
                        β”‚
                        β–Ό
              nd_4_2_1_server.py  (FastMCP, port 8005)
                        β”‚
              http://localhost:8005/mcp
                        β”‚
              MCP Client (VS Code Copilot, Claude Desktop, etc.)

Module β†’ Base URL mapping:

Module Base Path
analyze /api/v1/analyze
infrastructure /api/v1/infra
manage /api/v1/manage
oneManage /api/v1/oneManage
orchestration /mso

Requirements

  • Python 3.10+
  • Access to a Cisco Nexus Dashboard 4.2.1 cluster
  • ND user with read and/or write privileges

Python dependencies (requirements.txt):

Package Purpose
fastmcp>=3.2.0 MCP server framework with streamable-http support
httpx>=0.24.0 Async HTTP client for ND REST API calls
python-dotenv>=1.0.0 Load credentials from .env
pydantic>=2.0.0 Data validation
uvicorn>=0.23.0 ASGI server for HTTP transport

Available MCP Tools

Special Tools (3 tools β€” always available)

Tool Description
nd_test_connection Verify connectivity and authentication to the ND cluster
nd_api_request Raw passthrough β€” call any ND API endpoint directly
nd_get_operations_summary List all 110 registered tools grouped by category

Analyze Module (12 tools)

Tool Description
nd_analyze_get_a_i_jobs_anomalies_detail AI job anomaly details
nd_analyze_get_advisory_recommendations Advisory recommendations
nd_analyze_update_alerts_status Update alert status
nd_analyze_list_conformance_details Compliance conformance details
nd_analyze_get_switch_recommendations Per-switch recommendations
nd_analyze_list_fabric_snapshots List fabric snapshots
nd_analyze_list_endpoints List all endpoints
nd_analyze_delete_endpoint_locator_data Delete endpoint locator data
nd_analyze_get_flow_events_details Flow event details
nd_analyze_list_jobs_summary Assurance job summary
nd_analyze_create_assurance_analysis_job Create a new assurance analysis job
nd_analyze_list_congestion_details Network congestion details
nd_analyze_get_energy_management_data_status Energy management status
nd_analyze_update_energy_management_settings Update energy management settings
nd_analyze_get_service_stats Service segmentation statistics
nd_analyze_get_analytics_summary Resources analytics summary

Infrastructure Module (14 tools)

Tool Description
nd_infra_get_about ND system version and build info
nd_infra_get_cluster_health_config Cluster health and status
nd_infra_get_cluster_config Cluster configuration
nd_infra_get_smart_license_status Smart licensing status
nd_infra_get_backups_status Backup status
nd_infra_list_all_clusters List all multi-cluster connections
nd_infra_delete_multi_cluster_connections Remove multi-cluster connections
nd_infra_list_all_tenant_domains List tenant domains
nd_infra_list_switches List switches for certificate management
nd_infra_execute_installation_of_switch_certificates Install switch certificates
nd_infra_get_fabric_audit_records Fabric audit log
nd_infra_get_fabric_management_settings Fabric management settings
nd_infra_update_cluster_config Update cluster configuration
nd_infra_get_default_auth Get default authentication settings
nd_infra_update_default_auth_by_domain Update auth settings by domain

Manage Module (36 tools)

Key tools include:

Tool Description
nd_manage_list_fabrics List all managed fabrics
nd_manage_get_fabric_configuration_preview Preview fabric configuration
nd_manage_list_logical_links List logical links
nd_manage_get_policies Get fabric policies
nd_manage_create_policies Create fabric policies
nd_manage_list_compliance_anomaly_rules List compliance anomaly rules
nd_manage_create_compliance_anomaly_rule Create compliance anomaly rule
nd_manage_list_config_deployer_history_by_fabric Deployment history
nd_manage_execute_copy_running_config_to_startup Save running to startup config
nd_manage_list_interface_groups List interface groups
nd_manage_list_fabric_bootstrap Fabric bootstrap inventory
nd_manage_list_tenants List tenants
nd_manage_get_all_pools_by_fabric Resource pool information
nd_manage_list_access_control_lists List ACLs
nd_manage_get_multicast_ip Get multicast IP info
nd_manage_execute_deploy_networks Deploy networks to fabric
+ 20 more covering interfaces, links, L4-L7, security, templates, VRFs

OneManage Module (10 tools)

Tool Description
nd_one_list_one_manage_fabrics List OneManage-managed fabrics
nd_one_create_one_manage_fabric Onboard a fabric to OneManage
nd_one_list_one_manage_fabric_switches List switches in a fabric
nd_one_get_advisories_summary Advisories & anomalies summary across clusters
nd_one_get_connected_fabrics_count_all_cluster Connected fabric count
nd_one_create_one_manage_link Create inter-fabric link
nd_one_list_search_results Multi-cluster search
nd_one_get_apic_data APIC API proxy β€” read
nd_one_create_apic_data APIC API proxy β€” write
nd_one_execute_one_manage_deploy_networks Deploy networks via OneManage

Orchestrator Module (8 tools)

Tool Description
nd_orch_getsite_status Get site status
nd_orch_create_template Create an orchestrator template
nd_orch_list_fabric_pods List fabric pods
nd_orch_update_fabric_conectivity Update fabric connectivity
nd_orch_template_deploy_status Template deployment status
nd_orch_execution_status Execution API status
nd_orch_get_policy_report PcTag/Vnid policy report
nd_orch_import_policy_names Import ACI policy names
nd_orch_get_bulk_deploy_status_by_task_id Bulk deploy task status
nd_orch_getpost_restore_status Backup restore status

Transport

The server runs in streamable-http mode (FastMCP 3.2.0+) on port 8005:

http://0.0.0.0:8005/mcp

This is a persistent HTTP server β€” start it once and leave it running. VS Code connects to it via the mcp.json HTTP entry.


Installation

git clone <your-repo-url>
cd cd cisco_nd_mcp_commmunity

# Install dependencies
pip install -r requirements.txt

Configuration

Create a .env file in cisco_nd_mcp_community/:

NDFC_URL=https://<your-nd-ip>
USERNAME=<your-username>
PASSWORD=<your-password>
URLS_PATH=nd_4.2.1_urls_shortlisted.json
MCP_TRANSPORT=streamable-http
MCP_HOST=0.0.0.0
MCP_PORT=8005
LOG_LEVEL=INFO
HTTP_TIMEOUT=30

Security note: Never commit .env to source control β€” add it to .gitignore.


Running the Server

Start (recommended)

python3 /scripts/server.py

Or with the venv activated:

cd cisco_nd_mcp_community/scripts
python3 server.py

The server prints startup confirmation:

INFO  Registered 107 named tools + 3 special tools (110 total)
INFO  Nexus Dashboard 4.2.1 MCP Server
INFO    ND cluster  : https://10.x.x.x
INFO    Transport   : streamable-http
INFO    Endpoint    : http://0.0.0.0:8005/mcp

Run in background

python3 server.py &

Usage Example: VS Code

Step 1 β€” Add to mcp.json

Open your VS Code user mcp.json (Cmd+Shift+P β†’ Open MCP Servers Configuration) and add:

{
  "servers": {
    "nd-4.2.1-mcp-local": {
      "type": "http",
      "url": "http://localhost:8005/mcp"
    }
  }
}

Step 2 β€” Start the Server

Start nd-4.2.1-mcp-local (see above), then click Restart on the nd-4.2.1-mcp-local entry in the MCP Servers panel.

Step 3 β€” Chat with your Nexus Dashboard

Open GitHub Copilot Chat (Cmd+Shift+I) and try natural language prompts:

πŸ“‹ Fabric overview:

List all fabrics managed by Nexus Dashboard
Show me the ND cluster version and health status
What smart licensing is active?

🚨 Anomalies & compliance:

Show me all critical anomalies across fabrics
Which fabrics have the highest anomaly score?
List compliance anomaly rules for the fabric

πŸ—οΈ Manage & deploy:

List all tenants in the manage module
Show me pending configuration changes for the fabric
Deploy networks to the fabric

πŸ” Inventory & interfaces:

List all switches bootstrapped in the fabric
Show me all logical links
Get interface groups for 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.

LICENSE

This sample code is licensed under the Apache 2.0 license as per the LICENSE file attached


View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Please note that some of the repositories in Code Exchange may be enabled to interact with third-party Generative AI platforms outside of Cisco’s control, and users should review those third-party terms and privacy statements to understand how data is processed, stored or used, including input data.