ZStack MCP Server
OfficialServer Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ZSTACK_ACCOUNT | No | 账户名(认证方式一) | |
| ZSTACK_API_URL | No | ZStack API 地址,如 http://localhost:8080 | |
| ZSTACK_PASSWORD | No | 密码(认证方式一) | |
| ZSTACK_SESSION_ID | No | 已有的 Session UUID(认证方式二,优先级更高) | |
| ZSTACK_ALLOW_ALL_API | No | 是否允许写操作(true 或 false),默认 false | false |
| ZSTACK_QUERY_DEFAULT_LIMIT | No | Query API 默认 limit,设 0 禁用 | 50 |
| ZSTACK_RESPONSE_SIZE_LIMIT | No | 响应大小上限(字节),设 0 禁用 | 65536 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_apiA | 根据关键词搜索 ZStack API Args: keywords: 搜索关键词列表,如 ["Query", "Vm"] 或 ["Create", "Volume"] 支持驼峰拆分匹配,如搜索 "vm" 可以匹配 "QueryVmInstance" category: 可选,按分类过滤,如 "vm", "volume", "network" limit: 最多返回数量,默认 15 Returns: 匹配的 API 列表,包含名称、描述、分类、调用类型 |
| describe_apiA | 获取指定 ZStack API 的详细参数说明 Args: api_name: API 名称,如 "QueryVmInstance" Returns: API 的精简信息。对于 Query API,仅返回核心参数和 queryableFields。 |
| execute_apiA | 执行 ZStack API 注意: 默认只允许调用只读 API(Query/Get/List 等)。 如需调用写操作 API,请设置环境变量 ZSTACK_ALLOW_ALL_API=true Args: api_name: API 名称,如 "QueryVmInstance" parameters: API 参数字典 对于 Query API,conditions 格式为: [{"name": "字段名", "op": "操作符", "value": "值"}, ...] 分页: limit(默认 50)、start(偏移量) 字段选择: fields(减少返回数据量) Returns: API 执行结果 (JSON 格式) Example: execute_api( api_name="QueryVmInstance", parameters={ "conditions": [ {"name": "uuid", "op": "like", "value": "ae6e57a0%"} ] } ) |
| search_metricA | 搜索可用的 ZStack 监控指标 Args: keywords: 搜索关键词,如 ["CPU", "Usage"] 或 ["Memory"] 支持驼峰拆分匹配 namespace: 可选,按命名空间过滤(支持模糊匹配),如 "ZStack/VM", "vm", "host" limit: 最多返回数量,默认 20 match_mode: 关键词匹配模式,"and" 或 "or",默认 "or" prefer_namespaces: 优先排序的命名空间列表(默认 ["ZStack/VM","ZStack/Host"]) Returns: 匹配的监控指标列表,包含名称、描述、命名空间、可用标签 |
| get_metric_dataA | 获取 ZStack 监控数据 Args: namespace: 命名空间,如 "ZStack/VM", "ZStack/Host" metric_name: 指标名称,如 "CPUUsedUtilization" start_time: 开始时间(ISO 或秒级时间戳) end_time: 结束时间(ISO 或秒级时间戳) period: 采样周期(秒),默认 60 labels: 标签过滤,如 ["VMUuid=xxx"] 或 {"VMUuid":"xxx"} summary_only: 仅返回统计信息(点数/最大/最小/平均/方差/标准差) 注意: 返回数据量与时间跨度和 period 成正比。可用估算公式: 点数 ≈ ceil((end_time - start_time) / period) * series_count series_count 为不同 label 组合数量;若不传 labels,可能返回多组系列 (例如指标包含 CPUNum/VMUuid 等 label 时每个组合都会产出一组序列)。 为避免输出过大:缩短时间范围、增大 period 或增加 labels 过滤。 Returns: 监控数据点列表 |
| get_metric_summaryB | 获取监控指标的聚合 TopN(按 label_key 分组) Args: namespace: 命名空间,如 "ZStack/VM", "ZStack/Host" metric_name: 指标名称,如 "CPUOccupiedByVm" label_key: 标签键,如 "VMUuid", "HostUuid" metric_names: 可选,多指标合并(如 in/out) start_time: 开始时间(ISO 或秒级时间戳) end_time: 结束时间(ISO 或秒级时间戳) period: 采样周期(秒),默认 60 aggregate: 单指标聚合方式,可选 "max"|"avg"|"sum"|"min" combine: 多指标合并方式,可选 "sum"|"avg"|"max"|"min" threshold_op: 阈值比较符,如 >,>=,<,<=,==,!= threshold_value: 阈值数值 top_n: 返回条数,默认 10 resolve_resource: 可选 "vm" 或 "host",用于解析名称 Returns: 聚合后的 TopN 列表 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zstackio/zstack-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server