parity-mcp
v0.3.0
Published
Model Context Protocol server for the Parity Anti-Cheat REST API — lets an AI assistant manage bans, players, whitelist, team, analytics and Custom API Rules for your FiveM server.
Maintainers
Readme
parity-mcp
A Model Context Protocol server for the Parity Anti-Cheat REST API. It lets an AI assistant (Claude Desktop, Claude Code, Cursor, …) run your FiveM server's moderation in plain language:
"Is
steam:110000112345678worth worrying about?" "Ban that guy, cheating — permanent." "The noclip detection keeps flagging our admins, whitelist it." "How many bans this week, and for what?"
Every action goes through the same public API and scopes as the dashboard, is scoped to a single server (license), and leaves an audit entry in the Events tab.
Setup
1. Create an API key
In the Parity dashboard: Configuration → API Keys (license owner only). Pick the scopes you want the assistant to have — scopes are fixed when the key is created, so choose deliberately:
| Want the assistant to… | Give it these scopes |
|---|---|
| Look players & bans up, read logs/analytics | players:read, players:online, bans:read, bans:list, server:events, server:stats, analytics:read |
| See risk scores and alt accounts | players:read, players:alts |
| Kick / message / ban players | players:kick, players:message, players:ban |
| Revoke bans | bans:write |
| Manage the whitelist | whitelist:read, whitelist:write |
| Read/write Custom API Rules | rules:read, rules:write |
| Read config / license | config:read, license:read |
| Manage team members | team:read, team:write |
Copy the key (pk_live_…) — it is shown only once.
2. Add the server to your MCP client
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"parity": {
"command": "npx",
"args": ["-y", "parity-mcp"],
"env": { "PARITY_API_KEY": "pk_live_xxxxxxxx" }
}
}
}Claude Code:
claude mcp add parity -e PARITY_API_KEY=pk_live_xxxxxxxx -- npx -y parity-mcpIf your server runs the beta anticheat build, also set
"PARITY_API_BASE": "https://beta-api.parity.ac/public/v1" (a mismatched host
answers 421 and tells you which one to use).
Then ask the assistant to run verify_connection — it echoes back the key's
scopes so you can see exactly what it can do.
Tools
Connection & info
| Tool | Scope | |
|---|---|---|
| verify_connection | — | Validate the key, list its scopes and the license status. |
| key_usage | — | Key metadata + live rate-limit window. |
| get_license | license:read | Plan, status, expiry, server address. |
| get_config | config:read | Read-only snapshot of the detection config. |
| platform_stats | — | Anonymised platform-wide totals. |
Players
| Tool | Scope | |
|---|---|---|
| get_player | players:read | Profile, identifiers, ban count, notes. |
| analyze_player | players:read | Profile + active bans + history + threat score in one call. |
| get_player_threat_score | players:read | Just riskLevel / suspicionScore / riskFactors. |
| find_alt_accounts | players:alts | Other players on this server sharing an identifier/token. |
| list_online_players | players:online | Live connected players (ids for test_rule). |
| get_player_notes / set_player_notes | players:notes | Read / overwrite the internal admin note. |
| kick_player | players:kick | Disconnect an online player (no ban). |
| message_player | players:message | Send a chat message to an online player. |
| ban_player | players:ban | Ban by identifier, best-effort kick if online. |
Bans
| Tool | Scope | |
|---|---|---|
| lookup_ban | bans:read | Active ban for an identifier/token. |
| get_ban | bans:read | One ban by display ID (BAN-1042). |
| list_bans | bans:list | Paginated, filterable ban list. |
| unban | bans:write | Revoke one ban by ID or identifier. |
| unban_recent | bans:write | Revoke the N most recent active bans. |
| unban_all | bans:write | Revoke every active ban (needs confirm:true). |
| ban_stats / ban_trends | analytics:read | Ban counts over 24h/7d/30d, grouped by reason. |
Server & analytics
| Tool | Scope | |
|---|---|---|
| get_server_stats | server:stats | Online count, avg ping, uptime. |
| list_server_events | server:events | The Events-tab feed (bans, kicks, detections…). |
| get_analytics | analytics:read | Aggregate counts + top ban reasons. |
Whitelist
| Tool | Scope | |
|---|---|---|
| list_whitelist | whitelist:read | Whitelisted players and their flags. |
| add_whitelist / remove_whitelist | whitelist:write | Add / remove by type:value identifier. |
Team
| Tool | Scope | |
|---|---|---|
| list_team_members | team:read | Members, roles, permissions. |
| invite_team_member | team:write | Invite by Discord ID (creates a PENDING member). |
| update_team_member / remove_team_member | team:write | Change permissions / remove. Cannot touch the owner or grant admin-management. |
Custom API Rules
| Tool | Scope | |
|---|---|---|
| rule_authoring_guide | — | The flat-rule schema, export syntax, gotchas. |
| list_detections | rules:read | Every valid detectionType. |
| get_rules | rules:read | Current rule set + safeMode. |
| test_rule | rules:read | Dry-run a detection against an online player (no action). |
| whitelist_detection | rules:write | One-shot: exempt a group from one detection via an export gate. |
| whitelist_all_detections | rules:write | One catch-all rule — hands every detection to a single isAllowed(source, detectionType, details) export. |
| upsert_rules | rules:write | Add/update rules by id, keep the rest. |
| replace_rules | rules:write | Replace the whole set. |
| delete_rules | rules:write | Remove rules by id. |
| set_safe_mode | rules:write | Panic switch — disable every rule at once. |
Safety
- New Custom API Rules are stored disabled unless you pass
activate/activate_new/activate:true— an assistant can draft a rule for you to review and enable in the dashboard. unban_allrefuses to run withoutconfirm:trueand always posts a webhook notice.- Write tools are marked with MCP
destructiveHintannotations so a client can prompt before running them. - Rule writes are read-modify-write: a concurrent dashboard edit between the read and the write can be lost. Review important changes in the dashboard.
- Rate limit: 30 requests/minute per IP, shared across all scopes. The assistant should react to events, not poll.
Local development
npm install
PARITY_API_KEY=pk_live_xxx npm run inspect # opens the MCP InspectorLicense
MIT
