Skip to content

agatho/trinitycore-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrinityCore MCP Server

Build Code Quality Version License TypeScript Node Issues PRs Welcome API Docs

Custom Model Context Protocol server providing 21 enterprise-grade tools for TrinityCore bot development with World of Warcraft 11.2 (The War Within). n## 🆕 What's New in v1.3.0

🚀 Massive API Documentation Expansion - Added 3,756 TrinityCore API documentation files covering Aura, Combat, Creature, and GameObject systems

⚙️ Enterprise Gear Optimizer - Comprehensive stat weight database with 250+ profiles for all 13 classes, 39 specs, and 6 content types based on WoW 11.2 theorycrafting

📁 Documentation Reorganization - Cleaner project structure with all docs moved to doc/ subdirectory

See Full Release Notes →

Features

Phase 1: Foundation

  • Game Data Queries: Query spells, items, quests, creatures from World database
  • DBC/DB2 Reading: Parse and query client-side database files
  • GameTable (GT) Files: Access critical game calculation tables
    • Combat ratings (crit, haste, mastery) per level
    • Experience required per level
    • Base mana per class and level
    • Health per stamina
    • Spell scaling factors
    • Item level calculations
    • Battle pet progression
  • Trinity API Docs: Access TrinityCore C++ API documentation
  • Opcode Information: Get packet opcode documentation and structure
  • Spell System: Detailed spell data with effects, auras, and mechanics
  • Item Database: Item properties, stats, and requirements
  • Quest System: Quest chains, objectives, and rewards

Phase 2: Core Systems

  • Talent Optimization: Recommended talent builds for all specs and purposes (leveling, raid, PvP, dungeon)
  • Combat Mechanics: Melee/spell damage calculations, armor mitigation, DPS estimates
  • Buff Optimization: Optimal buff and consumable recommendations based on activity and budget
  • Dungeon/Raid Strategy: Boss mechanics, pull strategies, trash routes, loot priorities
  • Economy/Auction House: Item pricing analysis, market trends, crafting profitability
  • Reputation System: Optimal reputation grinding paths with time estimates
  • Multi-Bot Coordination: Raid cooldown coordination, formation management, group synergy

Phase 3: Advanced Features

  • PvP Arena/BG Tactician: Arena composition analysis, battleground strategies, PvP talent builds
  • Quest Route Optimizer: Optimal quest routing, leveling paths, XP/hour calculations
  • Collection Manager: Pet/mount/toy tracking, farming routes, completion planning

Installation

cd C:\TrinityBots\trinitycore-mcp
npm install
npm run build

Configuration

Create .env file:

TRINITY_DB_HOST=localhost
TRINITY_DB_PORT=3306
TRINITY_DB_USER=trinity
TRINITY_DB_PASSWORD=your_password
TRINITY_ROOT=C:\TrinityBots\TrinityCore
DBC_PATH=C:\TrinityBots\Server\data\dbc
DB2_PATH=C:\TrinityBots\Server\data\db2
MCP_PORT=3000

Usage

Start Server

npm start

For detailed configuration instructions, see MCP_CONFIGURATION.md

Configure in Claude Code

Add to .claude/mcp-servers-config.json:

{
  "trinitycore": {
    "command": "node",
    "args": ["C:\\TrinityBots\\trinitycore-mcp\\dist\\index.js"],
    "env": {
      "TRINITY_DB_HOST": "localhost",
      "TRINITY_DB_USER": "trinity",
      "TRINITY_DB_PASSWORD": "${TRINITY_DB_PASSWORD}"
    }
  }
}

Available Tools

Total: 21 MCP Tools across 3 development phases

Phase 1: Foundation Tools (6 tools)

get-spell-info

Get detailed spell information:

{
  "spellId": 1234
}

get-item-info

Get item data:

{
  "itemId": 5678
}

get-quest-info

Get quest information:

{
  "questId": 9012
}

query-dbc

Query DBC file:

{
  "dbcFile": "Spell.dbc",
  "recordId": 1234
}

get-trinity-api

Get TrinityCore API documentation:

{
  "className": "Player"
}

get-opcode-info

Get opcode documentation:

{
  "opcode": "CMSG_CAST_SPELL"
}

Phase 2: Core Systems (7 tools)

get-recommended-talent-build

Get optimized talent build for a specialization:

{
  "specId": 71,
  "purpose": "raid",
  "playerLevel": 60
}

