Skip to main content
Glama
warcraftlogs-mcp

warcraftlogs-mcp

by iRockyZhou

warcraftlogs-mcp

An open-source Model Context Protocol server that gives AI clients reliable, bounded, and analysis-friendly access to Warcraft Logs reports.

Community project: warcraftlogs-mcp is not affiliated with, endorsed by, or maintained by Warcraft Logs, Archon, Blizzard Entertainment, or the Model Context Protocol project.

The server retrieves evidence from the official Warcraft Logs GraphQL API v2. It deliberately does not hard-code class or specialization advice: the MCP layer handles authentication, filtering, normalization, pagination, and context budgets; the consuming model decides what the combat evidence means.

Highlights

  • Public and unlisted reports through client credentials, plus private reports through opt-in user OAuth.

  • In-memory client-token caching with concurrent request deduplication and securely persisted user tokens.

  • Automatic one-time token refresh after a 401.

  • Structured 403, 404, GraphQL, timeout, network, and server errors.

  • Retry-After aware 429 handling: short waits retry once; long waits fail quickly.

  • Exact host allow-list for www.warcraftlogs.com and cn.warcraftlogs.com; no arbitrary fetch URL or SSRF surface.

  • Correct player filter direction for the built-in table tools.

  • Bounded event pagination with time-window, event-count, page-count, and byte limits.

  • Compact Mythic+ and player-analysis tools with best-effort evidence collection.

  • Character discovery, persistent active-character defaults, rankings, and pull-based report subscriptions.

  • Coverage of the core wcl-mcp workflows, with compatibility aliases backed by the same safety budgets.

  • Strict TypeScript, runtime response validation, Vitest integration tests, ESLint, Prettier, and a publish-ready npm package.

See the dated comparison with wcl-mcp for the compatibility scope and trade-offs.

Related MCP server: WoW Guild Analytics MCP Server

Requirements

  • Node.js 20 or newer. Node.js 24 is used in CI and recommended for development.

  • A Warcraft Logs API client ID and secret. Create an API client from the Warcraft Logs client management page.

Register http://127.0.0.1:8765/callback as an OAuth redirect URI if you want private-report access. Client credentials remain sufficient for public and directly linked unlisted reports.

For CN players, WCL currently cannot link a China Battle.net account. A practical cross-region setup is to link a supported Battle.net region (for example Taiwan) to the same WCL account, create a V2 API client, and then run auth login cn. The resulting client credentials and CN user authorization have been verified against cn.warcraftlogs.com; a legacy V1 client key is not a substitute for the V2 client secret.

Install and run

Once published to npm:

npx -y warcraftlogs-mcp@latest

From a local checkout:

pnpm install
pnpm build
WCL_CLIENT_ID=... WCL_CLIENT_SECRET=... node dist/cli.mjs

The default command starts stdio transport. Standard output is reserved for MCP JSON-RPC; operational messages go to standard error.

Example MCP client configuration:

{
  "mcpServers": {
    "warcraftlogs": {
      "command": "npx",
      "args": ["-y", "warcraftlogs-mcp@latest"],
      "env": {
        "WCL_CLIENT_ID": "your_client_id",
        "WCL_CLIENT_SECRET": "your_client_secret"
      }
    }
  }
}

Do not commit credentials to a repository or place them in prompts.

Report visibility and authorization

All three Warcraft Logs visibility modes are supported:

Visibility

How this server accesses it

Important boundary

Public

Client credentials or user OAuth

Discoverable through normal WCL surfaces.

Unlisted

Direct report URL/code with allowUnlisted: true

The report code acts like a share-link secret; character subscriptions do not discover it through public listings.

Private

User OAuth and /api/v2/user

Only reports visible to the account that approved access can be read.

Authorize the global or CN site separately:

warcraftlogs-mcp auth login global
warcraftlogs-mcp auth login cn
warcraftlogs-mcp auth status
warcraftlogs-mcp auth logout global

auth login prints the official WCL authorization URL and waits up to 15 minutes on a loopback-only callback. Keep that command running until the browser returns to 127.0.0.1; if the command has stopped, the old callback page will show ERR_CONNECTION_REFUSED and you must start a fresh login. The completion page removes the one-time authorization code from the visible URL and disables caching/referrers. The token is written atomically under ~/.config/warcraftlogs-mcp/auth.json with mode 0600; its directory is forced to 0700. The token is never returned by an MCP tool. WCL does not document refresh tokens for this flow, so repeat auth login after expiry.

Report tools expose accessMode:

  • auto (default): use user authorization when a valid token is configured, otherwise use the public endpoint.

  • public: never send a user token.

  • user: require a valid user token and return USER_AUTH_REQUIRED if it is missing or rejected.

Doctor command

Check Node, client credentials, the public GraphQL endpoint, every configured user token, and optionally a report:

warcraftlogs-mcp doctor
warcraftlogs-mcp doctor 'https://cn.warcraftlogs.com/reports/gDBTZr6pz1AvnxbW?fight=1'

Other CLI commands:

warcraftlogs-mcp --help
warcraftlogs-mcp --version
warcraftlogs-mcp serve

For a normal report review:

parse_wcl_url
  -> list_fights
  -> list_players
  -> get_mythic_plus_summary or get_player_analysis_context
  -> get_events only for a narrow follow-up question

Avoid starting with all combat events. Tables and high-level tools are much smaller and usually contain enough evidence to decide which event window is worth inspecting.

For character-first use:

set_active_character
  -> get_character_summary or get_recent_reports
  -> get_fight_summary / get_player_analysis_context

For subscriptions:

subscribe_character
  -> check_character_subscriptions periodically
  -> analyze only reports returned as new

Subscriptions are durable pull cursors stored locally. A stdio MCP process cannot wake a closed AI client, so this server does not claim background push delivery. Your MCP client or scheduler must call check_character_subscriptions; repeated checks do not return the same report again.

Tools

Tool

Purpose

parse_wcl_url

Parse and validate a supported report URL and fight selector.

get_report

Report metadata, visibility, zone, timestamps, and archive status.

list_fights

Fights plus raid/Mythic+ metadata.

list_players

Player actor IDs, fight participation, specs, and item levels.

list_dungeon_pulls

Mythic+ pull time windows, locations, maps, and enemy IDs.

get_talent_import_code

Retail talent import code for a player/fight.

get_damage_done

Damage table; playerID maps to sourceID.

get_damage_taken

Damage-taken table; playerID maps to targetID.

get_casts

Cast table; playerID maps to sourceID.

get_interrupts

Interrupt table; playerID maps to sourceID.

get_deaths

Death table; playerID maps to targetID.

get_buffs

Buff uptime on the player; playerID maps to targetID.

get_debuffs

Debuffs on the player; playerID maps to targetID.

get_dispels

Dispels performed; playerID maps to sourceID.

get_healing

Healing performed; playerID maps to sourceID.

get_resources

Resource evidence; playerID maps to sourceID.

get_combatant_info

Bounded CombatantInfo events for a player source.

get_events

Advanced bounded event retrieval with pagination and byte protection.

get_mythic_plus_summary

Key, duration, enemy forces, DPS/HPS, deaths, and interrupts.

get_player_analysis_context

Best-effort bundle of evidence for one player.

set_active_character

Validate and persist character defaults.

get_active_character

Read the active character without a network call.

clear_active_character

Remove the active-character default.

get_character_summary

Character profile and recent WCL presence.

get_recent_reports

Paginated recent reports with raid/Mythic+ filtering.

get_encounter_rankings

Encounter or zone rankings; optionally includes private logs.

subscribe_character

Create a persistent report-discovery cursor.

list_character_subscriptions

List local subscriptions and cursors.

check_character_subscriptions

Poll for new reports and atomically advance cursors.

unsubscribe_character

Remove a local subscription.

get_fight_summary

Generic raid/Mythic+ summary with explicit content type and location.

Core wcl-mcp compatibility names are also registered: get_fight_damage, get_fight_healing, get_fight_damage_taken, get_character_deaths, get_character_casts, get_buff_uptime, and get_fight_events. The character death/cast tools discover and scan up to ten recent reports with partial-failure warnings and an aggregate byte budget; the other compatibility tools use the same validated, bounded implementation as the native tools.

Every data tool accepts either a report code or a full supported report URL. A full URL preserves its global/CN origin and can supply ?fight=1, #fight=1, or fight=last. For a bare report code, region defaults to global and can be set to cn.

Source and target semantics

The friendly playerID argument removes a common WCL integration mistake:

  • WCL player/source perspective: Damage Done, Damage Taken, Casts, Interrupts, Deaths, Dispels, Healing, Resources, and CombatantInfo.

  • Target: Buffs and Debuffs.

This is deliberately data-type-aware. For current WCL table/event APIs, sourceID selects the player whose Damage Taken or Deaths view is requested, even though the returned raw combat event identifies that player as targetID. Buff and debuff questions still use targetID to mean the affected player. The low-level get_events tool exposes both filters for advanced investigations, but callers should interpret them in the context of dataType rather than assuming raw event-field direction.

Event pagination and budgets

get_events defaults to 300 events and has hard limits for events, WCL pages, and serialized bytes. get_player_analysis_context also has a 600 KB aggregate default and omits later components with warnings before crossing that budget. Continue an event response with:

cursor = pagination.nextPageTimestamp

If a byte limit stops part-way through a WCL page, cursorMayRepeat is true. The cursor is inclusive so the next call does not silently lose same-timestamp events; callers should deduplicate repeated boundary events.

Configuration

Variable

Default

Meaning

WCL_CLIENT_ID

required for API calls

OAuth client ID.

WCL_CLIENT_SECRET

required for API calls

OAuth client secret.

WCL_USER_ACCESS_TOKEN

stored login token

Optional global-site user token override.

WCL_CN_USER_ACCESS_TOKEN

stored login token

Optional CN-site user token override.

WCL_OAUTH_REDIRECT_URI

http://127.0.0.1:8765/callback

Registered loopback callback.

WCL_OAUTH_LOGIN_TIMEOUT_MS

900000

Maximum interactive login wait.

WCL_STATE_DIR

~/.config/warcraftlogs-mcp

Private auth and subscription state.

WCL_REQUEST_TIMEOUT_MS

15000

Per-request timeout.

WCL_MAX_RETRIES

2

Retries for network/timeout/5xx failures.

WCL_MAX_RETRY_AFTER_MS

2000

Longest 429 delay the process will wait.

parse_wcl_url and tool discovery still work without credentials. API calls return a structured CONFIG_ERROR until both credentials are configured.

Privacy and information flow

The MCP sends only requested WCL evidence to the connected MCP client. It has no telemetry, analytics, remote database, or arbitrary URL fetcher. It does not make battle logs private: an unlisted report code is a bearer-style share secret, and private report contents become visible to the connected AI client after user authorization. Protect report codes and configure the AI host according to your acceptable retention and training policy.

See Privacy and threat model for the complete data flow, stored fields, trust boundaries, and hardening guidance.

Development

pnpm install
pnpm format:check
pnpm lint
pnpm typecheck
pnpm test
pnpm build
npm pack --dry-run

See CONTRIBUTING.md, the architecture, and the publishing guide.

Current limitations

  • User OAuth tokens are not refreshable because WCL does not document refresh tokens for this flow; re-run auth login after expiry.

  • Character subscriptions are pull-based and discover only reports returned by WCL's recentReports; they cannot discover an unlisted report that WCL omits from listings.

  • A single subscription check fetches the latest 100 reports. If more than 100 new reports appear between checks, older reports can be missed; poll at a sensible interval.

  • Warcraft Logs table and event payloads are semi-structured JSON and can change. Stable outer fields are runtime-validated; table/event evidence is preserved and bounded rather than over-modeled.

  • Enemy forces are present only when WCL exposes countReached and countRequired for the selected fight.

  • The server provides evidence, not a simulator, ranking percentile engine, or specialization-specific rotation evaluator.

  • HTTP hosting and background push notifications are not included; the supported transport is local stdio.

License

MIT

Available Tools

38 tools
check_character_subscriptionsCheck character subscriptionsA

Poll WCL for new reports and advance subscription cursors. Omit subscriptionID to check all subscriptions.

Inputs: subscriptionID.

clear_active_characterClear active characterA
Destructive

Remove the locally persisted active-character default.

Inputs: no named parameters.

get_active_characterGet active characterA
Read-onlyIdempotent

Return the locally persisted active character, if one is configured.

Inputs: no named parameters.

get_buffsGet buffsB
Read-onlyIdempotent

Get bounded buff-uptime evidence on a player. playerID is correctly applied as WCL targetID.

Inputs: report (required), region, endTime, fightID, +7 more.

get_buff_uptimeGet buff uptimeC
Read-onlyIdempotent

Compatibility alias for get_buffs with bounded target semantics.

Inputs: report (required), region, endTime, fightID, +7 more.

get_castsGet castsC
Read-onlyIdempotent

Get bounded cast evidence. playerID is correctly applied as WCL sourceID.

Inputs: report (required), region, endTime, fightID, +7 more.

get_character_castsGet character cast historyA
Read-onlyIdempotent

Discover recent reports and return bounded, best-effort cast evidence for one character across those reports.

Inputs: name, server, accessMode, maxEntries, +4 more.

get_character_deathsGet character death historyA
Read-onlyIdempotent

Discover recent reports and return bounded, best-effort death evidence for one character across those reports.

Inputs: name, server, accessMode, maxEntries, +4 more.

get_character_summaryGet character summaryA
Read-onlyIdempotent

Resolve a character and summarize its recent report availability and content types. Omit all identity fields to use the active character.

Inputs: name, server, accessMode, serverRegion.

get_combatant_infoGet combatant infoA
Read-onlyIdempotent

Get bounded CombatantInfo events (gear, talents and player state) for one player source.

Inputs: report (required), playerID (required), region, fightID, +3 more.

get_damage_doneGet damage doneA
Read-onlyIdempotent

Get bounded damage-done evidence. playerID is correctly applied as WCL sourceID.

Inputs: report (required), region, endTime, fightID, +7 more.

get_damage_takenGet damage takenC
Read-onlyIdempotent

Get bounded damage-taken evidence. WCL table semantics require playerID as sourceID for the selected player perspective.

Inputs: report (required), region, endTime, fightID, +7 more.

get_deathsGet deathsC
Read-onlyIdempotent

Get bounded death evidence. WCL table semantics require playerID as sourceID for the selected player perspective.

Inputs: report (required), region, endTime, fightID, +7 more.

get_debuffsGet debuffsB
Read-onlyIdempotent

Get bounded debuff evidence on a player. playerID is correctly applied as WCL targetID.

Inputs: report (required), region, endTime, fightID, +7 more.

get_dispelsGet dispelsB
Read-onlyIdempotent

Get bounded dispel evidence. playerID is correctly applied as WCL sourceID.

Inputs: report (required), region, endTime, fightID, +7 more.

get_encounter_rankingsGet character encounter rankingsA
Read-onlyIdempotent

Get WCL rankings for one character and exactly one encounter or zone. Private parses require user authorization and includePrivateLogs=true.

Inputs: name, metric, server, zoneID, +5 more.

get_eventsGet bounded combat eventsB
Read-onlyIdempotent

Get a bounded event window with WCL pagination. Enforces fight time bounds, max events/pages, and a byte budget. Continue using pagination.nextPageTimestamp as cursor.

Inputs: report (required), cursor, region, endTime, +13 more.

get_fight_damageGet fight damageC
Read-onlyIdempotent

Compatibility alias for get_damage_done with bounded source semantics.

Inputs: report (required), region, endTime, fightID, +7 more.

get_fight_damage_takenGet fight damage takenC
Read-onlyIdempotent

Compatibility alias for get_damage_taken with bounded WCL player/source semantics.

Inputs: report (required), region, endTime, fightID, +7 more.

get_fight_eventsGet fight eventsB
Read-onlyIdempotent

Compatibility alias for get_events with full pagination, time-window, event-count, page-count, and byte protections.

Inputs: report (required), cursor, region, endTime, +13 more.

get_fight_healingGet fight healingC
Read-onlyIdempotent

Compatibility alias for get_healing with bounded source semantics.

Inputs: report (required), region, endTime, fightID, +7 more.

get_fight_summaryGet fight summaryA
Read-onlyIdempotent

Get a compact raid or Mythic+ fight summary with player damage, healing, deaths, interrupts, and fight metadata.

Inputs: report (required), region, fightID, translate, +1 more.

get_healingGet healingB
Read-onlyIdempotent

Get bounded healing evidence. playerID is correctly applied as WCL sourceID.

Inputs: report (required), region, endTime, fightID, +7 more.

get_interruptsGet interruptsA
Read-onlyIdempotent

Get bounded interrupt evidence. playerID is correctly applied as WCL sourceID.

Inputs: report (required), region, endTime, fightID, +7 more.

get_mythic_plus_summaryGet Mythic+ summaryA
Read-onlyIdempotent

Get a compact Mythic+ overview: key, duration, dungeon, enemy forces, players, DPS/HPS, deaths and interrupts. Optional tables fail independently with warnings.

Inputs: report (required), region, fightID, translate, +1 more.

get_player_analysis_contextGet player analysis contextA
Read-onlyIdempotent

Aggregate bounded damage, casts, damage taken, interrupts, deaths, buffs, resources, CombatantInfo and talent evidence for one player. Components fail independently and return warnings.

Inputs: player (required), report (required), region, fightID, +4 more.

get_recent_reportsGet recent character reportsA
Read-onlyIdempotent

List recent reports for a character, including report visibility and bounded fight metadata. User access can include private reports visible to the authorized WCL account.

Inputs: name, page, limit, server, +3 more.

get_reportGet report metadataB
Read-onlyIdempotent

Get bounded report metadata, visibility, zone, timestamps, and archive status.

Inputs: report (required), region, accessMode, allowUnlisted.

