mcp-server icon indicating copy to clipboard operation
mcp-server copied to clipboard

feat: unified server mode — single process serving multiple services

Open filhocf opened this issue 7 months ago • 0 comments

Problem

The current architecture requires one process per cloud service (mcp-server-ecs, mcp-server-vpc, etc.). With 117+ entry points, running even 13 services means 13 Python processes, each loading the full Huawei SDK (~200MB+ total RAM).

Proposed Solution

Add a unified server mode where a single process loads multiple OpenAPI specs and registers all tools with service-prefixed names (e.g., ecs_ListServers, vpc_ListVpcs).

Usage

export HUAWEI_SERVICES="ecs,vpc,cce,elb,nat,evs,iam"
mcp-server-unified -t stdio

Benefits

Approach Processes RAM Startup
Current (1 per service) 13+ ~2GB+ Slow
Unified 1 ~200MB Fast

Design

  • New entry point mcp-server-unified
  • HUAWEI_SERVICES env var: comma-separated list of service codes
  • Each tool prefixed with service code to avoid name collisions
  • call_tool routes to correct OpenAPI spec based on prefix
  • Compatible with multi-tenant (#141)

Implementation will be available at: https://github.com/filhocf/hcso-mcp-server

filhocf avatar Apr 16 '26 12:04 filhocf