FoliMesh
Model Context Protocol

从你的 AI 智能体生成植被

将 FoliMesh 接入 Claude、Cursor 或任何 MCP 客户端。智能体负责列出物种、挑选参数并下载现成的 GLB 模型,你继续写代码。

3 步快速开始

  1. 01
    包含 MCP 的套餐

    MCP 包含在 Indie、Pro 和 Studio 中。免费套餐和下载包不包含 MCP。

  2. 02
    API 密钥

    账户 → “API 密钥与 MCP” → 创建密钥。密钥只显示一次,请立即保存到客户端设置中。

  3. 03
    连接你的智能体

    在客户端中添加服务器地址和密钥(见下方示例),然后直接说:“把一个橡树 GLB 下载到 assets 文件夹”。

连接你的智能体

所有客户端使用同一个地址;密钥放在 Authorization 请求头中。在示例中,把 fm_live_… 替换为你的密钥。

Endpoint
https://folimesh.com/api/mcp

Streamable HTTP · JSON-RPC 2.0

身份验证
Authorization: Bearer fm_live_…

在账户中创建 API 密钥,并作为 Bearer 令牌传递。所有套餐(Indie、Pro 和 Studio)都包含 MCP 访问。

Claude Code(终端)
claude mcp add --transport http folimesh https://folimesh.com/api/mcp \
  --header "Authorization: Bearer fm_live_…"
Cursor

~/.cursor/mcp.json(所有项目)或项目中的 .cursor/mcp.json

{
  "mcpServers": {
    "folimesh": {
      "url": "https://folimesh.com/api/mcp",
      "headers": {
        "Authorization": "Bearer fm_live_…"
      }
    }
  }
}
VS Code(GitHub Copilot)

项目中的 .vscode/mcp.json

{
  "servers": {
    "folimesh": {
      "type": "http",
      "url": "https://folimesh.com/api/mcp",
      "headers": {
        "Authorization": "Bearer fm_live_…"
      }
    }
  }
}
Claude Desktop

Settings → Developer → Edit Config。需要 Node.js:mcp-remote 桥接会把你的密钥传给服务器。

{
  "mcpServers": {
    "folimesh": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://folimesh.com/api/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer fm_live_…"
      }
    }
  }
}
其他客户端

任何支持 Streamable HTTP 的客户端都可以使用:地址为 https://folimesh.com/api/mcp,请求头为 Authorization: Bearer <密钥>。服务器以 JSON 响应,不使用会话或事件流(无需 GET)。

命令

你的智能体会自动调用这些命令,只需用日常语言提出请求即可。“费用”列显示从余额中扣除的下载次数。

命令作用参数费用
list_species列出所有物种——树木、棕榈、仙人掌、灌木、草本、岩石、洞穴、珊瑚等——及其 slug 和分类。category — 可选:trees, palms, cacti, bushes, ground, rocks…免费
describe_params某物种的全部生成器参数:分枝层级、树冠、叶片、树皮,以及每个 LOD 的三角面预算。species — 物种 slug,例如 oak免费
get_stats在服务器上构建模型,并返回各 LOD 的三角面数、高度和构建时间。便于选择符合多边形预算的变体。species; seed — 变体编号; age — 年龄(年); style — real 或 lowpoly免费
export_glb构建完整的 GLB——所有 LOD、照片纹理、风力、碰撞体——并返回一个 24 小时内有效的下载链接。相同的物种、变体、年龄和风格再次导出是免费的。species; seed; age; style; lod — 仅单一层级1 次下载
get_balance剩余下载次数和 AI 积分、你的套餐,以及当前是否连接了编辑器标签页。—免费

编辑器命令

在网站上打开 FoliMesh 编辑器时,你的智能体会直接在你的工作区中工作:创建对象、套件和生物群系,修改参数,雕刻枝干,拍摄快照,并请求下载。每次更改都会以智能体的名称显示在编辑器历史记录中。

描述以智能体看到的形式(英文)提供。凡是消耗下载次数的操作,除非符合密钥的每日额度,否则都需要你在编辑器中确认。

