Christian Gomez
Copied [email protected] to clipboard ✓

wowhead-agent & Lodestar: 0.72ms SQLite FTS5 MCP Server (39.4K Entities) & Open-Source Lua Engine

Built a sub-millisecond Model Context Protocol (MCP) server decoding binary CBOR game tables into a 10.8 MB SQLite FTS5 database (39,476 entities, 99.5% token savings), plus a 50+ file MIT-licensed Lua leveling addon and 40-zone Encounter Journal.

0.72ms
SQLite FTS5 MCP Query Latency
39,476
Items, NPCs & Quests Indexed (<2.5s)
99.5%
LLM Context Token Reduction vs. Web Scraping
50+ Files
MIT-Licensed Lua Addons (Lodestar & Gentle Guide)
01 · BINARY EXTRACT
CBOR Client Tables
QuestieDB & DungeonJournal
02 · FTS5 COMPILER
10.8 MB SQLite DB
39,476 entities in <2.5s
03 · MCP SERVER
6 Typed Agent Tools
0.72ms lookup · ~100 tokens
04 · IN-GAME LUA
Lodestar & Questie Fork
Live server quest harvesting
05 · COZY UI ENGINE
Gentle Adventure Guide
40 zones & 25 dungeons UI

STAR Engineering Breakdown

01 · The Problem

AI agents querying World of Warcraft databases via web scraping burn 15MB+ of HTML (tens of thousands of tokens) per lookup, while the custom WoW: Forever client stripped quest text from client tables and enforced strict C_Secrets combat sandboxing.

02 · wowhead-agent (0.72ms SQLite FTS5 MCP Server)

Built a Model Context Protocol (MCP) server that decodes CBOR-encoded game client tables into an embedded 10.8 MB SQLite FTS5 database—indexing 21,155 items, 13,311 NPCs, and 5,010 quests (39,476 total entities) in under 2.5 seconds.

03 · Lodestar, Gentle Adventure Guide & Questie Contributions

Authored Lodestar (a 50+ file, 100% MIT-licensed in-game Lua leveling guide, waypoint arrow, and speedrun split tracker that harvests missing server data live), Gentle Adventure Guide (a cozy 3-card Encounter Journal covering 40 Classic zones and 25 dungeons), and hybrid-client fixes for Questie.

04 · Verified Results

Cut AI agent lookup latency from multi-second HTTP scrapes to 0.72ms local FTS5 queries and reduced LLM token usage by ~99.5% (~50–200 tokens per response).

wowhead_mcp_fts5.py
0.72ms FTS5
def search_database(conn, query: str, entity_type: str = "all", limit: int = 10):
    sql = """
      SELECT entity_id, entity_type, name, subtitle, metadata_json
      FROM entities_fts WHERE entities_fts MATCH ? LIMIT ?
    """
    return [dict(row) for row in conn.execute(sql, (query, limit)).fetchall()]
✓ 39,476 entities indexed in 2.4s · 0.72ms average FTS5 query latency

Benchmark Table

METRICMANUAL BASELINEPROGRAMMATIC ENGINE
AI Agent Game Database Lookup15 MB HTML Scrape (~25,000+ Tokens)0.72ms SQLite FTS5 (~100 Tokens / -99.5%)
Total Indexed Game EntitiesFragmented Lua / CBOR Files39,476 Unified Entities (Items, NPCs, Quests)
In-Game Leveling & DiscoveryPaywalled Addons & Broken Client TablesMIT Open-Source Lodestar + 40-Zone Gentle Guide