# incloud-mcp **Repository Path**: xihadajiang1/incloud-mcp ## Basic Information - **Project Name**: incloud-mcp - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-08-14 - **Last Updated**: 2025-08-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # InCloud MCP Server A Model Context Protocol (MCP) server that provides seamless integration with InCloud APIs through automatic Swagger-based tool registration. ## Features - **Automatic Tool Registration**: Automatically discovers and registers API tools from Swagger documentation - **Intelligent Decision Flow**: Smart routing between specialized tools and generic API flows - **Dynamic Service Discovery**: Automatically detects available services from Swagger resources - **Configurable**: Easy configuration through YAML files - **Extensible**: Modular architecture for easy extension ## Quick Start ### Installation ```bash pip install incloud-mcp-server ``` ### Configuration Create a `config.yaml` file: ```yaml swagger: base_url: "http://10.180.210.99:30079" services: icompute: enabled: true apis: - method: "GET" path: "/v1/vhosts" description: "List virtual hosts" istorage: enabled: true apis: - method: "GET" path: "/v1/volumes" description: "List storage volumes" # Authentication (optional) auth: type: "bearer" # or "basic", "api_key" token: "your-token-here" ``` ### Usage with MCP Client Add to your MCP client configuration: ```json { "mcpServers": { "incloud-mcp-server": { "command": "incloud-mcp-server", "args": ["--config", "config.yaml"], "env": {} } } } ``` ## Architecture ### Core Components 1. **Swagger Client**: Discovers APIs from Swagger documentation 2. **Tool Generator**: Dynamically creates MCP tools from API specifications 3. **Prompt Understanding**: Provides intelligent guidance for API usage 4. **Common API Tools**: Generic tools for API discovery and execution ### Workflow 1. **Service Discovery**: Fetch available services from `/swagger-resources` 2. **API Discovery**: Get API documentation from `/v2/api-docs` for each service 3. **Tool Registration**: Automatically register MCP tools for configured APIs 4. **Intelligent Routing**: Route user requests to appropriate tools ## Command Line Options ```bash incloud-mcp-server --help ``` Options: - `--config`: Path to configuration file (default: config.yaml) - `--transport`: Transport type (stdio/sse/streamable-http) - `--port`: Port number for HTTP transport - `--host`: Host address for HTTP transport ## Development ### Setup Development Environment ```bash git clone cd incloud-mcp pip install -e ".[dev]" ``` ### Running Tests ```bash pytest ``` ### Project Structure ``` src/incloud_mcp_server/ ├── __init__.py # Main entry point ├── server.py # MCP server implementation ├── config.py # Configuration management ├── swagger/ # Swagger integration │ ├── client.py # Swagger API client │ └── tool_generator.py # Dynamic tool generation ├── tools/ # MCP tools │ ├── common_tools.py # Common API tools │ └── prompt_understanding.py # Intelligent guidance └── static/ # Static resources └── PROMPT_UNDERSTANDING.md # AI guidance template ``` ## License MIT License