get_resourcesGet resourcesC
Read-onlyIdempotent

Get bounded resource evidence. playerID is correctly applied as WCL sourceID.

Inputs: report (required), region, endTime, fightID, +7 more.

get_talent_import_codeGet talent import codeA
Read-onlyIdempotent

Get the Retail talent import string WCL recorded for one player in one fight.

Inputs: report (required), actorID (required), region, fightID, +2 more.

list_character_subscriptionsList character subscriptionsA
Read-onlyIdempotent

List locally persisted character report subscriptions and their cursors.

Inputs: no named parameters.

list_dungeon_pullsList dungeon pullsA
Read-onlyIdempotent

List Mythic+ pull windows, locations, map IDs, and participating enemy NPC IDs.

Inputs: report (required), region, fightID, translate, +1 more.

list_fightsList report fightsB
Read-onlyIdempotent

List fights with raid and Mythic+ metadata. If a fight selector is present, selectedFightID identifies it.

Inputs: report (required), region, fightID, translate, +1 more.

list_playersList report playersA
Read-onlyIdempotent

List player actor IDs and map their observed specs and item levels to fights. A fight selector narrows participants.

Inputs: report (required), region, fightID, translate, +1 more.

parse_wcl_urlParse Warcraft Logs URLA
Read-onlyIdempotent

Safely parse a www.warcraftlogs.com or cn.warcraftlogs.com report URL, including query/hash fight selectors. Rejects look-alike hosts and unsafe URL forms.

Inputs: url (required).

set_active_characterSet active characterA

Validate and persist the default character used by character discovery and ranking tools.

Inputs: name (required), server (required), serverRegion (required).

subscribe_characterSubscribe to character reportsA

Persist a pull-based subscription. By default current reports become the baseline, so later checks return only newly discovered reports.

Inputs: name (required), server (required), serverRegion (required), accessMode, +1 more.

unsubscribe_characterUnsubscribe from character reportsA
Destructive

Delete one locally persisted character report subscription.

Inputs: subscriptionID (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 38 tools

    Disambiguation2/5

    The server includes multiple explicit compatibility aliases (e.g., get_fight_damage vs get_damage_done, get_fight_damage_taken vs get_damage_taken, get_fight_healing vs get_healing, get_buff_uptime vs get_buffs, get_fight_events vs get_events) that perform identical operations, creating misselection risk. Additionally, character-scoped discovery tools (get_character_deaths, get_character_casts) overlap with report/fight-scoped evidence tools (get_deaths, get_casts), and get_player_analysis_context duplicates many individual evidence tools. While the core evidence types are distinct, the aliases and overlapping scopes make it hard to choose the right tool.

    Naming Consistency4/5

    All tools use snake_case and a clear verb_noun pattern (get_, list_, set_, clear_, check_, subscribe_, unsubscribe_, parse_). However, the aliases introduce inconsistent noun phrasing for the same operation (e.g., get_fight_damage vs get_damage_done), which is a minor deviation from a single predictable naming scheme.

    Tool Count2/5

    38 tools is excessive for the domain, especially with five redundant compatibility aliases and several overlapping discovery/aggregation tools. While Warcraft Logs data is complex, many tools could be consolidated (e.g., a parameterized get_events could replace multiple evidence tools, and aliases could be removed).

    Completeness4/5

    The surface covers a wide range of read operations: reports, fights, players, events, rankings, subscriptions, and character management. It includes discovery, parsing, and aggregation tools. Missing operations like creating reports (not supported by the platform) or retrieving zone/encounter lists are minor gaps that agents can work around using other tools.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Provides seamless access to Kibana and Periscope logs through a unified API with KQL and SQL querying, AI-powered log analysis, and support for searching across 1.3+ billion logs in 9 indexes.
      1
      -
    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      Provides comprehensive World of Warcraft guild analytics, player character analysis, and auction house market data through the Blizzard Battle.net API. Supports both Retail and Classic WoW with real-time market insights, guild roster management, and demographic analytics.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables a local MCP-compatible AI client to query saved World of Warcraft: Forever auction, character, profession, recipe, item-source, and map data from a read-only local dashboard. It works without an AI subscription and keeps all research data on your own machine.
      1
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Lets assistants query World of Warcraft raid logs in natural language: why pulls wiped, how each raider performed against top players of their spec, where everyone stood, whether the raid followed its notes and cooldown plans, plus boss strategies, spells, loot and hotfixes. Every number in an answer is computed from the Warcraft Logs report by the server's tools, with the model choosing the tools and explaining the results.
      5
      AGPL 3.0