AI

automateyournetwork/ise_mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

16 stars 12 forks Качество 69 Тренд 21Apache-2.0

MCP-сервер для Cisco ISE

Обзор

ISE MCP Server - это сервер Model Context Protocol (MCP), созданный с помощью библиотеки Python fastmcp. Он динамически раскрывает конечные точки API Cisco Identity Services Engine (ISE) как структурированные, обнаруживаемые инструменты MCP. Этот сервер позволяет клиентам взаимодействовать с API Cisco ISE REST стандартизированным способом, предлагая такие функции, как генерация динамических инструментов и фильтрация ответов API. Инструменты MCP автоматически создаются на основе записей в файле конфигурации src/ise mcp server/urls.json. Использует библиотеку fastmcp для надежной реализации MCP-сервера, включая генерацию схем и обработку запросов. - Использует HTTPX. AsyncClient для неблокирующей связи с Cisco ISE Поддерживает фильтрацию результатов Cisco ISE API с помощью аргументов filter expression и query params в каждом инструменте. Данные подключения Cisco ISE (базовый URL, имя пользователя, пароль) и настройки проверки SSL (ISE VERIFY SSL) настраиваются через файл .env.

Обзор (машинный перевод)

Обзор

ISE MCP Server — это сервер протокола Model Context Protocol (MCP), построенный с помощью библиотеки Python. Он динамически раскрывает конечные точки API Cisco Identity Services Engine (ISE) как структурированные, обнаруживаемые инструменты MCP. Этот сервер позволяет клиентам взаимодействовать с API Cisco ISE REST стандартизированным способом, предлагая такие функции, как генерация динамических инструментов и фильтрация ответов API.

Особенности

**Dynamic Tool Generation: ** Инструменты MCP автоматически создаются на основе записей в файле конфигурации src/ise_mcp_server/urls.json. **FastMCP Integration: ** Использует библиотеку fastmcp для надежной реализации MCP-сервера, включая генерацию схем и обработку запросов. **Асинхронные вызовы API: ** Использует httpx.AsyncClient для неблокирующей связи с Cisco ISE. **API Filtering: ** Поддерживает фильтрацию результатов Cisco ISE API с помощью аргументов filter_expression и query_params в каждом инструменте. ** Конфигурация, ориентированная на окружающую среду: ** Данные подключения Cisco ISE (базовый URL, имя пользователя, пароль) и настройки проверки SSL ([T6]) настраиваются через файл .env.

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

ISE MCP Server (using FastMCP)

Overview

The ISE MCP Server is a Model Context Protocol (MCP) server built with the Python fastmcp library. It dynamically exposes Cisco Identity Services Engine (ISE) API endpoints as structured, discoverable MCP tools. This server allows clients to interact with Cisco ISE REST APIs in a standardized way, offering features like dynamic tool generation and API response filtering.

Features

  • Dynamic Tool Generation: MCP tools are automatically created based on entries in the src/ise_mcp_server/urls.json configuration file.
  • FastMCP Integration: Leverages the fastmcp library for robust MCP server implementation, including schema generation and request handling.
  • Asynchronous API Calls: Uses httpx.AsyncClient for non-blocking communication with Cisco ISE.
  • API Filtering: Supports filtering of Cisco ISE API results through filter_expression and query_params arguments in each tool.
  • Environment-Driven Configuration: Cisco ISE connection details (base URL, username, password) and SSL verification settings (ISE_VERIFY_SSL) are configured via a .env file.
  • Detailed Docstrings: Dynamically generated tools include comprehensive docstrings explaining their purpose, the ISE API endpoint they target, and how to use filtering parameters.
  • Standardized Interaction: Adheres to the Model Context Protocol, allowing interaction via any MCP-compatible client.
  • Streamable HTTP Transport: Configured to use streamable-http transport by default for web-based access.

Setup

Server

{ “mcpServers”: { “ise”: { “command”: “python”, “args”: [ “ise_mcp_server.py”, “–oneshot” ], “env”: { “ISE_BASE”: “https://devnetsandboxise.cisco.com”, “USERNAME”: “readonly”, “PASSWORD”: “ISEisC00L” } } } }

Requirements

  • Python 3.9 or higher.
  • Required Python packages are listed in requirements.txt (at the project root). Install them using:
    pip install -r requirements.txt
    
    Or, if using uv:
    uv pip install -r requirements.txt
    
    Key dependencies include fastmcp, httpx, pydantic, and python-dotenv. (Ensure requirements.txt reflects httpx instead of requests).

Configuration

  1. Environment Variables: Create a .env file in the project root directory (/Users/username/mcp_servers/ISE_MCP/.env) with your Cisco ISE API credentials and base URL:
    ISE_BASE="https://your-ise-instance.example.com"
    USERNAME="your-ise-api-username"
    PASSWORD="your-ise-api-password"
    # Optional: Controls SSL certificate verification for ISE API calls.
    # Default is true. Set to "false" to disable (insecure).
    # Or provide a path to a CA bundle file, e.g., "/path/to/your/ca.pem".
    ISE_VERIFY_SSL="true"
    
Открыть полный README на GitHub

Установка

docker run -i // Essential for STDIO interaction "--rm // Automatically remove the container when it exits "--env-file=/Users/username/mcp_servers/ISE_MCP/.env // Mounts your .env file "ise-mcp:latest" // The image we just built
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { // ... other servers ... "ISE_MCP": { "command": "docker", "args": [ "run", "-i", // Essential for STDIO interaction "--rm", // Automatically remove the container when it exits "--env-file=/Users/username/mcp_servers/ISE_MCP/.env", // Mounts your .env file "ise-mcp:latest" // The image we just built ], "cwd": "/Users/username/mcp_servers/ISE_MCP" // Ensures paths are correct } // ... other servers ... } }