Skip to content

feat: unified server mode — single process serving multiple services #142

@filhocf

Description

@filhocf

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 (feat: multi-tenant support via HUAWEI_TENANTS_FILE #141)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions