chat-royale
A Clash Royale agent, powered by a custom built Clash Royale MCP server. Enables the agent to fetch accurate data from the Clash Royale servers..
Documentation
Chat Royale
AI-powered Clash Royale agent using Gemini 2.0 with MCP tools for real-time game data access.
Full Technical Deep Dive
I recently wrote a technical breakdown on the architecture, my building process and other cool things about this project. You can read it on my websites here:
Architecture
Three containerized services:
MCP Server (`src/mcp/`) - Python FastMCP server exposing Clash Royale API tools:
- Players, Clans, Cards, Rankings
Backend API (`src/backend/`) - Node.js/Express server:
- Integrates Gemini with MCP client via `@modelcontextprotocol/sdk`
- Standard JSON request/response (no streaming)
- Tool execution handled internally with iterative Gemini calls
Frontend (`src/frontend/`) - React/TypeScript UI:
- Simple chat interface with markdown support
- Standard HTTP requests to backend API
How It Works
1. User sends message to frontend
2. Frontend posts to backend `/api/chat`
3. Backend connects to MCP server and discovers tools
4. Gemini processes message with available tools
5. If tools needed: backend executes via MCP, feeds results back to OpenAI
6. Final response returned as JSON to frontend
Deployment
Production: AWS Lightsail with Cloudflare CDN
CI/CD: GitHub Actions auto-deploy on `main` branch push/merge
# Deploy
docker-compose -f docker-compose.prod.yml up -d --buildDevelopment
# Environment setup
# Backend: src/backend/.env - GEMINI_API_KEY
# MCP: src/mcp/.env - CR_API_KEY
# Run all services
docker-compose up -dTech Stack
- MCP Server: Python 3.12, FastMCP, Clash Royale API
- Backend: Node.js, Express, TypeScript, Gemini SDK
- Frontend: React, TypeScript, Vite, TailwindCSS
- Deployment: Docker, AWS Lightsail, Cloudflare, GitHub Actions
Frequently asked questions
What is chat-royale?
chat-royale is A Clash Royale agent, powered by a custom built Clash Royale MCP server. Enables the agent to fetch accurate data from the Clash Royale servers..
How do I install chat-royale?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is chat-royale open source?
Yes — it is hosted on GitHub at https://github.com/Baighasan/clash-royale-mcp-server and has 2 stars.
Related MCP tools
Model Context Protocol Servers
🍒 Cherry Studio is a desktop client that supports for multiple LLM providers. Built for the Model Context Protocol to enhance AI capabilities.
Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini...
FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, ...
Composio equips your AI agents & LLMs with 100+ high-quality integrations via function calling for the Model Context Protocol. Enhance AI assistants with powerf
A MCP for Claude Desktop / Claude Code / Windsurf / Cursor to build n8n workflows for you
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP