思科Meraki MCP服务器
  
一个全面的模型上下文协议(MCP)服务器,将所有Cisco Meraki Dashboard API v1端点公开为人工智能助手的工具。使用Claude、ChatGPT或任何兼容MCP的AI助手通过自然语言控制您的Meraki基础设施。
特性
- 62工具 -完全覆盖Meraki Dashboard API v1
- 自然语言控制 -通过对话管理您的网络基础设施
- 智能速率限制 -API限值的自动处理和指数退避
- 响应优化 -80-95%的令牌减少,以实现高效的AI交互
- 类型安全 -带有Zod验证的完整TypeScript
- 自动审批 -只读操作的可配置模式
- 承载身份验证 -具有传统回退功能的现代API v1身份验证
支持的操作
- 组织管理 -网络、设备、许可证、管理员
- 网络运营 -客户端、流量分析、固件、警报
- 设备控制 -状态、LED控制、重启、性能指标
- 分析和监控 -带宽使用情况、应用程序、API使用情况
安装
# Clone the repository
git clone https://github.com/dbankscard/cisco-meraki-mcp.git
cd cisco-meraki-mcp
# Install dependencies
npm install
# Build the server
npm run build配置
1.获取您的Meraki API密钥
- 登录到 Meraki仪表板
- 引导到 组织>设置
- 检查 启用对Cisco Meraki Dashboard API的访问
- 生成API密钥
2.设置身份验证
# Option 1: Environment variable
export MERAKI_API_KEY="your-40-character-api-key"
# Option 2: Create .env file
echo "MERAKI_API_KEY=your-40-character-api-key" > .env可选配置
# Use a different API base URL (for different regions)
export MERAKI_API_BASE_URL="https://api.meraki.com/api/v1"
# Specify custom settings file location
export MERAKI_MCP_SETTINGS_PATH="/path/to/meraki-mcp-settings.json"自动批准设置
MCP服务器支持可配置的工具自动批准,允许在没有用户确认的情况下执行某些操作。创建一个 meraki-mcp-settings.json 文件:
{
"autoApprove": {
"enabled": true,
"tools": {
"all": false, // Auto-approve all tools (use with caution)
"patterns": [ // Auto-approve tools matching these patterns
"*_list", // All list operations
"*_get", // All get operations
"organization_*_list", // All organization list operations
"network_*_get" // All network get operations
],
"specific": [ // Auto-approve specific tools
"organization_licenses_overview",
"network_events_list"
],
"exclude": [ // Never auto-approve these tools
"network_delete",
"organization_admin_create"
]
},
"readOnlyByDefault": true // Auto-approve read-only operations
}
}自动批准配置选项
- 启用:自动审批功能的主开关
- tools.all:自动批准所有工具(覆盖其他设置)
- 工具.图案:用于匹配工具名称的球状模式数组
- 工具.特定:要自动批准的精确工具名称数组
- 工具排除:永不自动批准的工具名称数组
- readOnlyByDefault:自动批准只读操作(获取、列表、显示等)
有关详细的自动审批设置说明和示例配置,请参阅 CLAUDE_DESKTOP_SETUP.md
设置文件位置(按优先级顺序)
- 中指定的路径
MERAKI_MCP_SETTINGS_PATH环境变量 meraki-mcp-settings.json在当前工作目录中.meraki-mcp-settings.json在当前工作目录中meraki-mcp-settings.json在MCP服务器目录中
快速开始
使用Claude Desktop运行
- 打开克劳德桌面设置
- 添加到MCP服务器配置中:
{
"mcpServers": {
"meraki": {
"command": "node",
"args": ["/path/to/cisco-meraki-mcp/build/index.js"],
"env": {
"MERAKI_API_KEY": "your-api-key"
}
}
}
}- 重新启动克劳德桌面
- 查找扳手图标以确认MCP已连接
发展模式
npm run devMCP检验员测试
npm run inspector可用工具
组织工具(26个工具)
organization_list-列出所有组织organization_get-获取组织详细信息organization_update-更新组织设置organization_networks_list-列出组织中的网络organization_network_create-创建新网络organization_devices_list-列出所有设备organization_devices_statuses-获取设备状态organization_devices_availabilities-获取设备可用性历史记录organization_licenses_list-列出许可证organization_licenses_overview-获取许可证概述organization_license_claim-申领许可证organization_admins_list-列出管理员organization_admin_create-创建管理员organization_inventory_devices-获取库存设备organization_inventory_claim-索赔清单organization_uplinks_statuses-获取上行链路状态organization_networks_combine-组合多个网络
分析工具:
organization_traffic_analysis-顶级带宽消费者organization_clients_bandwidth_usage-带宽使用历史organization_api_usage-API请求监控organization_config_changes-配置更改跟踪organization_device_statuses_overview-设备运行状况概述organization_security_events-安全事件日志(从所有网络聚合)organization_top_networks_by_status-按健康状况排名的顶级网络organization_devices_availability_history-设备正常运行时间跟踪
网络工具(19个工具)
network_get-获取网络详细信息network_update-更新网络设置network_delete-删除网络network_clients_list-列出网络客户端network_client_get-获取客户详细信息network_devices_list-列出网络设备network_devices_claim-索赔设备network_device_remove-删除设备network_traffic_get-获取流量分析network_events_list-列出事件network_firmware_upgrades_get-获取固件信息network_firmware_upgrades_update-更新固件设置network_settings_get-获取网络设置network_settings_update-更新网络设置network_alerts_settings_get-获取警报设置network_alerts_settings_update-更新警报设置network_split-拆分网络network_combine-合并网络network_bind-绑定到模板network_unbind-解除与模板的绑定
设备工具(10个工具)
device_get-获取设备详细信息device_update-更新设备属性device_blink_leds-闪烁的LED用于识别device_clients_list-列出连接到设备的客户端device_loss_latency_history-上行链路性能指标device_reboot-重新启动设备device_remove-从网络中删除设备device_lldp_cdp-获取LLDP/CDP信息device_management_interface-获取管理设置device_management_interface_update-更新管理设置
即将推出
- 设备(MX)专用工具
- 开关(MS)专用工具
- 无线(MR)专用工具
- 相机(MV)工具
- 系统管理器工具
- 洞察工具
- 传感器工具
对话示例
问你的AI助手自然语言问题:
组织管理
"What Meraki organizations do I have access to?"
"Show me all networks in organization 12345"
"Create a new network called 'Branch Office' with MX and MS devices"
"What licenses are expiring soon?"网络运营
"List all clients in my network from the last 24 hours"
"What's consuming the most bandwidth?"
"Show me security events from today"
"Update the timezone for network N_12345 to America/New_York"设备控制
"Blink the LEDs on device Q2QN-XXXX-XXXX"
"Show me the uplink performance for the last week"
"Reboot the main office switch"
"Which clients are connected to access point Q2QN-YYYY-YYYY?"分析和监控
"What are the top bandwidth consuming applications?"
"Show me API usage patterns for the last week"
"Track configuration changes made this month"
"Which networks are using the most data?"文档
- 完整功能指南 -所有62个工具的完整列表及其示例
- 优化指南 -性能调优和最佳实践
- Claude桌面设置 -详细的设置说明
安全
- API密钥从不记录或在响应中公开
- 所有通信都使用HTTPS
- 启动时验证环境变量
- 输入参数经过净化和验证
- 过滤响应数据以防止令牌溢出
贡献
欢迎投稿!拜托:
- 分叉存储库
- 创建要素分支(
git checkout -b feature/amazing-feature) - 提交您的更改(
git commit -m 'Add amazing feature') - 推到分支(
git push origin feature/amazing-feature) - 打开拉取请求
开发设置
# Clone your fork
git clone https://github.com/YOUR_USERNAME/cisco-meraki-mcp.git
cd cisco-meraki-mcp
# Install dependencies
npm install
# Run in development mode
npm run dev
# Run tests
npm test
# Test with MCP Inspector
npm run inspector资源
许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
致谢
- CiscoMeraki用于全面的仪表板API
- 模型上下文协议规范的拟人化
- 持续支持和贡献的开源社区
______________________________________________________________________
用爱制作 dbankscard
