Skip to main content
Glama
README.md
# Game Asset MCP

Free, fully offline MCP server that generates game assets as SVG — no external
API calls, no API keys, no paid services. Built on
[`mcp-handler`](https://www.npmjs.com/package/mcp-handler) + the MCP
TypeScript SDK v2, deployed on Vercel's free Hobby plan.

## Tools

| Tool | Description |
|---|---|
| `generate_creature` | Symmetric pixel-art character/monster sprite. Params: `seed?`, `gridSize?` (8\|16), `palette?`, `pixelSize?` |
| `generate_icon` | Flat vector game icon. Kinds: `coin`, `gem`, `heart`, `star`, `key`, `chest`, `sword`, `shield`, `potion`, `flag`. Params: `kind`, `color?`, `size?` |
| `generate_tile` | Seamless terrain texture tile + preview sheet. Kinds: `grass`, `stone`, `sand`, `water`, `dirt`, `snow`, `lava`, `wood`. Params: `kind`, `seed?`, `cells?`, `tilePixelSize?`, `previewGrid?` |
| `list_asset_kinds` | Lists every valid enum value for the tools above |

Every generator is a deterministic seeded PRNG (mulberry32): the same `seed`
always reproduces the exact same asset, byte-for-byte.

## Usage

```
POST/GET https://<your-deployment>.vercel.app/mcp
```

Add it to Composio as a **Custom MCP Server** using that URL — no
authentication required (no-auth).

## Local development

```sh
npm install
npm run dev      # http://localhost:3000/mcp
npm run build
npm run start
```

`scripts/smoke-test.mjs` and `scripts/render-test.mjs` exercise all 4 tools
against a running server (default `http://localhost:3300`).

## Notes for running on Vercel

- Requires Node.js 20+
- Pure CPU-bound SVG string generation, well under the default 10s function
  timeout on the Hobby plan
- Hobby plan terms restrict usage to non-commercial personal projects — a
  paid product/game needs Vercel Pro