端点代理管理协议

用于Cisco ThousandEyes API的模型上下文协议服务器,提供查询、更新和管理端点代理的工具。

  • by JackRiebel
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 JackRiebel/ThousandEyes_MCP

使用说明

千眼MCP

用于Cisco ThousandEyes API(v7.0.62)的模型上下文协议(MCP)服务器。它提供了用于查询、更新和管理端点代理的工具。

免责声明:用于开发/POC。未经安全强化,不得用于生产。

特性

  • 端点代理管理:列出、检索、更新和删除代理。
  • 帐户组支持:筛选条件 aid (帐户组ID)。
  • 扩展选项:通过以下方式扩展响应 expand (例如,客户端、VPN配置文件)。
  • JSON响应:结构化输出,便于在Claude中解析。

安装

  1. 克隆或创建仓库:
    mkdir ThousandEyes_Endpoint_MCP
    cd ThousandEyes_Endpoint_MCP
    
  2. 创建虚拟环境:
    python -m venv .venv
    source .venv/bin/activate  # Windows: .venv\Scripts\activate
    
  3. 安装依赖项:
    pip install -r requirements.txt
    

配置

  1. 复制示例环境:
    cp .env-example .env
    
  2. 更新 .env:
    THOUSANDEYES_API_BASE_URL=https://api.thousandeyes.com/v7
    THOUSANDEYES_API_TOKEN=your-thousandeyes-api-token-here
    
    • 从ThousandEyes仪表板获取令牌:设置>API令牌。

使用Claude Desktop

  1. 配置Claude桌面(~/Library/Application Support/Claude/claude_desktop_config.json):
    {
      "mcpServers": {
        "thousandeyes_endpoint_mcp": {
          "command": "/path/to/ThousandEyes_Endpoint_MCP/.venv/bin/fastmcp",
          "args": ["run", "/path/to/ThousandEyes_Endpoint_MCP/thousandeyes_endpoint_mcp.py"],
          "cwd": "/path/to/ThousandEyes_Endpoint_MCP",
          "env": {
            "THOUSANDEYES_API_TOKEN": "your-token-here"
          }
        }
      }
    }
    
  2. 重新启动克劳德桌面。
  3. 提示示例:
    • “使用millioneyes_endpoint_mcp获取端点代理。”
    • “使用扩展客户端检索代理ID abc123的详细信息。”

工具

  • get_endpoint_agents(aid?, max_results?, expand?):列出代理人。
  • get_endpoint_agent(agent_id, aid?, expand?):获取代理详细信息。
  • update_endpoint_agent(agent_id, update_data, aid?):更新代理。
  • delete_endpoint_agent(agent_id, aid?):删除代理。

最佳实践

  • 速率限制:API限制:10 req/sec。代码包括429上的延迟。
  • 安全:定期旋转令牌;使用env变量。
  • 验证:Pydantic模式确保数据完整性。
  • 故障排除:检查401(令牌)、404(代理ID)、429(速率限制)的日志。

关于

基于 催化剂中心MCP.对于ThousandEyes端点代理API v7.0.62。

提交人:[您的姓名],思科解决方案工程师|日期:2025年9月22日