# MCP Startup Parameters Guide
This document provides a detailed introduction to the available parameters for starting the Alibaba Cloud MCP Server, helping users configure the server according to their needs.
## Parameter Table
| Parameter | Required | Type | Default | Description |
|:---------------------------:|:--------:|:-------:|:------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--transport` | No | string | `stdio` | Transport protocol for MCP Server communication.<br>Options:<br> • `stdio` <br> • `sse` <br> • `streamable-http` |
| `--port` | No | int | `8000` | Specifies the port number MCP Server listens on. Make sure the port is not occupied. |
| `--host` | No | string | `127.0.0.1` | Specifies the host address MCP Server listens on. `0.0.0.0` means listening on all network interfaces. |
| `--services` | No | string | None | Comma-separated services, e.g., `ecs,vpc`.<br>Supported services:<br> • `ecs`<br> • `oos`<br> • `rds`<br> • `vpc`<br> • `slb`<br> • `ess`<br> • `ros`<br> • `cbn`<br> • `dds`<br> • `r-kvstore`<br> • `bssopenapi` |
| `--headers-credential-only` | No | bool | `false` | Whether to use credentials only from HTTP headers. When enabled, credentials must be provided via request headers instead of environment variables. |
| `--env` | No | string | `domestic` | Environment type for API endpoints.<br>Options:<br> • `domestic` - Use domestic (China) endpoints<br> • `international` - Use international (overseas) endpoints |
| `--code-deploy` | No | flag | `false` | Enable code deploy mode. When enabled, only loads 6 specific tools:<br> • `OOS_CodeDeploy`<br> • `OOS_GetDeployStatus`<br> • `OOS_GetLastDeploymentInfo`<br> • `LOCAL_ListDirectory`<br> • `LOCAL_RunShellScript`<br> • `LOCAL_AnalyzeDeployStack` |
| `--extra-config` | No | string | None | Add extra services and APIs to config (additive, does not replace existing config). Supports JSON format or Python dict format with single quotes.<br>Example: `"{'sls': ['GetProject', 'ListProject'], 'ecs': ['StartInstance']}"` |
| `--visible-tools` | No | string | None | Comma-separated list of tool names to make visible (whitelist mode). Only these specified tools will be registered when this parameter is provided.<br>Example: `OOS_RunCommand,ECS_DescribeInstances,LOCAL_ListDirectory` |
## Usage Examples
### Basic Usage
```bash
uv run src/alibaba_cloud_ops_mcp_server/server.py --transport sse --port 8080 --host 0.0.0.0 --services ecs,vpc
```
### Code Deploy Mode
```bash
uv run src/alibaba_cloud_ops_mcp_server/server.py --code-deploy
```
### Add Extra APIs via MCP Config
Using `--extra-config` to dynamically add services and APIs:
```bash
# JSON format (double quotes inside)
uv run src/alibaba_cloud_ops_mcp_server/server.py --extra-config '{"sls": ["GetProject", "ListProject"], "ecs": ["StartInstance"]}'
# Python dict format (single quotes inside)
uv run src/alibaba_cloud_ops_mcp_server/server.py --extra-config "{'sls': ['GetProject', 'ListProject'], 'ecs': ['StartInstance']}"
```
### Whitelist Mode
Using `--visible-tools` to only expose specific tools:
```bash
uv run src/alibaba_cloud_ops_mcp_server/server.py --visible-tools "OOS_RunCommand,ECS_DescribeInstances,LOCAL_ListDirectory"
```
### International Environment
```bash
uv run src/alibaba_cloud_ops_mcp_server/server.py --env international --services ecs,vpc
```
### MCP JSON Configuration Example
You can configure these parameters in your MCP client's JSON configuration file:
```json
{
"mcpServers": {
"alibaba-cloud-ops-mcp-server": {
"timeout": 600,
"command": "uvx",
"args": [
"alibaba-cloud-ops-mcp-server@latest"
],
"env": {
"ALIBABA_CLOUD_ACCESS_KEY_ID": "Your Access Key ID",
"ALIBABA_CLOUD_ACCESS_KEY_SECRET": "Your Access Key SECRET"
}
}
}
}
```
---
For more help, please refer to the main project documentation or contact the maintainer.