calculate-melee-damage

Calculate expected melee damage output:

{
  "weaponDPS": 150.5,
  "attackSpeed": 2.6,
  "attackPower": 2500,
  "critRating": 1200,
  "level": 60
}

get-buff-recommendations

Get optimal buff and consumable recommendations:

{
  "classId": 1,
  "specId": 71,
  "activity": "raid",
  "budget": "medium"
}

get-dungeon-strategy

Get comprehensive dungeon/raid strategy:

{
  "dungeonId": 36,
  "difficulty": "heroic",
  "groupComp": ["tank", "healer", "dps", "dps", "dps"]
}

analyze-auction-item

Analyze auction house pricing and trends:

{
  "itemId": 172230,
  "realm": "Area-52"
}

get-reputation-path

Get optimal reputation grinding path:

{
  "factionId": 1134,
  "currentStanding": "friendly",
  "targetStanding": "exalted"
}

coordinate-cooldowns

Coordinate raid cooldowns across multiple bots:

{
  "bots": [
    {
      "name": "BotTank",
      "classId": 1,
      "role": "tank",
      "cooldowns": [...]
    }
  ],
  "encounterDuration": 300
}

Phase 3: Advanced Features (8 tools)

analyze-arena-composition

Analyze PvP arena team composition:

{
  "bracket": "3v3",
  "team": [
    {
      "classId": 4,
      "className": "Rogue",
      "specId": 259,
      "role": "melee_dps",
      "rating": 2400
    }
  ],
  "rating": 2400
}

get-battleground-strategy

Get battleground strategy and tactics:

{
  "bgId": 2
}

get-pvp-talent-build

Get PvP-optimized talent build:

{
  "specId": 259,
  "bracket": "3v3"
}

optimize-quest-route

Optimize quest completion route for a zone:

{
  "zoneId": 14,
  "playerLevel": 20,
  "maxQuests": 30
}

get-leveling-path

Get optimal multi-zone leveling path:

{
  "startLevel": 10,
  "targetLevel": 60,
  "faction": "alliance"
}

get-collection-status

Get collection progress status:

{
  "type": "mount",
  "accountId": 1
}

find-missing-collectibles

Find missing collectibles by rarity:

{
  "type": "pet",
  "minRarity": "rare"
}

get-farming-route

Get optimized farming route for a collectible:

{
  "collectibleId": 32768,
  "type": "mount"
}

GameTable Tools

query-gametable

Query a GameTable file:

{
  "tableName": "CombatRatings.txt",
  "rowId": 60,
  "maxRows": 100
}

list-gametables

List all available GameTables:

{}

get-combat-rating

Get combat rating for a level:

{
  "level": 60,
  "statName": "Crit - Melee"
}

get-character-stats

Get character stats for a level:

{
  "level": 60,
  "className": "Mage"
}

Development

Project Structure

trinitycore-mcp/
├── src/
│   ├── index.ts           # Main server entry point
│   ├── tools/
│   │   ├── spell.ts       # Spell-related tools
│   │   ├── item.ts        # Item-related tools
│   │   ├── quest.ts       # Quest-related tools
│   │   ├── dbc.ts         # DBC/DB2 reader
│   │   ├── api.ts         # Trinity API docs
│   │   └── opcode.ts      # Opcode documentation
│   ├── database/
│   │   ├── connection.ts  # MySQL connection
│   │   └── queries.ts     # SQL queries
│   └── utils/
│       ├── parser.ts      # DBC/DB2 parser
│       └── cache.ts       # Caching layer
├── package.json
├── tsconfig.json
└── README.md

Build

npm run build

Watch Mode

npm run dev

Test

npm test

Examples

Query Spell Data

// Get Fireball spell
const fireball = await tools.getSpellInfo({ spellId: 133 });
console.log(fireball.name); // "Fireball"
console.log(fireball.effects); // Array of spell effects

Read DBC File

// Read spell DBC record
const spellRecord = await tools.queryDBC({
  dbcFile: "Spell.dbc",
  recordId: 133
});

Get API Documentation

// Get Player class API
const playerAPI = await tools.getTrinityAPI({
  className: "Player"
});
console.log(playerAPI.methods); // Available methods

License

GPL-2.0 (same as TrinityCore)

Contributing

Contributions welcome! Please follow TrinityCore coding standards.

Support

For issues or questions, create an issue in the Playerbot repository.