DPSCoach MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/stalcup-dev/tl-dps-mcp
cd tl-dps-mcp

Then follow the repository README for any remaining dependency or build steps before continuing.

2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add dps-coach -- node "<FULL_PATH_TO_TL_DPS_MCP>/dist/index.js"

Replace <FULL_PATH_TO_TL_DPS_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

AI-powered combat log analyzer for Throne & Liberty

DPSCoach – AI-Powered Combat Log Analyzer for Throne & Liberty

DPSCoach is a desktop application and MCP toolkit that parses Throne & Liberty combat logs into actionable DPS metrics, powered by a local AI coach that answers natural-language questions about your performance using SQL-first planning and DuckDB analytics. Prototype note: class-specific context is not wired yet; the class dropdown is intentionally disabled until backend class filtering is implemented. Fair-play disclaimer: This app only reads your exported text combat logs; it does not hook, modify, or automate the game client and does not confer any in-game advantage beyond offline analytics.


🎬 Demo

DPSCoach Demo

TODO: Record a 30-second GIF showing: log analysis β†’ coach question β†’ SQL trace β†’ answer. See docs/DEMO.md for recording instructions.


✨ Features

  • AI Coach with Intent Routing: Ask "Why did my crit rate drop?" and the coach detects intent (CRIT_BUCKET_TREND, SKILL_DELTA, RUNS, etc.) and routes to deterministic handlers or LLM-planned SQL queries.
  • Single-Call MCP Analysis Packet: All metrics (run summary, top skills, timeline buckets, skill deltas, windows, action levers) returned in one get_analysis_packet callβ€”no iterative prompting required.
  • DuckDB Event Store: Combat events loaded into an in-memory DuckDB table for fast, safe, read-only SQL queries via MCP tools (query_dps, get_events_schema).
  • Strict Model Verification: GGUF model integrity enforced via SHA-256 hash and minimum file size checks; models downloaded on-demand to user app data (never bundled).
  • Read-Only Safety: All tools are SELECT-only; no INSERT/UPDATE/DELETE/file writes. Caps on result sizes (50 runs, 200 timeline buckets) prevent resource abuse.
  • Deterministic Fallbacks: If the LLM misbehaves, the coach falls back to a safe default query and still produces an answerβ€”never displays instructions to "use Quick Questions."
  • PySide6 Desktop UI: Native Windows app with tabbed views (Summary, Runs, Skills, Coach) and background workers for non-blocking analysis.
  • PyInstaller One-Click Build: Ships as a standalone EXE with Python runtime and all dependencies (except the GGUF model, which downloads on first launch).
  • Class Context (coming soon): UI shows class dropdown today; backend class-filtered analysis will land in the next iteration.
  • Fair Play: Reads UTF-8 combat log files only; no game hooks, memory reads, packet interception, or automation.

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  PySide6 UI  β”‚  (main.py)
β”‚  (Desktop)   β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚ QPushButton clicks
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   SQLCoach       β”‚  (coach_local.py)
β”‚   Intent Router  β”‚  ─ Detects RUNS, SKILLS, CRIT_BUCKET_TREND, etc.
β”‚   + LLM Planner  β”‚  ─ Plans SQL or returns deterministic answer
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚ MCP client calls
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MCP Client      β”‚  (mcp_client.py)
β”‚  (Subprocess)    β”‚  ─ Spawns `python -m mcp_server`
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚ stdio JSON-RPC
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  MCP Server      β”‚  (mcp_server.py, FastMCP)
β”‚  + DuckDB Store  β”‚  ─ analyze_dps_logs, query_dps, get_analysis_packet
β”‚  (event_store)   β”‚  ─ Safe SELECT templates, no mutations
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚ read logs
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Combat Logs     β”‚  (UTF-8 .txt/.log files)
β”‚  (TL SAVED dir)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Design Choices:

  • MCP as the contract boundary: UI and coach communicate via MCP tools, ensuring the same payload shape for CLI, desktop, and future integrations.
  • Intent-first routing: Deterministic handlers (90% of questions) bypass the LLM entirely, guaranteeing consistent formatting and trace clarity.
  • DuckDB instead of pandas: In-memory SQL engine enables ad-hoc queries without shipping raw events to the UI; query results are capped and safe.

πŸ”’ Safety Guarantees

  • Read-Only Tools: query_dps enforces SELECT-only via AST parse; INSERT/UPDATE/DELETE raise exceptions.
  • Clamped Parameters: last_n_runs limited to [1, 50], top_k_skills to [1, 50], bucket_seconds coerced to allowed values (1, 2, 5, 10, 15, 30, 60).
  • No File Writes in Tools: The MCP server never writes files; all outputs go to stdout (CLI) or returned as JSON (tools).
  • Model Integrity: GGUF files must pass SHA-256 hash and minimum size checks before loading; corrupt or tampered models are rejected.
  • Deterministic Self-Test: Model must respond "OK" to a trivial prompt before the UI enables the coach chat.

🎯 Engineering Signals (for hiring managers)

This project demonstrates professional software engineering practices suitable for production systems:

1. **Contract-Driven Design**

Tools (4)

analyze_dps_logsParses combat logs into actionable DPS metrics.
query_dpsExecutes read-only SQL queries against the in-memory DuckDB event store.
get_analysis_packetReturns a comprehensive analysis packet including run summary, top skills, and timeline buckets.
get_events_schemaRetrieves the schema of the combat event database.

Configuration

claude_desktop_config.json
{"mcpServers": {"dps-coach": {"command": "python", "args": ["-m", "mcp_server"]}}}

Try it

β†’Analyze my recent combat logs and tell me why my crit rate dropped in the last dungeon run.
β†’What were my top 5 skills by damage output in the last 10 runs?
β†’Generate a summary of my performance metrics from the latest combat session.
β†’Query the event store to show me the timeline buckets for my most recent boss fight.

Frequently Asked Questions

What are the key features of DPSCoach?

AI-powered intent routing for natural-language performance questions. In-memory DuckDB event store for fast, read-only SQL analysis. Single-call analysis packet generation for comprehensive performance metrics. Deterministic fallback handlers for consistent query results. Strict read-only safety with clamped parameters to prevent resource abuse.

What can I use DPSCoach for?

Identifying performance bottlenecks in Throne & Liberty dungeon runs. Tracking skill damage trends over multiple combat sessions. Analyzing crit rate fluctuations to optimize character build efficiency. Comparing performance across different combat encounters using SQL-based insights.

How do I install DPSCoach?

Install DPSCoach by running: python -m mcp_server

What MCP clients work with DPSCoach?

DPSCoach works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep DPSCoach docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare