Are you the author? Sign in to claim
Model Context Protocol server for TrinityCore development
Enterprise-grade Model Context Protocol server providing 107 MCP tools for TrinityCore bot development with World of Warcraft 12.0 (Midnight). Includes comprehensive game data access, AI-powered code analysis, performance profiling, and a full-featured web interface.
# Clone repository
git clone https://github.com/agatho/trinitycore-mcp.git
cd trinitycore-mcp
# Install dependencies
npm install
# Build TypeScript
npm run build
# Start both MCP server and Web UI
npm run start:all
Web UI will open at: http://localhost:3000
The TrinityCore MCP Server is a comprehensive development platform for building and managing TrinityCore PlayerBots. It provides:
The included web interface provides 36+ interactive pages for comprehensive TrinityCore development:
# 1. Clone repository
git clone https://github.com/agatho/trinitycore-mcp.git
cd trinitycore-mcp
# 2. Install dependencies
npm install
# 3. Build TypeScript to JavaScript
npm run build
# 4. Verify build output
ls dist/
# Should see: index.js, tools/, database/, etc.
# Install Web UI dependencies
cd web-ui
npm install
cd ..
Create .env file in project root:
# TrinityCore Database (Required for game data queries)
TRINITY_DB_HOST=localhost
TRINITY_DB_PORT=3306
TRINITY_DB_USER=trinity
TRINITY_DB_PASSWORD=your_password
TRINITY_DB_AUTH=auth
TRINITY_DB_CHARACTERS=characters
TRINITY_DB_WORLD=world
# TrinityCore Paths (Optional - for DBC/DB2 reading)
TRINITY_ROOT=C:\TrinityBots\TrinityCore
DBC_PATH=C:\TrinityBots\Server\data\dbc
DB2_PATH=C:\TrinityBots\Server\data\db2
# VMap/MMap Paths (Optional - for height/pathfinding)
VMAP_DATA_PATH=C:\TrinityBots\Server\data\vmaps
MMAP_DATA_PATH=C:\TrinityBots\Server\data\mmaps
# MCP Server (Optional - defaults shown)
MCP_PORT=3000
MCP_HOST=localhost
Add to .claude/mcp-servers-config.json or claude_desktop_config.json:
{
"mcpServers": {
"trinitycore": {
"command": "node",
"args": ["C:\\TrinityBots\\trinitycore-mcp\\dist\\index.js"],
"env": {
"TRINITY_DB_HOST": "localhost",
"TRINITY_DB_PORT": "3306",
"TRINITY_DB_USER": "trinity",
"TRINITY_DB_PASSWORD": "${TRINITY_DB_PASSWORD}",
"TRINITY_ROOT": "C:\\TrinityBots\\TrinityCore",
"DBC_PATH": "C:\\TrinityBots\\Server\\data\\dbc",
"DB2_PATH": "C:\\TrinityBots\\Server\\data\\db2"
}
}
}
}
For detailed configuration, see MCP_CONFIGURATION.md
npm run start:all
This will:
# Production mode (stdio transport)
npm start
# or
npm run start:mcp
# Development mode (watch for changes)
npm run dev
npm run start:web
Starts Next.js development server on http://localhost:3000
The MCP server provides 107 registered tools organized into the following categories:
| Category | Tools | Description |
|---|---|---|
| Game Data | 40 | Spells, items, quests, creatures, world data, DBC/DB2, GameTables |
| Combat & Optimization | 12 | Talents, combat mechanics, buffs, dungeon strategy |
| Economy & Social | 8 | Item pricing, reputation, professions |
| Group & PvP | 8 | Coordination, arena, battlegrounds |
| Collections & Leveling | 7 | Collectibles, quest routing, zone analysis |
| Knowledge & Codegen | 12 | Documentation, code generation, API reference |
| Performance & Testing | 9 | Performance analysis, testing, coverage |
| Database | 11 | Schema, export/import, backup/restore |
| AI Code Review | 11 | Code review, thread safety, memory analysis, bot AI |
| Production & Monitoring | 11 | Health monitoring, logging, backups, security |
| VMap & MMap | 8 | Height detection, pathfinding |
| Configuration & Tests | 8 | Config management, AI test generation |
get-spell-info - Get detailed spell information by ID
get-item-info - Get item data by ID
get-quest-info - Get quest information by ID
query-dbc - Query DBC/DB2 file by record ID
get-trinity-api - Get TrinityCore C++ API documentation
get-opcode-info - Get network packet opcode documentation
query-gametable - Query GameTable files (CombatRatings.txt, xp.txt, etc.)
list-gametables - List all available GameTable files
get-combat-rating - Get combat rating conversion for level
get-character-stats - Get character base stats for level
// Get spell information
const fireball = await callMCPTool("get-spell-info", { spellId: 133 });
// Analyze bot performance
const perf = await callMCPTool("analyze-bot-performance", {
duration: 60000,
sampleInterval: 1000
});
// Review C++ code
const review = await callMCPTool("review-code-file", {
filePath: "src/modules/Playerbot/BotAI.cpp",
minConfidence: 0.7
});
// Optimize quest route
const route = await callMCPTool("optimize-quest-route", {
zone: "Elwynn Forest",
level: 5
});
For complete tool documentation, see the Web UI API Explorer at http://localhost:3000/playground
Start the Web UI:
# Start both MCP server and Web UI
npm run start:all
# Or start Web UI only
npm run start:web
Access at: http://localhost:3000
✅ 36+ Interactive Pages ✅ 107 MCP Tools Integration ✅ Real-time Database Access ✅ Advanced Search & Filtering ✅ Data Export (CSV, Excel, JSON, PDF, XML) ✅ AI Code Review (1,020 rules) ✅ Bot AI Visualization (Mermaid flowcharts) ✅ Server Monitoring (Real-time metrics) ✅ Dark Mode (Optimized for development) ✅ Responsive Design (Desktop, tablet, mobile)
# Build TypeScript to JavaScript
npm run build
# Watch mode (rebuild on changes)
npm run dev
# Run tests
npm test
# Or use MCP testing tools via Claude Code
npm run lint
trinitycore-mcp/
├── src/
│ ├── index.ts # Main MCP server entry point
│ ├── tools/ # 107 tool implementations (58 files)
│ │ ├── spell.ts
│ │ ├── item.ts
│ │ ├── quest.ts
│ │ ├── dbc.ts
│ │ ├── codereview.ts
│ │ ├── performance.ts
│ │ └── ... (52 more)
│ ├── database/
│ │ └── connection.ts # MySQL connection pool
│ ├── parsers/
│ │ ├── dbc/ # DBC/DB2 parsers
│ │ └── cache/ # Caching system
│ └── utils/
│ └── logger.ts
├── web-ui/ # Next.js 16 web interface
│ ├── app/ # App Router pages (36+ pages)
│ ├── components/ # React components
│ ├── lib/ # Utilities and MCP client
│ └── public/ # Static assets
├── data/
│ └── api_docs/ # 3,800+ API documentation files
├── tests/ # Test suites
├── dist/ # Compiled JavaScript (build output)
├── package.json # v0.9.0-RC1
├── tsconfig.json
└── README.md # This file
Contributions welcome! Please follow TrinityCore coding standards.
git checkout -b feature/amazing-featurenpm run build && npm testgit push origin feature/amazing-featureGPL-2.0 (same as TrinityCore)
See LICENSE file for details.
Version: 0.9.0-RC1 (Release Candidate 1) Status: ✅ Production Ready MCP Tools: 107 registered tools Web UI Pages: 36+ interactive pages Last Updated: 2025-11-08
Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots
Google's universal MCP server supporting PostgreSQL, MySQL, MongoDB, Redis, and 10+ databases
Official GitHub integration for repos, issues, PRs, and CI/CD workflows