Game OCP MCP
Updates GitHub pull request comments with evaluation reports and CI results, enabling PR-ready Markdown reports.
Integrates with GitHub Actions through CI workflows that build the project, run balance, localization, Unity Guard, and skill-eval checks, and update a PR comment with results.
Provides Unity Guard static analysis for Unity C# runtime code, detecting per-frame GC triggers, LINQ usage, component lookups, scene searches, and unsafe public Inspector fields.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Game OCP MCPCan you check the balance of level_3.json?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Game OCP MCP
A local-first control room for AI-assisted game production
Game OCP MCP is not one narrow validator. It is a practical toolkit for validating game content, protecting Unity runtime code, observing local AI-agent workloads, and proving prompt improvements with deterministic evals—without requiring a paid model API.
English
Why it exists
AI agents can accelerate game production, but they can also invent malformed level data, omit localization keys, introduce frame-loop allocations, leave background processes running, or claim a prompt is “better” without evidence. Game OCP MCP places deterministic checks at those hand-off points.
It is designed for a solo developer’s laptop, a shared Mac mini, or a Linux VM: run the tools locally, expose the content checks to an MCP client, inspect results in a browser, and enforce the same rules in GitHub Actions.
One system, five safety layers
flowchart LR
agent[AI agent or game team] --> content[Game content\nlevels · locales · generated copy]
agent --> unity[Unity C# changes]
agent --> processes[Local agent processes\nand logs]
agent --> prompts[Skill / system-prompt changes]
content --> mcp[Game OCP MCP\nBalance · Localization · Agent Evals]
unity --> guard[Unity Guard\nstatic runtime rules]
processes --> monitor[Agent Monitor\nresources · watchdog · log audit]
prompts --> evals[Skill Eval CI\nfixtures · assertions · delta]
mcp --> dashboard[Local web dashboard]
guard --> dashboard
monitor --> dashboard
evals --> github[GitHub PR report]Toolkit at a glance
Surface | What it protects | What it reports | How to use it |
Balance Linter | Level-progression data | Invalid fields, zero rewards, impossible move limits, adjacent move spikes | MCP, web dashboard, direct test |
Localization Auditor | JSON locale packs | Missing keys and incompatible dynamic tokens such as | MCP, web dashboard, direct test |
Agent Eval Runner | Generated puzzle and notification content | Deterministic scenario score, passed/failed assertions, explanation | MCP and web dashboard |
Unity Guard | Unity C# runtime code | Per-frame GC triggers, LINQ, lookups, scene searches, public Inspector fields |
|
Agent Monitor | Claude, Cursor, Codex, MCP, and Python processes | PID, CPU, memory, uptime, log failure patterns, optional watchdog alarms |
|
Skill Eval CI | System prompts and agent skills | Baseline/current score, pass-rate delta, scenario deltas, PR-ready Markdown |
|
Quick start
Requirements: Node.js 20+ and npm. The process monitor supports macOS and Linux.
git clone https://github.com/imozkandev/game-ocp-mcp.git
cd game-ocp-mcp
npm ci
npm run buildRun the local verification suite:
npm test
npm run test:balance
npm run test:loc
npm run test:unity-guard
npm run test:evalTo make the packaged CLIs available in your shell:
npm linkUse the local web dashboard
The dashboard is the fastest way to explore every capability without remembering commands.
npm run webOpen http://127.0.0.1:3000. The six tabs expose balance, localization, agent evals, Unity Guard, Agent Monitor, and Skill Eval CI. Each tab explains its own checks, ships with a safe local example, and returns structured findings in the result panel.
The Settings button stores optional OpenAI and Anthropic keys only in the current browser session. The current toolkit does not send or use these keys; they are reserved for future AI-assisted workflows.
Connect the MCP server
The stdio MCP server exposes three content-validation tools to compatible AI clients:
MCP tool | Input | Purpose |
|
| Validates levels and flags progression anomalies. |
|
| Finds missing translations and dynamic-parameter mismatches. |
|
| Scores word puzzles or push notifications with deterministic assertions. |
Build first, then use an absolute path to dist/index.js.
Claude Code
claude mcp add game-OCP -- node "$(pwd)/dist/index.js"Cursor — add this to ~/.cursor/mcp.json:
{
"mcpServers": {
"game-OCP": {
"command": "node",
"args": ["/absolute/path/to/game-ocp-mcp/dist/index.js"]
}
}
}CLI workflows
Unity Guard — stop frame-loop regressions
# Demonstrates allocation, LINQ, lookup, scene-search, and public-field findings
unity-guard lint examples/BadPlayerController.cs
# Optimized reference implementation; exits 0
unity-guard lint examples/CleanPlayerController.cs
# Add the lint step to this repository's pre-commit hook
unity-guard init-hookUnity Guard searches Update, LateUpdate, and FixedUpdate blocks. It highlights string concatenation, new, LINQ usage, GetComponent, Find, and unsafe public Inspector fields with a file, line, rule name, and agent-oriented fix recommendation.
unity-guard lint examples/BadPlayerController.cs
warning BadPlayerController.cs:13 gc-string-concatenation-in-frame-loop
Avoid allocating concatenated strings every frame. Cache or update only when input changes.
warning BadPlayerController.cs:16 component-lookup-in-frame-loop
Cache GetComponent<T>() in Awake or Start and reuse the reference.Agent Monitor — see local work before it becomes invisible
agent-mon list
agent-mon watch --interval 2
agent-mon audit /path/to/agent/logsIt filters matching claude, cursor, codex, mcp, and python processes, then shows PID, CPU, memory, and uptime. The log auditor counts RateLimit, ContextWindowExceeded, and ECONNREFUSED patterns. The watchdog module can raise alarms for sustained high CPU or unavailable metrics and can optionally terminate a process only when explicitly enabled.
agent-mon · scanned 10:42:16
PID AGENT CPU MEMORY UPTIME COMMAND
42107 codex 92.4% 638.5 MB 00:12:48 codex
43188 python 14.8% 182.1 MB 01:03:12 python worker.pySkill Eval CI — prove that a skill improved
The sample word-puzzle skill has a deliberately loose v1 prompt and a constrained v2 prompt. Resolved fixtures are evaluated with JSON, schema, length, and keyword assertions. The comparator makes a prompt change reviewable instead of subjective.
# Produce a candidate result and Markdown report
node dist/cli.js run \
--dataset evals/datasets/resolved-smoke.json \
--output-json artifacts/current.json \
--output-md artifacts/current.md
# Compare it to the committed v1 baseline
node dist/cli.js compare \
--baseline evals/baselines/word-puzzle-v1.result.json \
--candidate artifacts/current.json \
--output-md artifacts/comparison.mdPass Rate: 50% -> 100% (+50%, improvement).
json-contract: 0% -> 100% (+100%)
forbidden-copy: 100% -> 100% (+0%)CI and GitHub Actions
Workflow | Trigger | What happens |
Pull requests and pushes to | Builds the project, runs Balance, Localization, Unity Guard, and Skill Eval checks, then updates one PR comment. | |
Run workflow | Runs only the skill benchmark; an optional PR number updates that PR’s Markdown report. |
No CLI is required: open the repository’s Actions tab and choose Run workflow. For terminal use, authenticate once with gh auth login, then:
gh workflow run "Studio AI Toolkit CI & Evals" --repo imozkandev/game-ocp-mcp
gh workflow run "Standalone skill eval report" --repo imozkandev/game-ocp-mcp --field pr_number=123Example PR comment:
Metric | v1 (Baseline) | v2 (Current) | Delta |
Score | 50% | 100% | +50% |
Pass rate | 50% | 100% | +50% |
Architecture
src/
├── index.ts MCP stdio server
├── tools/ balance, localization, and generated-content checks
├── engine/ Unity rules, file scanner, eval assertions, runner, comparator
├── scanner/ process and agent-log scanners
├── guard/ optional resource watchdog
├── reporters/ PR-comment Markdown renderer
├── agent-mon-cli.ts local agent-monitor CLI
├── unity-guard-cli.ts Unity static-analysis CLI
└── cli.ts skill-eval CLI
web/ six-tab local dashboard
examples/ intentionally good and bad sample data
skills/ v1 and v2 word-puzzle prompts
evals/ deterministic datasets and committed baselines
.github/workflows/ CI and manual benchmark workflowsLocal-first safety model
Content checks, Unity scans, process discovery, and log analysis run on the current machine.
The web dashboard keeps optional credentials in
sessionStorage; it does not transmit them to the local validator API.Skill evals use captured/resolved fixtures and deterministic rules, not a paid hosted model.
Process termination is off by default; the watchdog must be explicitly configured before it can call
killProcess.
Contributing
Fork the repository and create a focused branch.
Add or adjust a fixture in
examples/orevals/when changing behavior.Run
npm run buildand the relevantnpm run test:*command.Open a pull request; GitHub Actions will publish the suite outcome.
License
Related MCP server: Animal Map Vision MCP
Türkçe
Projenin amacı
Game OCP MCP, yapay zekâ ile hızlanan oyun üretim sürecinde ortaya çıkan hataları daha yayınlanmadan yakalayan, yerel öncelikli bir araç setidir. Amaç yalnızca tek bir JSON dosyasını kontrol etmek değil; içerik kalitesinden Unity performansına, ajan süreçlerinden prompt regresyonlarına kadar üretim hattının kritik noktalarını görünür ve ölçülebilir yapmaktır.
Bir ajan yanlış seviye dengesi üretebilir, çeviri anahtarını atlayabilir, Update() içine maliyetli kod ekleyebilir veya iyileştirilmiş görünen bir promptun gerçekte daha kötü sonuç vermesine neden olabilir. Bu repo, bu riskleri deterministik kurallarla denetler.
Neleri içerir?
Araç | Ne işe yarar? | Örnek çıktı |
Balance Linter | Seviye JSON’larında skor, hamle ve ödül tutarlılığını denetler. | Aşırı hamle artışı, sıfır ödül, hatalı alan |
Localization Auditor | Dil dosyalarını referans dile göre kıyaslar. | Eksik anahtar, |
Agent Eval Runner | Ajanın ürettiği bildirim veya kelime bulmacasını puanlar. | 0–100 skor, geçen/kalan kurallar |
Unity Guard | Frame loop içindeki performans risklerini yakalar. | LINQ, |
Agent Monitor | Yerelde çalışan AI ajanlarını ve log hatalarını izler. | CPU, bellek, uptime, rate-limit özeti |
Skill Eval CI | v1/v2 skill sonuçlarını kanıta dayalı kıyaslar. | Baseline/current delta, PR yorumu |
Kurulum
Node.js 20+ ve npm gerekir.
git clone https://github.com/imozkandev/game-ocp-mcp.git
cd game-ocp-mcp
npm ci
npm run buildTüm temel kontrolleri yerelde çalıştırmak için:
npm test
npm run test:balance
npm run test:loc
npm run test:unity-guard
npm run test:evalKomutları global shell kullanımı için açmak isterseniz:
npm linkWeb arayüzü
npm run webArdından http://127.0.0.1:3000 adresini açın. Altı sekmeli panel tüm araçları aynı ekranda sunar: Balance Lint, Localization Audit, Agent Evals, Unity Guard, Agent Monitor ve Skill Eval CI.
Her sekmede aracın neyi kontrol ettiği anlatılır.
examples/altındaki güvenli örneklerle hemen deneyebilirsiniz.Sonuç paneli, özet bulguları ve ham JSON çıktısını gösterir.
Settings alanındaki isteğe bağlı API anahtarları yalnızca tarayıcı oturumunda tutulur; mevcut araçlar bunları kullanmaz veya göndermez.
MCP ile Claude Code ve Cursor kullanımı
Derleme sonrasında MCP sunucusu üç aracı stdio üzerinden yayınlar: lint_level_balance, audit_localization ve run_agent_evals.
Claude Code
claude mcp add game-OCP -- node "$(pwd)/dist/index.js"Cursor — ~/.cursor/mcp.json içine ekleyin:
{
"mcpServers": {
"game-OCP": {
"command": "node",
"args": ["/absolute/path/to/game-ocp-mcp/dist/index.js"]
}
}
}Bu bağlantıdan sonra ajanınız seviye dosyasını lint edebilir, çeviri paketini denetleyebilir veya oluşturduğu içeriği kendi değerlendirmesine güvenmeden test edebilir.
Pratik kullanım örnekleri
# Kötü ve temiz Unity örnekleri
unity-guard lint examples/BadPlayerController.cs
unity-guard lint examples/CleanPlayerController.cs
# Yerel ajan süreçleri ve logları
agent-mon list
agent-mon watch --interval 2
agent-mon audit /path/to/agent/logs
# Skill eval sonuç üretimi ve v1/v2 kıyası
node dist/cli.js run --dataset evals/datasets/resolved-smoke.json --output-json artifacts/current.json
node dist/cli.js compare --baseline evals/baselines/word-puzzle-v1.result.json --candidate artifacts/current.json --output-md artifacts/comparison.mdGitHub Actions kullanımı
İş akışı | Kullanım |
Studio AI Toolkit CI & Evals |
|
Standalone skill eval report | Sadece prompt/skill benchmark’ını çalıştırır. İsteğe bağlı PR numarası verilirse Markdown raporu o PR’a yorum olarak ekler. |
GitHub arayüzünden kullanmak için repo içindeki Actions sekmesine gidin, iş akışını seçin ve Run workflow butonuna basın. Terminalden tetiklemek için bir kez gh auth login çalıştırmanız yeterlidir.
Güvenlik ve veri yaklaşımı
Araçlar varsayılan olarak yerelde çalışır.
Skill eval, ücretli bir model çağrısı yerine fixture ve kural setleri kullanır.
Watchdog varsayılan olarak yalnızca alarm üretir; süreç sonlandırma açıkça etkinleştirilmelidir.
İsteğe bağlı API anahtarları web panelinde yalnızca oturum belleğinde tutulur.
Katkı sağlama
Repoyu fork’layın ve küçük, odaklı bir branch açın.
Davranış değiştiriyorsanız
examples/veyaevals/altına uygun bir fixture ekleyin.npm run buildve ilgilinpm run test:*komutlarını çalıştırın.PR açın; birleşik CI sonucu otomatik raporlayacaktır.
Lisans
This server cannot be deployed
Maintenance
Related MCP Connectors
Deterministic validation for AI-generated artifacts: JSON Schema, OpenAPI response, SQL syntax.
Create, test and play AI-native games through server-authoritative contracts.
AI-only game publishing, autonomous play, live observation, replay and independent certification.
Preflight QA for AI-agent deliverables with structured verdicts and repair guidance.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables users to validate MCP servers, skills, extensions, and packages for schema, security, functional, and semantic quality directly from their MCP client.-
- AlicenseAqualityCmaintenanceEnables AI agents to visually inspect and validate 3D game maps using Gemini vision and built-in quality checks for geometry, navigation, ecology, and rendering.46MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to test Unity scenes and return review-ready receipts via a hosted remote MCP with tools for playmode checks and method invocation.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to create, run, and debug 2D games in a sandboxed engine, providing tools for simulation, state inspection, and quality validation.1MIT