工作区 · 1
命令作用参数
rename_workspaceRename the workspace.name
对象、套件和生物群系 · 34
命令作用参数
set_roleGive an object inside a set its role: large trees, undergrowth, shrubs, ground cover, rocks, details (by default — by the object kind). Roles group the set and its scene rows.node; object; role
set_variantsVariants per object in a set: every object gets count shapes in total — itself plus count−1 variants with other seeds (made and removed by the set; own variants stay). Each object with its variants is one download.node; count
set_layoutHow a set stands on the scene: quality (best — the highest detail of every object, for screenshots; own — as set on the objects), ground (scene or grass), formation (rows by role, grid, line, circle, grove), gap between objects in metres, compact (how much of its width an object takes: 1 — crowns do not overlap).node; quality; ground; formation; gap; compact
set_params_manyChange module parameters of a group of selected nodes at once as one step: objects and variants directly, folders and containers with everything inside. Keys are "module:path" of the modules style, season, state, age, lod; value null returns each to its preset value.nodes; patch
apply_style_toGive one visual style to every object inside a set, folder or other container (realism returns each to the style of its preset). Variants follow their objects.node; style
set_params_allChange module parameters of every object inside a set, folder or other container at once (a group edit), e.g. {"style:value": "minecraft", "style:mcPalette": "autumn"} turns all of them into Minecraft blocks. Keys are "module:path" of the modules style, season, state, age; value null returns each object to its preset value. Variants follow their objects. The set remembers the values (shown in its panel).node; patch
apply_texture_toPut one texture (bark or leaves) on every object inside a set, folder or other container, or only on objects of one preset (species). ref is a texture reference: "user:<id>" for an uploaded or AI-generated texture, a catalog key, or "" for the procedural pattern; null-like reset is not supported — use set_params per object.node; kind; ref; preset
update_from_my_presetReplace the contents of a container placed from the user’s preset with the latest version of that preset (name and place stay). Own edits made in this copy are replaced.node
update_versionsMove an object to the current versions: listed modules only, or everything (core, preset, all modules) when modules is omitted. May change the look; nothing updates by itself.node; modules
fill_biomeAdd the objects of a ready biome (taiga, deciduous, tropics, desert, swamp, savanna) into a biome, each with its placement rules.node; starter
set_biomeChange the plot of a biome: side, m; overall density; hill height, m; placement seed (new seed — shuffle).node; size; density; relief; seed
set_layerChange the placement rules of one object (layer) inside a biome: kind (tree / under / ground / rock), density per 100 m² where the site fits fully, spacing at scale 1, clumping 0–1 and group size, patches, max slope, height range, moisture preference (−1 ridges … 1 wet lowlands), slope side (−1 sunny south … 1 shady north), canopy shade (−1 light … 1 under crowns), avoid trunks, scale range, size distribution, variants, on.node; object; patch
set_seedSet the seed of an object or variant — another shape of the same recipe (a variant without its own seed keeps the shape of its base).node; seed
set_preview_lodChoose which level of detail the editor preview shows (does not change the export).node; lod
set_paramsChange module parameters of an object or variant. Keys are "module:path" (e.g. "trunk:length", "branches:levels.1.length", "bark:adjust.hue"); value null returns the preset value (for a variant — the value of its base). See describe_object for modules and paths.node; patch
toggle_moduleTurn a module of an object on or off (e.g. no roots, no foliage).node; module; on
reset_moduleReturn all parameters of one module of an object to the preset (of a variant — to its base).node; module
branch_cutCut a branch at a share of its length (t = 0 removes the whole branch with everything growing on it). The cut keeps its thickness and gets a flat end; leaves beyond it go.node; axis; level; tip; t
branches_cutCut many branches in one step — like a scissors stroke across the crown (one edit, one history entry; a dense crown may give hundreds of cuts). Each cut is a branch and a share of its length (t = 0 removes the branch).node; cuts
branches_clearStart a tree from scratch: all branches go, only the trunk stays (the trunk settings still apply). Then draw branches with branch_grow: from the trunk — level 1, from a level-1 branch — level 2, and so on; leaves grow on them like on the species.node
branch_bendBend a branch: the point at share t moves by d (in tree heights), everything beyond follows, towards the base the bend fades over soft (share of the branch length). copies — the same bend on mirror / radial twin branches, in one step.node; axis; level; tip; t; d; soft; copies
branch_stretchMake a branch longer or shorter (length × k, same shape); what grows on it moves along. copies — the same on mirror / radial twin branches, in one step.node; axis; level; tip; k; copies
branch_thickenMake a branch and everything growing on it thicker or thinner (radius × k). copies — the same on mirror / radial twin branches, in one step.node; axis; level; tip; k; copies
branch_growGrow a new branch out of a branch at share t along a path (points in tree heights; the first point snaps to the parent). The new branch is one level deeper than its parent; its thickness follows branches of that level (vessel scheme: the parent below grows by its section). Leaves grow on it.node; axis; level; tip; t; path; radius; stem; leaves; taper; copies
leaves_brushFoliage brush: denser (amount > 0, up to 3 — copies of leaf clusters next to the existing ones) or sparser (amount < 0, −1 — no clusters under the brush centre) along a stroke. Points and radius are in tree heights.node; points; radius; amount
blocks_brushMinecraft "Blocks" brush (object in the minecraft style): put blocks along a stroke — balls of radius blocks around each point, or a wall (columns from each point up by wall blocks) — or erase them. Draw rocks, ridges, cliffs, walls and other structures on and around the object; the grid grows to fit (up to 256 blocks per side). Points are in metres (y up, ground at 0).node; points; radius; erase; paint; block; wall
minecraft_styleTurn an object into Minecraft blocks (the "Minecraft" style) and set its block options in one step: block wood (auto — by the bark and leaf colour), palette (natural, autumn — wool leaves, snowy — snow on top, dead — no leaves, fantasy — cherry and azalea leaves, mushroom — stem and red cap), leaf density 0.2..1, thin branches (log, fence, none), blocks per metre. Rocks, mushrooms, grass and flowers become stone, mushroom and plant blocks. Export with export_objects format "minecraft" (.schem, .nbt, datapack).node; wood; palette; leafDensity; thin; blocksPerMeter
fruit_brushPut fruit on branches under a brush stroke: count fruits (default 3) at each stroke centre, on branches within the radius. Uses the species' own fruit, berries, cones or flowers; a tree without them gets red fruit. Points and radius are in tree heights.node; points; radius; count
surface_brushSculpt a rock or cliff surface (stones only). Points, radius and amount are in object heights (y up, base at 0); n is the surface normal under the brush (outward). Tools: raise / lower — bump up or dent along n by amount (height) under a stroke; smooth / sharpen — strength amount (0–1); flatten — level to the plane through the first point with normal n, strength amount; erode — weathering pits and rounded edges, strength amount; chip — a flat chip at points[0], radius = its size, amount = depth; crack — a groove along the points path, radius = half-width, amount = depth; slice — cut away everything outside the plane through points[0] with outward normal n.node; tool; points; n; radius; amount
fit_budgetMake objects fit a triangle budget: the core lowers the costliest settings in a fixed order (LOD0 detail cap, leaf density, branch-card density, number of the finest branches, one branching level less) until LOD0 has at most `target` triangles; far levels then get their share of the target (as in the LOD settings) and their budgets are lowered when over it; applies the changes as one undo step. Without `node` — every object of the workspace; without `target` — the LOD0 budget of the workspace platform. Returns triangles before/after per object and whether it fits.node; target
set_editSwitch one sculpting edit (or a whole scissors stroke by its group id) off or back on (the edit stays in the list).node; edit; on
delete_editDelete one sculpting edit (or a whole scissors stroke by its group id) from the list.node; edit
apply_module_presetTake one module of an object from another preset ("bark — as birch, branches — as willow"). Replaces all settings of this module; earlier edits of it are dropped, on/off stays. reset_module returns the object own preset.node; module; from
apply_level_presetMake one level (branches, thickness) of an object like a level of another preset ("level 2 — as willow"). from_level omitted — the same level number (the last one if the preset has fewer). Earlier edits of this level are dropped.node; module; level; from; from_level
树形与雕刻 · 24
命令作用参数
create_linkCreate a live link to an object or container (in this or another workspace) — no copy; it follows the original. Counted once in exports.target; target_workspace; name; parent; index
unlinkTurn a link into an independent copy of its original (it stops following the original).node
pasteInsert a node from this or another workspace: mode "copy" — independent copy with everything inside; mode "link" — live link to the original.source; source_workspace; mode; parent; index
move_nodesMove several nodes into a folder or container (or to the root) as one step; nodes inside another moved node travel with it. Variants stay under their base.nodes; parent; index
trash_nodesMove several nodes to the workspace trash as one step (restorable one by one with restore).nodes
save_my_presetSave an object (with its variants) or a container (biome, set, cave, islands) with everything inside — objects with variants, layers and placement rules, style — into the user’s Library as an own preset. A node that came from an own preset (or was saved before) becomes a new version of it unless as_new; one that came from a bought pack is saved as a new own preset. Copies already placed elsewhere do not change until updated with update_from_my_preset.node; name; description; tags; thumbnail; as_new
add_my_presetPut a copy of a Library preset (object, biome, set, cave, islands — own or from a bought pack) into the workspace — independent, remembers the preset version.preset; parent; index
edit_my_presetRename the user’s own preset or change its description, tags, thumbnail (contents and version stay).preset; name; description; tags; thumbnail
delete_my_presetDelete the user’s own preset from the library. Copies already placed in workspaces stay as they are.preset
create_folderCreate a folder in the workspace tree.name; parent; index
create_containerCreate a container — a folder-like object with its own settings: set, biome, cave, islands (map is in development).kind; name; parent; index
convert_nodeTurn a folder into a container (set, biome, cave, islands) or a container back into a folder (README §3.2). Everything inside stays; a container turned into a folder loses its own settings (biome rules, cave shape and sculpt edits, set roles) — undo brings them back.node; to
create_biomeCreate a biome — a container whose objects are placed over a plot by rules (layers: trees, undergrowth, ground cover, rocks). starter fills it with a ready biome (taiga, deciduous, tropics, desert, swamp, savanna); without it the biome is empty — move or create objects inside, each object is a layer.starter; name; parent; index
create_objectCreate an object from a preset (list_presets). Seed picks the shape variant.preset; name; seed; parent; index
renameRename a folder, container or object.node; name
moveMove a node into a folder or container (or to the root) at a position.node; parent; index
duplicateCopy a node with everything inside; the copy goes right after the original.node
trashMove a node to the workspace trash (restorable with restore).node
restoreReturn a node from the trash to its old place (or to the root if that folder is gone).node
empty_trashDelete everything in the trash permanently. Ask the user first.—
create_variantCreate a variant of an object: it keeps only its differences (patch "module:path" → value, e.g. {"state:value": "felled"}); later edits of the object reach it, except fields it changed itself. Variants always sit side by side under their object (no variant of a variant): given a variant, the new one is its copy next to it — the same differences plus patch. Without seed it keeps the shape.node; name; patch; seed
varyVariation of the same object (owner 1.11): keeps every choice (modules on/off, bonsai, roots of another species, style, textures) and changes only shape numbers a little — sizes, trunk and root curvature, branches, age, foliage — by ± amount (default 0.15), plus the branch layout. One number (seed, like a world seed) gives exactly the same variation again. On an object or with new=true — a new variant next to it; on a variant — that variant is re-rolled (its manual edits of shape numbers are replaced). Returns the variant id and the seed.node; seed; amount; new; inPlace; name
create_growth_stagesGrowth stages of a tree for games in one step: variants of the object at stage ages (sapling, bush, young; optionally ancient) — the object itself is the mature tree. Stages that already exist as variants of it are skipped. names — display names per stage id.node; stages; names
create_breakableBreakable tree for games: two variants of an object — the stump and the top — that meet at one break point at stump height. The engine shows the whole tree and on a hit swaps it for the two parts and drops the top.node; names
外观与检查 · 17
命令作用参数
get_workspaceWorkspace tree (folders, containers, objects with ids), settings and trash.—
check_workspaceValidate the workspace document against the schema; returns a list of problems (empty — all good).—
list_my_presetsThe user’s Library: own presets (saved objects, biomes, sets, caves, islands) and recipes from bought packs (origin "shop", with the pack): name, description, tags, version, number of objects; thumbnails only when asked.kind; origin; thumbnails
module_updatesWhich core, preset and module versions of an object are older than the current ones (an update may change its look; compare before updating).node
create_snapshotFreeze the selection for export: copies of recipes with pinned versions, platform, engine and format, plus a hash per object (decides what is already paid). Same content → same snapshot id. Does not charge anything.selection; format
describe_objectRecipe of an object or variant (preset, seed, changed parameters; for a variant — with its base, plus its own differences in "variant") and the modules with their parameter paths for set_params.node
list_modulesIds of the core modules an object is built from (trunk, branches, bark, fill…).—
list_presetsIds of object presets for create_object.—
list_module_presetsPresets that have this module (e.g. bark of birch, branches of willow) — for apply_module_preset and apply_level_preset. Catalog objects first, by section order; presets with identical module settings are listed once. levels — number of levels in that module (0 — none).module
render_viewPNG snapshot of an object or variant to see what you are editing: the current editor camera or a side (front, back, left, right, top, three-quarter). overlay "branches" draws branch axes (highlight — one axis id in green) to find axis ids for branch_* commands; "grid" — a grid in object heights to aim surface_brush points. Needs the open editor (live); a server render comes later.node; view; size; lod; overlay; highlight
list_workspacesWorkspaces of the user (id, name, whether it is the one open now). Commands work on the open workspace.—
open_linkA link the user can open to watch you work in this workspace.—
quote_exportPrice of exporting the selection, before asking: new / changed / already paid (free) objects, total downloads and the balance. Does not charge.selection; format
request_exportAsk the user to download the selection: the user sees what, the format and the price, and confirms or declines in their own interface (or the key has a daily allowance). Returns a request id; poll export_status, then get_download.selection; format
export_statusStatus of an export request: waiting (for the user), declined, expired, building (progress), ready, failed.request
get_downloadDownload link of a ready export (only after the user confirmed and the build finished).request
list_editsHand sculpting edits of an object or variant, in the order they apply.node
设置 · 3
命令作用参数
set_settingsChange workspace settings: visual style, platform (budgets), engine (export target), brief for AI.style; platform; engine; brief
apply_platformApply the workspace platform budgets (polygon profile and number of LODs) to every object of the workspace. New objects get them automatically; this updates the existing ones. Variants follow their objects.—
apply_styleApply the workspace visual style to every object of the workspace (realism returns each object to the style of its preset). New objects get it automatically. Variants follow their objects.—

