实时多人问答游戏

基于Mistral AI和MCP协议构建的实时多人问答游戏,支持AI动态生成问题并通过MCP服务器与AI助手交互。

  • by Min0laa
  • TypeScript
  • 本地部署
  • 更新于
在 GitHub 查看 Min0laa/Mistral-MCP-Hackathon

使用说明

🎯 Quiz Game MCP — Mistral AI × MCP Hackathon

Real-time multiplayer quiz powered by Mistral AI with full Model Context Protocol (MCP) integration.

Built in 48h at the Mistral AI × MCP Hackathon (2025).

🚀 What it does

Players join a live quiz where every question is generated on the fly by Mistral AI based on a chosen theme. What makes it unique: an MCP server exposes the game as a tool — meaning any AI assistant (Claude, GPT, etc.) can interact with it programmatically.

User → selects theme → Mistral generates questions → real-time multiplayer scoring
AI assistant → MCP → add users, fetch questions, get scores

🏗 Architecture

Layer Tech
Frontend Next.js (React)
Backend FastAPI (Python)
AI Mistral AI LLM API
MCP Server FastMCP
Infra Docker Compose

✨ Key Features

  • AI question generation — Mistral creates unique questions per theme in real-time
  • MCP server — exposes game actions as tools for AI assistants (add users, fetch questions, get leaderboard)
  • Multiplayer — live scoring across multiple players
  • Full-stack — single docker-compose up to run everything

🛠 Setup

# Clone & run everything
git clone https://github.com/Min0laa/Mistral-MCP-Hackathon
cd Mistral-MCP-Hackathon
docker-compose up

# Or run individually:
# Backend
cd backend && uv run game_api.py

# Frontend
cd frontend && npm run dev

🧠 What I learned

  • How MCP (Model Context Protocol) works and how to expose any app as an AI tool
  • Streaming responses from Mistral API
  • Building real-time multiplayer logic with FastAPI WebSockets

👤 Author

Sacha Morin — LinkedIn · GitHub