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.
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).
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()]Benchmark Table
| METRIC | MANUAL BASELINE | PROGRAMMATIC ENGINE |
|---|---|---|
| AI Agent Game Database Lookup | 15 MB HTML Scrape (~25,000+ Tokens) | 0.72ms SQLite FTS5 (~100 Tokens / -99.5%) |
| Total Indexed Game Entities | Fragmented Lua / CBOR Files | 39,476 Unified Entities (Items, NPCs, Quests) |
| In-Game Leveling & Discovery | Paywalled Addons & Broken Client Tables | MIT Open-Source Lodestar + 40-Zone Gentle Guide |