MCP Grand Prix
MCP GPS76famous
Hmm, that doesn't seem right. Let me restart.
MCP Grand Prix
LLM이 이끄는 3D 레이싱 게임의 MVP입니다. LLM 에이전트가 공유 서킷 위에서 하이브리드 레이스 루프 — 전략 계획, 물리 시뮬레이션, 짧은 반응형 의사결정 창 — 를 통해 Formula 1 차량을 조종합니다. 그동안 브라우저 관전 클라이언트가 레이스를 실시간으로 지켜봅니다.
이 프로젝트는 LLM 에이전트에게 게임 상태와 전략 도구를 제공하는 MCP 서버입니다. Three.js 관전 대시보드와 소규모 스크립트/LLM 에이전트도 함께 포함됩니다.
아키텍처
┌────────────┐ MCP (SSE) ┌───────────────┐ tool calls ┌──────────────┐
│ LLM agents│ ────────────▶ │ src/mcp │ ◀───────────── │ RaceEngine │
│ (LLM or │ │ server.ts │ JSON-RPC │ (authoritative)
│ scripted) │ └───────────────┘ └──────┬───────┘
│ │ │ push
│ │ ┌───────────────┐ │ snapshot
│ │ │ src/server │◀─────────────┘
│ │ HTTP + WS (/ws) │ index.ts │
└────────────┘ ◀────────────────── │ spectator │
Browser spectator └───────────────┘
(Three.js, www/client.js)src/game/raceEngine.ts— 서버가 최종 권한을 가지는(server-authoritative) 게임 코어입니다. 모든 게임 상태를 소유하며 결정적(deterministic)이고 멱등적(idempotent)인 도구 메서드(startRace,submitPhaseStrategy,reactToEvent,step)를 노출합니다. 동일한 메서드는 MCP를 통해 실제 LLM과 프로세스 내부의 스크립트 에이전트 양쪽에 제공되므로, 호출하는 주체가 누구든 동작은 동일합니다.src/mcp/server.ts— 엔진의 도구를 에이전트에 노출하는 MCP(JSON-RPC/SSE) 서버입니다.src/game/raceRunner.ts— 하이브리드 레이스 루프(전략 → 시뮬레이션 → 반응형 윈도우)를 틱 단위로 구동합니다.src/server/— HTTP + WebSocket 서버와 관전 피드를 담당합니다.www/— 브라우저 관전 클라이언트(Three.js)입니다.
Related MCP server: AI Race Engineer
레이스 루프
전략 단계(Strategy Phase) — 모든 랩마다 모든 에이전트가
StrategyPacket(타이어 커파운드, 주행 모드, 연료 절약, 선택적 피트 랩)을 제출합니다.시뮬레이션 단계(Simulation Phase) — 엔진이 각 틱마다 물리 시뮬레이션을 진행합니다.
반응형 윈도우(Reactive Windows) — 근접 접전, 세이프티 카, 날씨, 타이어 마모 같은 트리거 이벤트가 랩 중반에 짧은 윈도우를 열면, 관련 에이전트들이
push/save/pit_now/attack/defend응답합니다.
빠른 시작
npm install
npm run build # prebuild copies three.js into www/lib
npm start # serves the spectator app + MCP serverhttp://localhost:3000 관전 대시보드를 열고 레이스를 시작하세요.
curl -X POST http://localhost:3000/race브라우저는 실시간 업데이트를 위해 동일한 호스트/포트로 WebSocket(/ws)에 연결합니다.
CLI에서 스크립트 레이스 실행
npm run agents # launches 4 scripted agents in a full race (demo)설정(환경 변수)
변수 | 기본값 | 설명 |
|
| HTTP + 관전 WebSocket 포트 |
|
| MCP JSON-RPC/SSE 포트 |
| — | HTTP 포트의 폴백( |
PORT는 앱이 서버리스 플랫폼과 호환되도록 사용됩니다(예: Vercel은PORT를 설정합니다).
스크립트
스크립트 | 설명 |
| TypeScript 컴파일( |
|
|
| 빌드된 서버 실행 |
| 스크립트 기반 데모 레이스 실행 |
| 유닛 테스트 실행(Vitest) |
| Playwright 엔드투엔드 스위트 실행 |
|
|
테스트
유닛 테스트(
npm test)는 실제 엔진 코어를 대상으로 레이스 엔진 공개 계약 — 라이프사이클, 전략 제출, 반응형 응답, 전체 레이스 완주 —을 검증합니다.엔드투엔드(
npm run test:e2e)는 서버를 구동하고, 레이스를 시작하며, 브라우저가 차량과 실시간 순위표를 렌더링하고, 레이스가 진행되어 우승자가 나오는 것, 그리고 반응형 윈도우 UI가 나타나는 것을 확인합니다.
MCP 도구
서버는 네 가지 MCP 도구를 제공합니다(src/mcp/server.ts 참조):
도구 | 설명 |
| 현재 레이스 상태 전체를 반환: 차량, 위치, 갭, 타이어, 연료, 랩, 이벤트. |
| 현재 전략 윈도우에 대한 특정 차량의 전략을 제출합니다(멱등). |
| 특정 차량에 대해 열린 반응형 윈도우에 응답합니다(멱등). |
| 전략 결정과 반응 액션에 대한 서버 디버그 로그입니다. |
실제 LLM 에이전트는 MCP 클라이언트(SSE)로 연결되어 이 도구들을 호출하고, 스크립트 에이전트는 엔진 메서드를 프로세스 내부에서 호출합니다. startRace는과 틱 단위 step은 레이스 러너 내부 전용이며, MCP 도구로 노출되지 않습니다.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server exposing the Backtest360 engine API as tools for AI agents.
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Trading MCP server for AI agents, with live market data, account reads and controlled execution.
Related MCP Servers
- FlicenseAqualityDmaintenanceMCP server for motorsport event documents, enabling AI agents to search, read, compare amendments, and parse schedules via typed tools.9-
- AlicenseBqualityDmaintenanceMCP server that provides F1 telemetry analysis, tyre degradation modeling, and pit strategy recommendations, delivering race engineer-style calls grounded in real data. It exposes tools for degradation fits, fuel correction, and strategy reasoning via LangGraph.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to discover trading domains, inspect bots, backtest and submit crypto trading strategies for validation and live deployment, and monitor tournament and leaderboard status via MCP tools.9MIT
- FlicenseAqualityDmaintenanceEnables LLM-powered race engineers to compute Formula 1 pit-stop strategies from real session data, including tire degradation modeling, optimal pit windows, undercut/overcut simulation, and finish-position projection.9-