Skip to main content
Glama
alphajew420

arcadey-mcp

by alphajew420
README.md
# Cool GPT Games — SDK, CLI & MCP

Official developer tooling for publishing and managing games on
[coolgptgames.com](https://coolgptgames.com). Everything here talks to the public
Arcadey API (`https://api.coolgptgames.com`) with an API key you mint from your
[dashboard → API keys](https://coolgptgames.com/dashboard/keys).

This repo contains four packages, all dependency-free (Node built-ins + `fetch`):

| Package | What it is |
|---|---|
| [`@arcadey/sdk`](packages/sdk) | Typed TypeScript client for the publishing API (create, upload, publish, track, tournaments, webhooks). |
| [`arcadey`](packages/cli) | Command-line tool — publish from your terminal or CI. |
| [`arcadey-mcp`](packages/mcp) | MCP server so Claude / agents can manage your games. |
| [`@arcadey/game-sdk`](packages/game-sdk) | Source + types for the in-game `GameSDK` bridge (already served to every game at `https://cdn.coolgptgames.com/sdk/game-sdk.js`). |

## Quickstart

Mint a key (`arc_live_…`) at **coolgptgames.com/dashboard/keys**, then:

### SDK (Node / TypeScript)

```ts
import { ArcadeyClient } from "@arcadey/sdk";

const arc = new ArcadeyClient({ apiKey: process.env.ARCADEY_API_KEY! });

const { slug, status, playUrl } = await arc.publish({
  title: "My Game",
  category: "arcade",
  files: [{ path: "index.html", content: "<html>…</html>" }],
});
```

The client defaults to the production API. Point it elsewhere with
`new ArcadeyClient({ apiKey, baseUrl })`.

### CLI

```sh
arcadey login arc_live_xxx      # saves ~/.arcadey/config.json
arcadey publish ./my-game       # zips the folder, reads my-game/game.json
arcadey status <gameId>         # status + moderation feedback
arcadey games                   # list your games
```

Set `ARCADEY_API_URL` to override the API origin.

### MCP (Claude / agents)

```sh
ARCADEY_API_KEY=arc_live_xxx arcadey-mcp
```

Register `arcadey-mcp` in your MCP client (e.g. Claude Desktop) with
`ARCADEY_API_KEY` in its environment.

### In-game SDK

Inside a game bundle, include the bridge (served from the game CDN) and call the
`GameSDK` global:

```html
<script src="https://cdn.coolgptgames.com/sdk/game-sdk.js"></script>
<script>
  GameSDK.ready();
  GameSDK.trackEvent("level_complete", { level: 3, score: 900 });
</script>
```

The [`@arcadey/game-sdk`](packages/game-sdk) package is the source of that bridge —
useful for types and reading how it works.

## Development

```sh
npm install
npm run typecheck
npm test
```

Everything runs straight from TypeScript via [`tsx`](https://tsx.is) — no build step.

## License

MIT — see [LICENSE](LICENSE).