你可以这样问

用日常语言和智能体对话,它会自己选择命令。

  • “列出棕榈树,并把椰子棕榈下载到 assets/trees”
  • “生成三棵不同的橡树(变体 1、2 和 3)并放进项目里”
  • “找一棵 LOD0 少于 20,000 个三角面的白桦并下载”
  • “为手游下载一棵低多边形云杉”
  • “把一棵老橡树和两棵桦树变体添加到我打开的工作区,并给我看一张快照”
  • “我还剩多少次下载?”

模型在哪里生成

编辑器打开时

网站上的编辑器已打开——智能体会在你的工作区中,通过下方的编辑器命令工作:任何风格、套件、生物群系、雕刻以及各种引擎格式。文件在 FoliMesh 服务器上生成,并从你的余额中扣费。

登录并打开编辑器——智能体会自动连接。徽章会显示智能体何时在工作;你可以在那里暂停或断开它。

在 FoliMesh 服务器上

编辑器已关闭——export_glb 可在 FoliMesh 服务器上几秒内生成单一物种(写实和 Low-poly 风格)。

export_glb 没有手绘风格、奇幻变体、套件或生物群系——这些请打开编辑器,使用编辑器命令。

用日常语言提出需求:快速生成单棵树时,智能体使用 export_glb;其他一切则使用编辑器命令。

