turn-based-game-mcp
Verified Safeby github-samples
Overview
Demonstrates the Model Context Protocol (MCP) by providing a turn-based games platform with an AI opponent that interacts with a Next.js frontend.
Installation
npm run start --workspace=mcp-serverEnvironment Variables
- GAMES_DB_PATH
- WEB_API_BASE
- NODE_ENV
- VITEST
Security Notes
The project implements explicit data sanitization for MCP API endpoints (`/api/games/rock-paper-scissors/mcp`) to prevent the AI from accessing current, uncommitted player moves, which is a strong security measure against cheating. API communication defaults to `http://localhost:3000` which is safe for local development, and allows configuration via `process.env.WEB_API_BASE`. Input validation is performed for game moves. No hardcoded sensitive secrets or 'eval' statements were found. The architecture provides good separation of concerns.
Similar Servers
frontmcp
The CodeCall plugin provides AgentScript-based meta-tools for orchestrating MCP tools, enabling programmatic discovery, description, execution, and invocation of server capabilities within a sandboxed JavaScript environment.
boilerplate-mcp-server
Provides a production-ready foundation for developing custom Model Context Protocol (MCP) servers in TypeScript to connect AI assistants with external APIs and data sources, exemplified by an IP geolocation tool.
toolhive-cloud-ui
A UI for interacting with AI models via OpenRouter and managing/utilizing MCP (Model Context Protocol) servers and their tools from a centralized catalog.
mcp-typescript-starter
A feature-complete Model Context Protocol (MCP) server template in TypeScript demonstrating all major MCP features for AI assistant interaction.