Skip to main content
Glama
justinbchau

faceit-mcp

by justinbchau
README.md
# FACEIT MCP Server

Lets Claude query your FACEIT CS2 stats directly (player profile, lifetime stats,
match history, per-match detailed stats) so you can ask for real analysis instead
of pasting screenshots.

## Setup

1. Install dependencies and build:
   ```
   npm install
   npm run build
   ```

2. Get your FACEIT API key (if you don't already have one):
   - Go to https://developers.faceit.com
   - Log in, create an "App" in App Studio
   - Generate a **server-side** API key

3. Add this server to your Claude Desktop config
   (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS,
   or the equivalent on your OS):

   ```json
   {
     "mcpServers": {
       "faceit": {
         "command": "node",
         "args": ["/absolute/path/to/faceit-mcp/build/index.js"],
         "env": {
           "FACEIT_API_KEY": "your-api-key-here"
         }
       }
     }
   }
   ```

4. Restart Claude Desktop. You should see "faceit" as a connected MCP server.

## Using it from Claude web (claude.ai)

Claude Desktop runs this server locally over stdio. Claude web can't spawn a
local process, so it needs the server hosted somewhere and reachable over
HTTPS via the MCP Streamable HTTP transport, exposed here at `api/mcp.ts`.

1. Deploy this repo to Vercel (or any Node host that runs `api/mcp.ts` as an
   HTTP endpoint).
2. In the deployment's environment variables, set:
   - `FACEIT_API_KEY` — your FACEIT API key
   - `MCP_ACCESS_TOKEN` — a secret you generate yourself (e.g. `openssl rand
     -hex 24`). Anyone who can reach the URL and knows this token can query
     your FACEIT key through the connector, so keep it private.
3. In claude.ai: **Settings → Connectors → Add custom connector**, and use
   `https://<your-deployment>.vercel.app/api/mcp` as the URL. If prompted for
   auth, use the `MCP_ACCESS_TOKEN` value as a bearer token
   (`Authorization: Bearer <token>`).

## Tools exposed

- `faceit_find_player` — look up a player by nickname, get their player_id
- `faceit_get_player_stats` — lifetime CS2 stats (K/D, ADR, win rate, HS%, etc.)
- `faceit_get_match_history` — recent match list for a player
- `faceit_get_match_stats` — full per-round, per-player stats for one match
- `faceit_get_match_details` — teams, competition, result for one match
- `faceit_analyze_weaknesses` — compares a player's last N matches against their own official FACEIT lifetime average for the same stats (K/D, ADR, headshot %, entry success, clutch conversion, utility/flash usage) and flags any that trail their established baseline by 10%+
- `faceit_analyze_match_vs_pro` — analyzes one match and ranks which stat areas trailed a pro/reference player's FACEIT lifetime average (defaults to donk666) by the largest relative margin

## Notes

- This uses FACEIT's free public Data API (open.faceit.com/data/v4). No cost,
  subject to their standard rate limits.
- Your API key lives in your local Claude Desktop config, not in this repo —
  don't commit it anywhere.

TDQS

A4.1/5.0

Scored across 5 tools

Disambiguation5/5

Each tool targets a distinct resource and action: player lookup, player stats, match history, match stats, and match details. The descriptions clearly differentiate match stats (per-round/per-player numbers) from match details (general info), so an agent can reliably choose the right tool.

Naming Consistency4/5

All tools follow a faceit_<verb>_<noun> pattern with snake_case. The only deviation is 'find_player' using 'find' instead of 'get', but this is minor and the pattern remains predictable across the set.

Tool Count5/5

Five tools is well-scoped for a focused FACEIT CS2 stats server. Each tool covers a necessary lookup or retrieval step without redundancy, and the count is squarely in the ideal 3-15 range.

Completeness5/5

The tool surface covers the core read-only workflow: finding a player, retrieving their stats, listing match history, and then fetching both summary and detailed stats for a match. There are no obvious dead ends for typical use cases; the missing operations are not essential for this domain.

Maintenance

ActivitySlowing
ResponsivenessNo issues