@gripforgeai/mcp 0.1.2 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +194 -9
- package/dist/gamekit-deliver-local.js +586 -0
- package/dist/gamekit-tools.js +298 -0
- package/dist/scene-tools.js +77 -0
- package/dist/server-tools.js +143 -0
- package/dist/server.js +2218 -42
- package/dist/vfx-project-tools.js +48 -0
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -1,15 +1,50 @@
|
|
|
1
1
|
# @gripforgeai/mcp
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
MCP client. Thin client for the [GripForge](https://gripforge.ai) API.
|
|
3
|
+
The tools your AI needs to make your games.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
Thin MCP client for the [GripForge](https://gripforge.ai) API — attach, Library, kits, HUD, VFX — from Cursor, Windsurf, VS Code or any MCP client.
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
## Hosted endpoint (zero install)
|
|
8
|
+
|
|
9
|
+
No Node required — point any remote-capable MCP client at:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
https://gripforge.ai/mcp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Auth: `x-api-key: gf_...` header (or `Authorization: Bearer`). Assets are passed
|
|
16
|
+
as **URLs** (`character_url`, `prop_url`) — Tripo/Meshy download links work
|
|
17
|
+
directly.
|
|
18
|
+
|
|
19
|
+
```jsonc
|
|
20
|
+
// Cursor (.cursor/mcp.json)
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"gripforge": {
|
|
24
|
+
"url": "https://gripforge.ai/mcp",
|
|
25
|
+
"headers": { "x-api-key": "gf_..." }
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
10
29
|
```
|
|
11
30
|
|
|
12
|
-
|
|
31
|
+
## Example
|
|
32
|
+
|
|
33
|
+
> "Attach this sword to my knight, right hand, then export the armed GLB."
|
|
34
|
+
|
|
35
|
+
The agent calls `gripforge_attach` with the two asset URLs (or local paths with
|
|
36
|
+
the npm package); GripForge finds the hand bone, scales the prop to the
|
|
37
|
+
character's hand, closes the fist around the grip and returns the bind JSON,
|
|
38
|
+
ready-to-paste Three.js / Unity / Godot snippets, and optionally the armed GLB.
|
|
39
|
+
|
|
40
|
+
To forge a character **from a picture** (not from a text prompt), pass
|
|
41
|
+
`concept_item` (a Library `lib_…` T-pose/concept), or with the npm package a
|
|
42
|
+
local `path` / `file_url`. That is Meshy image-to-3D. Without those fields the
|
|
43
|
+
tool is text-to-3D only.
|
|
44
|
+
|
|
45
|
+
## Install (any MCP client)
|
|
46
|
+
|
|
47
|
+
Add the server to your client's MCP config (`.mcp.json`, `mcp.json`, settings — the shape is the same everywhere):
|
|
13
48
|
|
|
14
49
|
```json
|
|
15
50
|
{
|
|
@@ -23,7 +58,7 @@ Or in `.mcp.json`:
|
|
|
23
58
|
}
|
|
24
59
|
```
|
|
25
60
|
|
|
26
|
-
Get
|
|
61
|
+
Get an API key at https://gripforge.ai/login — Free: 15 Studio attaches + **3 API/MCP trial attaches / month**. Credit packs from €29 (100 credits, never expire).
|
|
27
62
|
|
|
28
63
|
## Install (Grok)
|
|
29
64
|
|
|
@@ -50,12 +85,162 @@ Also works with Cursor, Windsurf and any MCP-compatible client — same
|
|
|
50
85
|
|
|
51
86
|
## Tools
|
|
52
87
|
|
|
53
|
-
|
|
88
|
+
Hosted HTTP MCP (`https://gripforge.ai/mcp`) is always current. This npm package
|
|
89
|
+
writes files into the repo (`out_dir`), including `gripforge_hud`,
|
|
90
|
+
`gripforge_hud_bar` and `gripforge_cape`. Hosted-only: `gripforge_make_seamless`.
|
|
91
|
+
Full list: https://gripforge.ai/mcp-docs
|
|
92
|
+
|
|
93
|
+
- `gripforge_style_kit` — resolve "Devil May Cry like" / "genshin" to locker ids
|
|
94
|
+
already tagged with that look. **Call this before generating.** Reuse the ids.
|
|
95
|
+
- `gripforge_generate_character` — new T-pose + auto-rig into Library (10 credits).
|
|
96
|
+
`kind=enemy` or the word "enemy" in the prompt. Skip this if style_kit already
|
|
97
|
+
returned a character.
|
|
98
|
+
- `gripforge_boss` — playable boss kit (stats, phases, attacks, arena, engine snippets).
|
|
99
|
+
0 credits. Reuses a locker enemy. `generate=true` forges a new kind=enemy (10 credits).
|
|
100
|
+
Then `gripforge_animate` with the returned archetype.
|
|
101
|
+
- `gripforge_concept_correct` — concept image → strict T-pose sheet (1 credit).
|
|
102
|
+
- `gripforge_attach` — character + prop (paths or Library ids) in, bone-local bind + Three.js / Unity /
|
|
54
103
|
Godot snippets out. Styles: melee, gun, shield, staff (scythe/polearm).
|
|
55
|
-
|
|
104
|
+
`attach_id` reuses an armed bind as the character; `prop_id_2` / `prop_path_2` attaches a second
|
|
105
|
+
held item (off-hand). With `export_glb: true` (+ `out_dir`) it also writes `attached.glb`: the
|
|
56
106
|
character with the fist closed and the prop attached, textures preserved —
|
|
57
107
|
use this for mitten-hand rigs, whose closed fist cannot travel in a JSON bind.
|
|
108
|
+
- `gripforge_loadout` — multi-weapon character in one call (sets + manifest + clips). 1 credit / prop.
|
|
109
|
+
- `gripforge_generate_weapon` — Meshy weapon GLB into Library (kind=weapon, polycount, style=melee|gun). 10 credits. Not generate_character.
|
|
110
|
+
- `gripforge_hud` — survivor HUD kit (`hud.json` + PNGs + `.tscn` + snippets). Writes `out_dir` (default `./gripforge-hud`). 1 credit.
|
|
111
|
+
- `gripforge_hud_bar` — original themed health-bar frame+fill PNGs. Writes `out_dir`. 2 credits.
|
|
112
|
+
- `gripforge_cape` — cape bone grid + skinned `attached_cape.glb` + Godot/Three snippets. Writes `out_dir` (default `./gripforge-cape`). 1 credit.
|
|
58
113
|
- `gripforge_formats` — supported formats & options.
|
|
114
|
+
- `gripforge_library_list` / `get` / `push` / `pull` / `tag` — the Library locker.
|
|
115
|
+
`kind=animation|audio` is valid. `pull` writes the mesh **and VFX sidecars** (`tex0..png/json`)
|
|
116
|
+
into the open repo (`out_dir`, default `./gripforge-library`).
|
|
117
|
+
Saving a bind after attach is not a second credit.
|
|
118
|
+
- `gripforge_audio_kit` — locker SFX + music for a game look. Free.
|
|
119
|
+
- `gripforge_animate` — clip pack onto a Mixamo Library char (archetype sword/claws/heavy/brawler/puppet). 0 credits.
|
|
120
|
+
- `gripforge_retarget` — clip from skeleton A onto skeleton B.
|
|
121
|
+
- `gripforge_rest_pose` — arms-down rest computed against this mesh (weapons stay on an armed bind).
|
|
122
|
+
- `gripforge_render` — server PNG preview so the agent can see without a browser.
|
|
123
|
+
- `gripforge_scene_kit` — locker props + suggested layout for a game look.
|
|
124
|
+
- `gripforge_light_kit` / `gripforge_font` / `gripforge_navmesh` — lights+fog, webfont+ranks, walkable AABB. 0 credits.
|
|
125
|
+
- `gripforge_input_kit` — FPS InputMap (WASD + arrows). Write input.json, autoload GfInput.
|
|
126
|
+
Optional `third_person: true` adds portable character-facing JavaScript and a
|
|
127
|
+
Three.js integration example; the existing input map is unchanged. 0 credits.
|
|
128
|
+
- `gripforge_viewmodel_kit` — CS-style FPS arms + gun under Camera3D/Hold. Write viewmodel.json + gf_viewmodel.gd. 0 credits.
|
|
129
|
+
- `gripforge_loading_page` — overlay html/css/js + Godot/Unity/Unreal. Pass `character_id` for a 16:9 still (1 credit).
|
|
130
|
+
- `gripforge_level` — playable room graph from a prompt. 0 credits.
|
|
131
|
+
- `gripforge_map_plan` — top-down FPS/bomb map (spawns, sites A/B, lanes, walls). Preview: https://gripforge.ai/map-plan?prompt=dust2. 0 credits.
|
|
132
|
+
- `gripforge_map_wires` — sagging electrical spans (2 anchors + sag), not a cable mesh. Pair with map_plan. 0 credits.
|
|
133
|
+
- `gripforge_map_look` — still → camera + dressing ids (shot21a A-site). LINK only, never Meshy image-to-3d. 0 credits.
|
|
134
|
+
- `gripforge_map_reconstruct` — collect → graph → greybox → zone → camera match → dress. Dust II Valve IP: greybox benchmark only, no BSP. stage=dress = original textures + props + wires. 0 credits.
|
|
135
|
+
- `gripforge_hitbox` — body capsules + `weapons[]` from a bind or loadout.
|
|
136
|
+
- `gripforge_texture_prep` — local path or `texture_id` → seamless blend + faithful
|
|
137
|
+
lanczos upscale (1×/2×/4×, max 1024 or 2048). Writes the PNG into `out_dir` and
|
|
138
|
+
returns the Library albedo URL. Not a generator. No credit.
|
|
139
|
+
- `gripforge_vfx_generate` — use `preset` set to `slash-trail`, `slash-steel`, `slash-fire`, `slash-ice` or `slash-nature` alone for a ready-to-play recipe without AI; otherwise text/image to an editable animated VFX specification (admin keys). Accepts `prompt`, `visual_style`, and either a base64 `image_data` or an owned Library `image_id`.
|
|
140
|
+
- `gripforge_vfx` / `gripforge_vfx_preview` — save/export and sample VFX (admin keys). Pass generated `emitters` and `generation` along with the effect parameters to preserve the generated result.
|
|
141
|
+
- `gripforge_shaders` — list the authorized shader catalog (`{ id, name, engines }`). Search `q=slash_reveal`.
|
|
142
|
+
- `gripforge_shader_pull` — `id` + `engine` (`godot`|`unity`|`three`) + `out_dir` →
|
|
143
|
+
write sources into the repo and return an assignment snippet. **v1 pull is free**.
|
|
144
|
+
- `gripforge_performance` — analyze measured game FPS, frame timing, CPU/render
|
|
145
|
+
submission, optional GPU timing and network latency. Retrieve an explicitly
|
|
146
|
+
shared workspace capture or provide a report directly. 0 credits.
|
|
147
|
+
|
|
148
|
+
### Game Kits (modular)
|
|
149
|
+
|
|
150
|
+
Composable gameplay kits (`vehicle.driveable`, `mission.objectives`, `npc.wanted`…)
|
|
151
|
+
installed into a Game Kit project (`gkp_…`) with dependency resolution, a lockfile
|
|
152
|
+
and a browser play URL, then delivered into Godot, Unity or Unreal projects. All 0 credits
|
|
153
|
+
except the first delivery of a kit major version to an engine (1 credit per workspace).
|
|
154
|
+
Full parameters: https://gripforge.ai/mcp-docs
|
|
155
|
+
|
|
156
|
+
- `gripforge_gamekit_search` — **start here**: search the catalogue by text, capability, tag or target; with `project_id` each hit carries its install state.
|
|
157
|
+
- `gripforge_gamekit_get` — manifest, README, config schema + defaults, versions of one kit (`with_usage` lists the projects using it).
|
|
158
|
+
- `gripforge_gamekit_install` — add a kit to a project; manifest dependencies are resolved automatically (`dry_run` to preview).
|
|
159
|
+
- `gripforge_gamekit_remove` — uninstall a kit (`force` past `kit_in_use`, `prune` orphaned dependencies).
|
|
160
|
+
- `gripforge_gamekit_configure` — merge config values or toggle `enabled` without uninstalling.
|
|
161
|
+
- `gripforge_gamekit_dependencies` — dependency graph of a project, or the manifest tree of a catalogue kit.
|
|
162
|
+
- `gripforge_gamekit_update` — update plan (dry-run) or `apply=true` to write the lockfile and run migrations; omit `id` for all kits.
|
|
163
|
+
- `gripforge_gamekit_deliver` — plan (`dry_run`) then bundle of engine files for `godot` / `unity` / `unreal` (`web` is native); write `bundle.files` following `plan.actions`.
|
|
164
|
+
- `gripforge_gamekit_deliver_local` (this npm client only) — same delivery straight into `project_dir`: hashes `gripforge/**`, reads the lock, executes the actions with backups in `gripforge/.backup/<plan id>/`, `verify=true` runs Godot headless when `GODOT_BIN` is set.
|
|
165
|
+
- `gripforge_gamekit_rollback_local` (this npm client only) — restore the backups of the last delivery and put the previous lock back.
|
|
166
|
+
- `gripforge_game_capabilities` — what the project provides, what is missing for a goal and which kits fill each gap.
|
|
167
|
+
- `gripforge_game_project` — `action=list|create|get|bind|data|delete` on projects (bindings slot → `lib_…`, data collections, `confirm=true` to delete).
|
|
168
|
+
- `gripforge_game_play_url` — browser play URL of the project's current revision (`{ url, absolute }`).
|
|
169
|
+
|
|
170
|
+
## Character facing for third-person games
|
|
171
|
+
|
|
172
|
+
Call `gripforge_input_kit` with `{ "prompt": "third person", "third_person": true }`.
|
|
173
|
+
Save the returned `third_person.source_js` as `character-facing.js`; it exports:
|
|
174
|
+
|
|
175
|
+
```js
|
|
176
|
+
// Keep this object for the lifetime of one character.
|
|
177
|
+
const facingState = { velocity: 0, targetYaw: currentYaw };
|
|
178
|
+
updateCharacterFacing(currentYaw, {
|
|
179
|
+
moveX, moveZ, lookYaw, aiming, firing, building
|
|
180
|
+
}, dtSeconds, facingState)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Pass world-space movement with **-Z forward**, angles in radians and elapsed time
|
|
184
|
+
in seconds. Free movement turns the character toward its travel direction;
|
|
185
|
+
standing still finishes the last turn and retains that heading. Aiming, firing
|
|
186
|
+
or building turns it toward `lookYaw`. Turning follows the shortest arc with
|
|
187
|
+
bounded angular speed and acceleration, retaining continuous analog directions.
|
|
188
|
+
Elapsed time is capped at 0.1 seconds after a long pause. The optional state adds
|
|
189
|
+
smooth acceleration and braking; older three-argument calls still work with a
|
|
190
|
+
speed cap. Reset the state after a teleport or character replacement.
|
|
191
|
+
|
|
192
|
+
The returned `usage_three` rotates an outer avatar group, preserving the imported
|
|
193
|
+
model's quaternion and keeping camera control independent. This helper supplies
|
|
194
|
+
orientation only. Keep your existing movement, physics, collision, camera and
|
|
195
|
+
network systems. Omitting `third_person`, or setting it to `false`, returns the
|
|
196
|
+
existing input kit without the additional section. The option is available in
|
|
197
|
+
the hosted MCP and this source checkout; it is not in published npm `0.1.5`.
|
|
198
|
+
|
|
199
|
+
## Performance diagnostics
|
|
200
|
+
|
|
201
|
+
`gripforge_performance` is included in this source checkout and the hosted MCP.
|
|
202
|
+
The published npm `0.1.5` package does not include it. Use the hosted endpoint
|
|
203
|
+
above, or build this checkout with `pnpm --filter @gripforgeai/mcp build` and
|
|
204
|
+
configure your MCP client to run `node` with the absolute path to
|
|
205
|
+
`packages/mcp-client/dist/server.js`. Deploying the website does not update an
|
|
206
|
+
installed npm package.
|
|
207
|
+
|
|
208
|
+
To retrieve the latest capture explicitly shared from a game in the API key's
|
|
209
|
+
workspace:
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
{ "kit_id": "lib_your_kit_id" }
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Omit `kit_id` to use that workspace's latest capture. If none is available, the
|
|
216
|
+
tool asks for a capture or a report; it does not manufacture measurements.
|
|
217
|
+
Alternatively, provide copied diagnostic JSON:
|
|
218
|
+
|
|
219
|
+
```json
|
|
220
|
+
{
|
|
221
|
+
"report": {
|
|
222
|
+
"game": "Eclat Royale",
|
|
223
|
+
"viewport": { "width": 1920, "height": 1080 },
|
|
224
|
+
"samples": [
|
|
225
|
+
{ "fps": 32, "frameMs": 31.25, "p95Ms": 48, "cpuMs": 12, "submitMs": 7, "networkMs": 65 },
|
|
226
|
+
{ "fps": 34, "frameMs": 29.41, "p95Ms": 43, "cpuMs": 11, "submitMs": 6, "networkMs": 70 },
|
|
227
|
+
{ "fps": 31, "frameMs": 32.26, "p95Ms": 50, "cpuMs": 13, "submitMs": 8, "networkMs": 62 }
|
|
228
|
+
]
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
These example values illustrate the format. Supply measurements from the affected
|
|
234
|
+
game session. A report accepts 1–120 samples and each sample needs `fps` or
|
|
235
|
+
`frameMs`. Optional fields are `pixelRatio`, `quality`, `level`, `gpuMs`,
|
|
236
|
+
`drawCalls`, `triangles` and `snapshotAgeMs`, as well as the timing fields above.
|
|
237
|
+
The tool strips unrecognized report fields before sending the report to
|
|
238
|
+
GripForge. Explicit reports use analysis mode and are not saved as captures.
|
|
239
|
+
|
|
240
|
+
Results separate measured findings from recommendations. Renderer submission is
|
|
241
|
+
CPU/driver time already included in `cpuMs`; `gpuMs` is meaningful only when
|
|
242
|
+
actually measured. This tool does not control a browser, change game settings,
|
|
243
|
+
publish code or automatically fix a game.
|
|
59
244
|
|
|
60
245
|
## Env
|
|
61
246
|
|