supercell-mcp
Read-only MCP server for Supercell game APIs (Clash of Clans, Clash Royale, Brawl Stars) with prefixed tool names to search players, clans, clubs, and more.
README
supercell-mcp
One MCP server covering three Supercell game APIs — Clash of Clans, Clash Royale, and Brawl Stars. They share an auth model and response style, so a single server with prefixed tool names beats three near-identical ones.
Read-only. These APIs expose no write or messaging endpoints at all, so there is nothing here that can change game state.
Runs over stdio, registered in ~/.claude.json as supercell.
Tools
Prefixes: coc_ Clash of Clans, cr_ Clash Royale, bs_ Brawl Stars.
| Clash of Clans | Clash Royale | Brawl Stars |
|---|---|---|
coc_get_player |
cr_get_player |
bs_get_player |
coc_get_clan |
cr_get_clan |
bs_get_club |
coc_get_clan_members |
cr_get_clan_members |
bs_get_club_members |
coc_search_clans |
cr_search_clans |
bs_get_rankings |
coc_get_current_war |
cr_get_player_battlelog |
bs_get_player_battlelog |
Layout
src/client.js shared auth + fetch, one base URL per game
src/clashofclans.js coc_* tools
src/clashroyale.js cr_* tools
src/brawlstars.js bs_* tools
src/index.js McpServer construction + stdio transport
The IP allowlist gotcha
Supercell API keys are bound to the IP address they were created for. When
the home IP changes, every call starts returning 403 accessDenied even though
the key is perfectly valid and unexpired.
That failure mode looks like an auth bug and isn't one. To fix it, mint a new key for the current IP at the relevant developer portal:
- https://developer.clashofclans.com
- https://developer.clashroyale.com
- https://developer.brawlstars.com
Check the current public IP with curl -s https://api.ipify.org (already an
allowed command in ~/.claude/settings.json).
Setup
Requires Node 20+. Mint a key per game at the portal listed above, for your
current public IP, then save each one as credentials/<game>.json:
credentials/clashofclans.json
credentials/clashroyale.json
credentials/brawlstars.json
Each holds {"token": "..."} — see the matching *.example.json.
credentials/ is git-ignored. A game whose key file is absent simply fails on
first call with a message naming the file and its portal; the other games keep
working.
npm ci
npm start
claude mcp add supercell -- node <path>/supercell-mcp/src/index.js
Tests
npm test
Registration across all three games, tag encoding, and the missing-key error message. No network and no credentials.
Notes
- Player and clan tags start with
#(e.g.#2PP0JCVL). The#is URL-encoded before the request — pass tags with the#included. - Tags are unambiguous across games but not portable between them; a Clash Royale tag won't resolve against the Clash of Clans API.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
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.