CityEngine Cloud MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CityEngine Cloud MCP Server Generate a 5-story glass office building with a rooftop garden"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CityEngine Cloud MCP Server & Tools
Text-to-3D city buildings in one sentence: natural language → CGA rules → cloud engine → glTF/glb — plus demo browsing and quota lookup. Read-only compute endpoints only.
This repository contains two complementary packages:
Package | What it is | Use it with |
| MCP server (stdio, FastMCP) | kimi code, Codex CLI, Claude Desktop, any MCP client |
| OpenAI-compatible function-calling toolkit (schemas + client) | DeepSeek, Qwen, GLM, GPT and any OpenAI-style tool-calling API |
Live demos and self-service API keys: https://www.cityengine.cn/plugins.html · API contract: https://api.cityengine.cn
Tools (6)
Tool | Description | Quota |
| Natural language → CGA rule source (sync, no rendering); supports | NL quota |
| CGA source + attributes → engine parse → 3D model stats + glb download (sha256 verified) | generate quota |
| Natural language → ready 3D model (NL2CGA + parse chained), returns | NL + generate |
| List showcase demos on the official site (id/name/engine/attribute count) | free |
| Inspect a demo's attribute panel, node/material counts, engine timing | free |
| Current key's plan and quota usage | free |
All endpoints are read-only compute calls — nothing writes to your account or the site.
Related MCP server: QCAD MCP
Install (MCP server)
pip install cityengine-mcp # or: pip install . from this repo
# provides the `cityengine-mcp` console script; or run: python -m cityengine_mcp.serverRequirements: Python ≥ 3.10, mcp 1.x, httpx.
Get an API key
Keys use the cvk_ prefix. Two self-service ways:
Website: register/log in at https://www.cityengine.cn → User Center → "插件 Key" → issue (shown once, save it).
CLI:
curl -X POST https://api.cityengine.cn/v1/register \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"strong-password","nickname":"optional"}'
# the response api_key is your plugin key (shown in full only once)Free tier: 5 NL generations/month, 100 model generations/day. Paid members: unlimited NL.
Configure your MCP client
Environment variables:
Variable | Required | Default | Purpose |
| yes | — | plugin API key ( |
| no |
| gateway base URL |
| no |
| demo listing site |
| no |
| where glb files land |
| no |
| render job poll cap (seconds) |
Generic MCP client config:
{
"mcpServers": {
"cityengine": {
"command": "python",
"args": ["-m", "cityengine_mcp.server"],
"env": { "CITYENGINE_API_KEY": "cvk_xxx" }
}
}
}Ready-made snippets for kimi code, Codex CLI and Claude Desktop live in config-examples/.
OpenAI-compatible function calling (cityengine-tools/)
pip install ./cityengine-toolsfrom cityengine_tools import CityEngineTools
tools = CityEngineTools(api_key="cvk_xxx")
# pass tools.schemas() as the `tools` parameter of any OpenAI-compatible chat call;
# feed tool_calls back into tools.dispatch(...) to execute them.JSON schemas for all six tools are in cityengine-tools/schemas/.
Links
Website & demos: https://www.cityengine.cn · plugin page: https://www.cityengine.cn/plugins.html
API: https://api.cityengine.cn (OpenAPI contract
openapi-v1.yaml)
License
MIT (see LICENSE). The packages are client SDKs; generated models and CGA output are governed by your cityengine.cn plan terms.
Available Tools
6 toolsgenerate_cgaA
自然语言一句话 → NL2CGA → CGA 规则源码(不渲染,同步返回)。
两种模式二选一:
text:自然语言描述,如「三层小楼,坡屋顶,底层商铺」。
base_cga + instruction:在既有 CGA 上按指令修改(如「把立面材质改成红砖」)。
LLM 兜底模式最长约 90s,属正常现象。
Returns: cga_source(可喂给 parse_cga / generate_model 的 cga_edit 回传)、 engine_path(self/kimi_fallback/hybrid)、warnings、usage。
Inputs: text, base_cga, instruction.
generate_modelB
自然语言一句话 → 直接生成三维模型(NL2CGA + 引擎解析一键串联)。
两种模式二选一:
text:自然语言描述,如「生成一栋 12 层现代玻璃幕墙办公楼」。
base_cga + instruction:回传既有 CGA + 修改指令,二次生成再出模型。
Args:(其余参数同 parse_cga)
Returns: cga_source(供后续 cga_edit 回传)、模型统计、glb 本地路径、 签名下载地址、sha256、usage、warnings。
Inputs: seed, text, base_cga, timeout_s, +5 more.
get_demoA
查看某个官网 demo 案例的详情:属性面板定义、材质数、节点数、引擎耗时。
注意:demo 的 CGA 源码属付费内容(官网商城),本工具返回公开快照信息 (属性 schema / 规模 / 引擎指标),适合做参数设计参考。
Args: demo_id: list_demos 返回的 id,如 building-glass-20260928。
Inputs: demo_id (required).
get_quotaA
查询当前 API key 的套餐、额度用量(generate/NL2CGA)与限流参数。
Inputs: no named parameters.
list_demosA
列出 CityEngine 官网首页的 demo 案例(id、名称、引擎、来源日期、属性个数)。
返回条目可传给 get_demo 查看属性面板细节。
Inputs: no named parameters. Returns: result
parse_cgaA
用 CityEngine 引擎解析 CGA 规则源码,生成三维模型(glTF/glb)。
Args: cga_source: CGA 规则源码全文(手写或 generate_cga 的产物)。 attributes: CGA attr 覆盖,如 {"height": 30};键必须在规则的 attr 声明内。 initial_shape: 初始地块多边形 {"type":"Polygon","pts":[[x,z],...]},米制; 缺省用 30m x 20m 调试地块。 seed: 随机种子,固定后可复现结果。 download_glb: 是否把 glb 下载到本地(默认 True)。 output_dir: glb 落盘目录(默认环境变量 CITYENGINE_OUTPUT_DIR 或当前目录下 cityengine_mcp_output/)。 timeout_s: 轮询 job 的最长秒数(上限 300)。
Returns: job_id、模型统计(nodes/vertices/triangles/textures_embedded)、glb 本地路径、 签名下载地址(24h 有效)、sha256、计费用量、告警列表。
Inputs: cga_source (required), seed, timeout_s, attributes, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
parse_cga, generate_cga, and generate_model have related purposes, but descriptions clearly delineate them (parse renders CGA, generate_cga returns only source, generate_model chains both). The generate_model/generate_cga overlap could still cause some misselection when an agent just wants a model.
All names follow a consistent verb_noun snake_case pattern (parse_cga, generate_cga, generate_model, list_demos, get_demo, get_quota). No mixed conventions or vague verbs.
Six tools is well-scoped for a CGA generation/rendering service, with each tool earning a distinct role. Nothing feels padded or missing at the count level.
The core lifecycle (NL→CGA, CGA→model, combined flow) plus demos and quota is covered. Minor gaps exist around job lifecycle management (no cancel/list jobs) and standalone model retrieval, but agents can work around these.
Maintenance
Related MCP Connectors
Text-to-CAD: build exact STEP or 3MF/STL on the server, each stated requirement measured.
Run 3D CAD operations, pipelines, parametric models and STEP conversions on CAD Cloud with a key
150+ hosted tools: describe-to-build CAD, scan-to-CAD, architecture studio, web research, media.
Convert Revit files to XKT, IFC, or DWG and query BIM data via natural language.
Related MCP Servers
- AlicenseBqualityBmaintenanceOpen-source MCP server for Autodesk Revit 2022 to 2027: read, audit and edit live models with 89 tools, one Undo entry per change, and a workstation read-only lock.8915MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to automate 2D architectural drafting and CAD file management, including DXF/DWG parsing, SVG/PNG/PDF rendering, wall extrusion to 3D STL meshes, room and beam analysis, block/script library access, and persistent depot storage via a REST API and MCP tools.18MIT
- AlicenseAqualityCmaintenanceEnables LLM agents to author EisenScript procedural grammars and render them headlessly into Wavefront OBJ meshes, returning vertex/face counts and bounding boxes alongside validation, linting, PNG previews, mesh-format conversion, batch gallery rendering, and Unreal import.12MIT
- AlicenseAqualityBmaintenanceEnables agents to generate 3D models from text prompts or reference images, download GLB files, check operation and subscription status, and re-download completed models using a browser login session.18MIT