Provides intelligent wireless client management tools for Cisco Catalyst Center (DNA Center), enabling queries for wireless clients with filtering by site, MAC, IP, SSID, band, and hostname, as well as detailed client health monitoring and diagnostics.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cisco Catalyst Center (DNAC) MCP Servershow me wireless clients on SSID 'Corporate-WiFi'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cisco Catalyst Center (DNAC) MCP Server
MCP server providing intelligent wireless client management tools for Cisco Catalyst Center (DNA Center). This server exposes DNAC wireless client queries through the Model Context Protocol (MCP), enabling AI assistants like Claude to interact with your Catalyst Center infrastructure.
Features
π― Smart Query Limiting: Automatic result limiting with configurable thresholds
π Pagination Handling: Transparent pagination for large result sets
π‘ Actionable Guidance: Intelligent suggestions when results exceed limits
π Rich Filtering: Filter by site, MAC, IP, SSID, band, hostname, and more
π₯ Health Monitoring: Detailed client health metrics and diagnostics
β‘ Rate Limiting: Built-in API throttling to prevent overload
π Secure: Support for SSL verification and credential management
Installation
Prerequisites
Python 3.10 or higher
Access to Cisco Catalyst Center (DNAC) with API credentials
Claude Desktop or another MCP client
Install from Source
# Clone the repository
git clone https://github.com/robertbergman/dnac-mcp.git
cd dnac-mcp
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install in development mode
pip install -e .Install for Development
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
pytest
# Format code
black src tests
# Lint code
ruff check src testsConfiguration
Option 1: Environment Variables (Recommended)
Set the following environment variables:
export DNAC_BASE_URL="https://dnac.example.com"
export DNAC_USERNAME="admin"
export DNAC_PASSWORD="your-password"
export DNAC_VERSION="2.3.7.6" # Optional
export DNAC_VERIFY="true" # Optional
export DNAC_MAX_RESULTS="100" # OptionalOn Windows:
$env:DNAC_BASE_URL="https://dnac.example.com"
$env:DNAC_USERNAME="admin"
$env:DNAC_PASSWORD="your-password"Option 2: Configuration File
Create a config.json file:
{
"base_url": "https://dnac.example.com",
"username": "admin",
"password": "your-password",
"version": "2.3.7.6",
"verify": true,
"max_results": 100
}Set the config file path:
export DNAC_CONFIG_FILE="/path/to/config.json"Option 3: Per-Request Credentials
Pass credentials with each tool call (see Usage examples below).
Claude Desktop Configuration
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"dnac-wireless-clients": {
"command": "python",
"args": ["-m", "dnac_mcp.server"],
"env": {
"DNAC_BASE_URL": "https://dnac.example.com",
"DNAC_USERNAME": "admin",
"DNAC_PASSWORD": "your-password"
}
}
}
}Or use the installed script:
{
"mcpServers": {
"dnac-wireless-clients": {
"command": "dnac-mcp",
"env": {
"DNAC_BASE_URL": "https://dnac.example.com",
"DNAC_USERNAME": "admin",
"DNAC_PASSWORD": "your-password"
}
}
}
}After updating the config, restart Claude Desktop.
Usage
Available Tools
1. query_wireless_clients
Query wireless clients with smart filtering and limiting.
Parameters:
base_url(required): Catalyst Center URL (e.g.,"https://dnac.example.com")username(required): DNAC usernamepassword(required): DNAC passwordsite_id(optional): Filter by site UUIDmac_address(optional): Filter by client MAC addresshostname(optional): Filter by Access Point hostnameip_address(optional): Filter by client IP addressssid(optional): Filter by SSID nameband(optional): Filter by frequency band (e.g.,"2.4GHz","5GHz")max_results(optional): Maximum clients to return (default: 100)version(optional): DNAC API version (default:"2.3.7.6")verify(optional): Verify SSL certificates (default:true)debug(optional): Enable debug logging (default:true)
Returns:
clients: List of client dictionariestotal_count: Total matching clientsexceeded_limit: Boolean if total > max_resultsguidance: Actionable tips to refine queryfetched_count: Actual number returned
Example Prompts for Claude:
"Show me all wireless clients"
"Find wireless clients on SSID 'Corporate-WiFi'"
"Which clients are connected to AP 'AP-Floor2-East'?"
"Show me clients with MAC address AA:BB:CC:DD:EE:FF"
"List wireless clients at site abc-123-def-456"
"Find all 5GHz wireless clients"2. get_client_health
Get detailed health information for a specific client.
Parameters:
base_url(required): Catalyst Center URLusername(required): DNAC usernamepassword(required): DNAC passwordmac_address(required): Client MAC addressversion(optional): DNAC API version (default:"2.3.7.6")verify(optional): Verify SSL certificates (default:true)
Returns:
health: Detailed health metricsresponse: Full API response datamac_address: Queried MAC address
Example Prompts for Claude:
"Get health details for client AA:BB:CC:DD:EE:FF"
"What's the health status of MAC address 00:11:22:33:44:55?"
"Show me detailed metrics for client AA:BB:CC:DD:EE:FF"Development
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=src/dnac_mcp --cov-report=html
# Run specific test file
pytest tests/test_wireless_client_agent.py
# Run with verbose output
pytest -vCode Quality
# Format code
black src tests
# Lint code
ruff check src tests
# Type checking
mypy srcProject Structure
dnac-mcp/
βββ src/
β βββ dnac_mcp/
β βββ __init__.py # Package initialization
β βββ server.py # MCP server implementation
β βββ wireless_client_agent.py # DNAC client agent
β βββ config.py # Configuration management
βββ tests/
β βββ __init__.py
β βββ test_server.py
β βββ test_wireless_client_agent.py
β βββ test_config.py
βββ pyproject.toml # Project configuration
βββ requirements.txt # Core dependencies
βββ requirements-dev.txt # Development dependencies
βββ README.md # This fileTroubleshooting
Connection Issues
Problem: Cannot connect to DNAC Solution:
Verify
base_urlis correct (do not include/api/path)Check credentials
For self-signed certificates, set
verify=false
SSL Certificate Errors
Problem: SSL verification fails Solution:
export DNAC_VERIFY="false" # For testing onlyOr in config.json:
{
"verify": false
}No Results Returned
Problem: Query returns 0 clients Solution:
Verify filters are correct
Check DNAC has clients matching criteria
Try query without filters first
Enable debug logging:
debug=true
API Version Mismatch
Problem: API calls fail with version errors Solution: Update the version parameter to match your DNAC version:
export DNAC_VERSION="2.3.5.3" # ExampleRate Limiting
Problem: Too many API requests Solution: The server includes built-in rate limiting (0.5s delay between calls). Adjust if needed in wireless_client_agent.py.
Security Best Practices
Never commit credentials to version control
Use environment variables or secrets manager for credentials
Enable SSL verification in production (
verify=true)Use least privilege DNAC accounts (read-only if possible)
Rotate credentials regularly
Audit API access through DNAC logs
API Reference
WirelessClientAgent Class
from dnac_mcp import WirelessClientAgent
from dnacentersdk import api
# Initialize DNAC client
dnac = api.DNACenterAPI(
base_url="https://dnac.example.com",
username="admin",
password="password"
)
# Create agent
agent = WirelessClientAgent(
dnac_client=dnac,
max_results=100,
rate_limit_delay=0.5,
debug=True
)
# Query clients
result = agent.get_clients(ssid="Corporate-WiFi")
print(f"Found {result['fetched_count']} clients")Standalone Functions
from dnac_mcp import query_wireless_clients, get_client_health
# Query clients
result = query_wireless_clients(
base_url="https://dnac.example.com",
username="admin",
password="password",
ssid="Corporate-WiFi",
max_results=50
)
# Get client health
health = get_client_health(
base_url="https://dnac.example.com",
username="admin",
password="password",
mac_address="AA:BB:CC:DD:EE:FF"
)Contributing
Contributions are welcome! Please follow these guidelines:
Fork the repository
Create a feature branch:
git checkout -b feature-nameFollow TDD principles (write tests first!)
Follow SOLID principles in design
Format code:
black src testsLint code:
ruff check src testsRun tests:
pytestCommit changes:
git commit -am 'Add feature'Push to branch:
git push origin feature-nameSubmit a Pull Request
License
MIT License - see LICENSE file for details.
Support
Issues: GitHub Issues
Documentation: DNAC SDK Docs
MCP Spec: Model Context Protocol
Acknowledgments
Built with dnacentersdk
Implements Model Context Protocol (MCP)
Inspired by Cisco DevNet community
Roadmap
Add support for wired clients
Implement client troubleshooting tools
Add network device queries
Support for client statistics and trends
Webhook notifications for client events
GraphQL query support
Multi-site aggregation
Export to CSV/JSON
Changelog
v1.0.0 (2025-01-XX)
Initial release
Wireless client query with smart limiting
Client health monitoring
MCP server implementation
Configuration management
Comprehensive documentation
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.