Skip to main content
Glama
README.md
# GameDev MCP Server

[![CI](https://github.com/sbenson2/gamedev-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/sbenson2/gamedev-mcp-server/actions/workflows/ci.yml)
[![CodeQL](https://github.com/sbenson2/gamedev-mcp-server/actions/workflows/codeql.yml/badge.svg)](https://github.com/sbenson2/gamedev-mcp-server/actions/workflows/codeql.yml)
[![npm version](https://img.shields.io/npm/v/gamedev-mcp-server)](https://www.npmjs.com/package/gamedev-mcp-server)
[![npm downloads](https://img.shields.io/npm/dm/gamedev-mcp-server)](https://www.npmjs.com/package/gamedev-mcp-server)
[![Node.js](https://img.shields.io/node/v/gamedev-mcp-server)](https://nodejs.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Your AI forgets everything mid-project. Give it permanent game development knowledge.**

GameDev MCP Server is a knowledge layer for AI coding assistants. It provides 140+ curated game development docs โ€” design patterns, architecture guides, engine-specific implementation details โ€” delivered through [MCP](https://modelcontextprotocol.io) so your AI assistant never loses context on how to build games.

> Works with **Claude Code**, **Claude Desktop**, **Cursor**, **Windsurf**, **Cline**, and any MCP-compatible tool.

## The Problem

Every game dev using AI hits the same wall: your assistant starts strong, then forgets your architecture mid-session. It suggests deprecated APIs. It doesn't know the difference between a state machine and a behavior tree. It writes Unity 5 code when you're on Unity 6.

**GameDev MCP Server solves this** by giving your AI a persistent, searchable knowledge base of curated game dev expertise โ€” not raw docs, but structured implementation guidance that actually helps you build.

## What's Inside

| Category | Examples | Docs |
|----------|----------|------|
| ๐ŸŽฎ **Game Design** | Genre systems, game feel, balancing, progression | 12 |
| ๐Ÿ—๏ธ **Architecture** | ECS, state machines, scene management, signals | 18 |
| ๐Ÿ’ป **Programming** | Design patterns, data structures, algorithms | 15 |
| ๐ŸŽฏ **Engine Guides** | MonoGame (78 guides), Godot (11 docs), Unity (planned) | 89+ |
| ๐Ÿ”ง **Core Concepts** | Camera, physics, pathfinding, networking, combat, particles, UI | 19 |
| ๐Ÿ“‹ **Project Mgmt** | Scope control, sprint planning, art pipeline | 7 |

**140+ docs. 4MB+ of curated knowledge. Zero external dependencies.**

## Quick Start

```bash
npx gamedev-mcp-server
```

That's it. No install required. Add it to your MCP config and your AI has instant game dev knowledge.

### Claude Code

```bash
claude mcp add gamedev -- npx -y gamedev-mcp-server
```

### Claude Desktop / Cursor / Windsurf / Cline

Add to your MCP config file:

```json
{
  "mcpServers": {
    "gamedev": {
      "command": "npx",
      "args": ["-y", "gamedev-mcp-server"]
    }
  }
}
```

Config file locations:
- **Claude Desktop:** `claude_desktop_config.json`
- **Cursor:** `.cursor/mcp.json`
- **Windsurf:** `~/.windsurf/mcp.json`
- **Cline:** VS Code settings โ†’ Cline MCP Servers

## Engine Modules

GameDev MCP Server uses a modular architecture. Core knowledge (design, patterns, algorithms) is always available. Engine-specific modules add implementation guides for your stack.

| Module | Status | Docs | Description |
|--------|--------|------|-------------|
| `core` | โœ… Stable | 52 | Engine-agnostic game dev knowledge |
| `monogame-arch` | โœ… Stable | 78 | MonoGame + Arch ECS โ€” guides G1โ€“G69, architecture, library reference |
| `godot-arch` | ๐Ÿšง Active | 11 | Godot 4.4+ โ€” architecture, GDScript/C#, scene composition, state machines, signals, input, physics, camera, tilemaps, animation |
| `unity-arch` | ๐Ÿ“‹ Planned | โ€” | Unity 6 โ€” URP, ECS, modern patterns |
| `bevy-arch` | ๐Ÿ“‹ Planned | โ€” | Bevy ECS โ€” Rust game dev |

Modules are auto-discovered. To filter which modules load:

```json
{
  "env": {
    "GAMEDEV_MODULES": "monogame-arch,godot-arch"
  }
}
```

Without `GAMEDEV_MODULES`, all available modules load automatically.

## MCP Tools

| Tool | Description |
|------|-------------|
| Tool | Description |
|------|-------------|
| **`search_docs`** | Full-text search across all docs with TF-IDF ranking, category/module/engine filters, cross-engine grouping |
| **`get_doc`** | Fetch a doc by ID with optional `section` extraction and `maxLength` for context efficiency |
| **`list_docs`** | Browse docs by category and module, with compact `summary` mode |
| **`list_modules`** | Discover available engine modules and their status |
| **`compare_engines`** | Compare how different engines approach the same topic (e.g., camera, physics, input) |
| **`random_doc`** | Discover docs serendipitously โ€” great for exploration and learning |
| **`genre_lookup`** | Genre โ†’ required systems mapping (platformer, roguelike, tower defense, etc.) |
| **`session`** | Dev session co-pilot โ€” structured workflows for planning, debugging, scoping |
| **`license_info`** | Show current tier and features |

### Context-Efficient by Design

Unlike tool-heavy MCP servers that dump 50K+ tokens of schemas into your context window, GameDev MCP Server is built for precision:

- **Section extraction** โ€” `get_doc("G64", section: "Knockback")` returns just the knockback section, not the full 52KB doc
- **`maxLength` param** โ€” Cap any response to fit your context budget
- **9 focused tools** โ€” Minimal schema overhead, maximum utility. Compare to Godot MCP servers with 95+ tools burning half your context on schema alone
- **stdio transport** โ€” No network exposure, no attack surface ([MCP security is a real concern](https://www.bleepingcomputer.com/news/security/over-7-000-exposed-mcp-servers-reveal-widespread-security-risks/))

## Free vs Pro

The server works fully out of the box with a generous free tier.

| Feature | Free | Pro |
|---------|------|-----|
| Core docs (design, patterns, algorithms) | โœ… | โœ… |
| Search | Core docs | All modules |
| Engine modules (MonoGame, Godot, etc.) | โ€” | โœ… |
| Session co-pilot | โ€” | โœ… |
| Genre lookup | Summary | Full details |
| `get_doc` section extraction | โœ… | โœ… |

**Pro** unlocks engine-specific implementation guides โ€” the stuff that turns "I know game design theory" into "here's exactly how to build it in Godot/MonoGame/Unity."

Get a Pro license โ†’ [gamedev-mcp.lemonsqueezy.com](https://gamedev-mcp.lemonsqueezy.com)

### License Setup

Add your key to the MCP config:

```json
{
  "env": {
    "GAMEDEV_MCP_LICENSE": "your-license-key"
  }
}
```

Or create `~/.gamedev-mcp/license.json`:

```json
{ "key": "your-license-key" }
```

The server validates on startup, caches for 24h, and gracefully falls back to free tier if anything goes wrong. It never crashes.

## What Makes This Different

There are [14,000+ MCP servers](https://mcp.so) out there. Here's why this one matters for game dev:

- **Knowledge, not integration.** Godot-MCP, Unity-MCP, and Unreal-MCP give your AI buttons to press in the editor. This gives your AI *understanding* of how to architect and build games. They're complementary โ€” use both.
- **Cross-engine.** One server, multiple engines. Learn a pattern once in core theory, then get the engine-specific implementation. `compare_engines("camera")` shows you how Godot and MonoGame each handle it. No need to install separate MCPs per engine.
- **Curated, not scraped.** Every doc is hand-written with AI code generation in mind โ€” typed examples, anti-pattern warnings, decision trees, and "when to use" guidance. This isn't a docs mirror.
- **Secure by design.** stdio-only transport โ€” no network exposure, no open ports, no attack surface. While [7,000+ MCP servers sit exposed on the internet](https://www.bleepingcomputer.com/news/security/over-7-000-exposed-mcp-servers-reveal-widespread-security-risks/), this runs entirely local.
- **Grows with you.** New docs and engines added continuously. Your AI gets smarter over time without you changing anything.

## Genre Coverage

The `genre_lookup` tool maps any genre to its required systems with implementation priorities:

Platformer ยท Metroidvania ยท Roguelike ยท Tower Defense ยท Survival ยท RPG ยท Bullet Hell ยท Top-Down Shooter ยท Side-Scrolling ยท Fighting ยท Puzzle

Each genre profile includes: required systems, optional enhancements, suggested doc reading order, and a starter checklist.

## Development

```bash
git clone https://github.com/sbenson2/gamedev-mcp-server.git
cd gamedev-mcp-server
npm install
npm run build
npm test          # 187 tests, Node.js built-in test runner
npm run dev       # Watch mode
```

### Dev Mode

Skip license validation for local development:

```json
{
  "env": {
    "GAMEDEV_MCP_DEV": "true"
  }
}
```

## Doc Structure

```
docs/
โ”œโ”€โ”€ core/                    # Engine-agnostic (always loaded)
โ”‚   โ”œโ”€โ”€ game-design/         # Genre profiles, game feel, balancing
โ”‚   โ”œโ”€โ”€ programming/         # Patterns, principles, data structures
โ”‚   โ”œโ”€โ”€ concepts/            # Camera, physics, pathfinding, networking, particles
โ”‚   โ”œโ”€โ”€ project-management/  # Scope, sprints, pipelines
โ”‚   โ”œโ”€โ”€ ai-workflow/         # AI code generation best practices
โ”‚   โ””โ”€โ”€ session/             # Co-pilot workflow prompts
โ”œโ”€โ”€ monogame-arch/           # MonoGame + Arch ECS
โ”‚   โ”œโ”€โ”€ architecture/        # ECS overview, migration notes
โ”‚   โ”œโ”€โ”€ guides/              # G1โ€“G69 implementation guides
โ”‚   โ””โ”€โ”€ reference/           # Library stack, project structure
โ””โ”€โ”€ godot-arch/              # Godot 4.4+
    โ”œโ”€โ”€ architecture/        # Node tree philosophy, GDScript vs C# decision guide
    โ”œโ”€โ”€ guides/              # Scene composition, state machines, signals, input, physics, camera, tilemaps, animation
    โ””โ”€โ”€ reference/           # (coming soon)
```

## MCP Resources

Docs are also available as MCP resources for clients that support them:

- `gamedev://docs/{module}/{id}` โ€” Any doc by module and ID
- `gamedev://prompts/session` โ€” Session co-pilot prompt
- `gamedev://prompts/code-rules` โ€” AI code generation rules

## Contributing

Found a bug? Have a doc suggestion? [Open an issue](https://github.com/sbenson2/gamedev-mcp-server/issues).

## License

MIT โ€” see [LICENSE](./LICENSE).

---

**Built for game devs who use AI.** Stop fighting context loss. Start building.