feat: unified server mode — single process for multiple services#145
Open
filhocf wants to merge 4 commits intoHuaweiCloudDeveloper:mainfrom
Open
feat: unified server mode — single process for multiple services#145filhocf wants to merge 4 commits intoHuaweiCloudDeveloper:mainfrom
filhocf wants to merge 4 commits intoHuaweiCloudDeveloper:mainfrom
Conversation
- Add HUAWEI_ENDPOINT_DOMAIN env var to override myhuaweicloud.com domain - Add endpoint_domain field to MCPConfig (config.yaml + env var) - Modify create_api_client to replace domain when endpoint_domain is set - Pass endpoint_domain from config through server to API client This enables usage with Huawei Cloud Stack Online (HCSO) and other on-premise deployments where API endpoints use a different domain. Closes HuaweiCloudDeveloper#137
…oint) - HUAWEI_ENDPOINT_PREFIX: inject suffix into service name (e.g. '-prevnet') roma.region.domain → roma-prevnet.region.domain - HUAWEI_PROJECT_ID: required for HCSO on-premise authentication - HUAWEI_IAM_ENDPOINT: custom IAM endpoint for on-premise deployments Uses BasicCredentials.with_iam_endpoint() for HCSO IAM All new parameters supported via env vars and config.yaml.
- Bump version to 0.3.1 - Add HCSO/on-premise to description and keywords - Fix license to Apache-2.0 (matching repo LICENSE) - Add project URLs (fork + upstream) - Add Python 3.11-3.13 classifiers - Add co-author
…weiCloudDeveloper#142) - New UnifiedMCPServer class loads multiple OpenAPI specs in one process - HUAWEI_SERVICES env var: comma-separated service codes (e.g. ecs,vpc,cce) - Tools prefixed with service code (ecs_ListServers, vpc_ListVpcs) - Compatible with multi-tenant (HUAWEI_TENANTS_FILE) - Graceful handling of invalid OpenAPI JSONs (skip with warning) - New entry point: mcp-server-unified - Fix: CCE OpenAPI JSON trailing comma
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #142
Summary
Adds a unified server mode where a single process loads multiple Huawei Cloud service OpenAPI specs, drastically reducing resource usage.
Motivation
Usage
Changes
UnifiedMCPServerclassHUAWEI_SERVICESenv varecs_ListServers,vpc_ListVpcs)call_toolto correct OpenAPI spec based on prefixmcp-server-unifiedBackward Compatibility
Existing per-service entry points (
mcp-server-ecs, etc.) are unchanged. The unified server is an additional option.Testing
Tested with 10 services (ecs, vpc, cce, elb, nat, evs, iam, dns, lts, ces): 898 tools loaded in a single process.