Clash Royale MCP Server
An MCP server that integrates with the official Clash Royale API to provide real-time data on players, clans, cards, and tournaments. It enables users to query battle logs, chest cycles, and global rankings directly through Claude Desktop or Claude Code.
README
Clash Royale MCP Server
A Model Context Protocol (MCP) server that wraps the official Clash Royale API. Exposes player, clan, card, tournament, and ranking data as MCP tools usable from Claude Desktop or Claude Code.
Prerequisites
- Python 3.11+
uv(recommended) orpip- A Clash Royale developer API token
Getting an API Token
- Go to https://developer.clashroyale.com and sign in.
- Click My Account → Create New Key.
- Enter a name and your current public IP address — tokens are IP-locked.
- Copy the token.
IP locking gotcha: If your IP changes (home network, VPN, etc.) your token will return 403 errors. Either create a new key or use the RoyaleAPI community proxy (see below).
Using the RoyaleAPI Proxy (recommended for local dev)
The proxy at https://proxy.royaleapi.dev/v1 forwards requests to the official API without IP locking. Set it via the env var:
CLASH_ROYALE_BASE_URL=https://proxy.royaleapi.dev/v1
Installation
git clone <repo>
cd clash-royale-mcp
# Copy and fill in your token
cp .env.example .env
# Edit .env: set CLASH_ROYALE_API_TOKEN=your_token_here
# Install with uv
uv sync
# Or with pip
pip install -e .
Running Locally
# Test the server directly (exits immediately — use fastmcp dev for interactive testing)
python -m clash_royale_mcp.server
# Interactive MCP inspector (recommended for development)
fastmcp dev src/clash_royale_mcp/server.py
Claude Desktop Integration
Add to your claude_desktop_config.json (usually at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"clash-royale": {
"command": "uv",
"args": ["run", "clash-royale-mcp"],
"env": {
"CLASH_ROYALE_API_TOKEN": "your_token_here"
}
}
}
}
Or if running without uv:
{
"mcpServers": {
"clash-royale": {
"command": "python",
"args": ["-m", "clash_royale_mcp.server"],
"cwd": "/path/to/clash-royale-mcp",
"env": {
"CLASH_ROYALE_API_TOKEN": "your_token_here"
}
}
}
}
Available Tools
Player
| Tool | Description |
|---|---|
get_player |
Full player profile: trophies, level, wins/losses, clan, card collection |
get_player_battlelog |
Recent battle history (up to 25 battles) with decks and outcomes |
get_player_upcoming_chests |
Upcoming chest sequence in the player's cycle |
get_player_recent_decks |
Deduplicated deck analysis with win rates and usage counts |
Clan
| Tool | Description |
|---|---|
get_clan |
Full clan profile and member roster |
search_clans |
Search clans by name, location, or score thresholds |
get_clan_members |
Paginated clan member list |
get_clan_warlog |
Clan war history |
get_clan_current_war |
Current active war state |
Cards
| Tool | Description |
|---|---|
get_cards |
Full card catalog (~100+ cards); cached after first call |
Tournaments
| Tool | Description |
|---|---|
search_tournaments |
Search open tournaments by name |
get_tournament |
Tournament details by tag |
get_global_tournaments |
All currently active global tournaments |
Locations & Rankings
| Tool | Description |
|---|---|
get_locations |
List locations/regions with their IDs |
get_clan_rankings |
Top clan rankings for a location or globally |
get_player_rankings |
Top player trophy rankings for a location or globally |
get_clanwar_rankings |
Top clan war rankings for a location or globally |
Environment Variables
| Variable | Default | Description |
|---|---|---|
CLASH_ROYALE_API_TOKEN |
(required) | Your API token from developer.clashroyale.com |
CLASH_ROYALE_BASE_URL |
https://api.clashroyale.com/v1 |
API base URL; override for proxy |
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.