文件内容

GLB 2.0。各细节层级是独立节点,命名为 <物种>_s<变体>_LOD<n>_bark|leaves;树皮和叶片的照片纹理带法线贴图;风力位于 TEXCOORD_1/2;树冠明暗位于顶点颜色中;LOD 距离和简单碰撞体(胶囊体和盒体)位于 extras 中。可在 Unity、Unreal、Godot、Blender 及任何 glTF 引擎中打开。

套餐与限制

下载次数与编辑器使用同一余额。限制仅用于防止滥用,不会妨碍正常工作。

IndieProStudio
API 密钥21050
每分钟 MCP 调用次数60120300
每分钟 GLB 构建次数4820
编辑器未打开时的构建是是是
服务器队列优先级——是

年付套餐的限制相同。取消的订阅会一直有效,直至已付费期限结束。

常见问题

智能体提示“Invalid API key”

请检查密钥是否完整复制(fm_live_ 加 48 个字符),并确认你的 Indie、Pro 或 Studio 订阅有效。取消的订阅会一直有效,直至已付费期限结束。

“没有剩余下载次数”

你的下载次数已用完——请在价格页面购买下载包充值。重复生成同一模型是免费的。

构建很慢或出现“timed out”

服务器上第一个模型需要 5–10 秒(服务器需要唤醒),之后的模型需要 2–5 秒。编辑器命令需要网站上的编辑器处于打开状态,否则智能体会收到“editor_closed”。

我可以在商业游戏中使用这些模型吗?

可以:付费套餐的模型适用 FoliMesh 商业许可——与从编辑器下载的模型相同。

如何撤销密钥?

账户 → “API 密钥与 MCP” → 删除密钥。使用该密钥的智能体会立即停止工作。

把密钥交给智能体安全吗?

密钥只能解锁 MCP 命令:浏览物种、统计多边形数、在已打开的编辑器中工作,以及从你的余额下载模型。它无法付款、修改账户或查看个人数据。请把密钥保存在客户端设置中,不要放在项目代码里。