Alternative AI provider for powering natural language build queries and optimization recommendations, configurable through the server's AI settings.
Provides tools for analyzing Path of Exile 2 characters, retrieving character data via the official PoE API, optimizing builds, and offering AI-powered recommendations for gear, passives, and skills with natural language queries.
Path of Exile 2 Build Optimizer MCP
A comprehensive Model Context Protocol (MCP) server and web application for Path of Exile 2 character optimization, featuring AI-powered build recommendations, local game database, and intelligent upgrade suggestions.
Overview
This project combines the power of MCP servers, AI analysis, and comprehensive PoE2 game knowledge to provide players with intelligent, personalized build recommendations through natural language interaction.
Key Features
MCP Server
Character Data Fetcher: Pulls character information via official PoE API
Natural Language Interface: Ask questions like "How can I increase my lightning damage?"
Build Optimization: AI-powered recommendations for gear, passives, and skills
Rate-Limited API: Respectful API usage with intelligent caching
Local Game Database
Complete item database (bases, modifiers, uniques)
Passive skill tree data (nodes, connections, keystones)
Skill gems and support interactions
Ascendancy classes and notables
Crafting bench options and influenced modifiers
AI-Powered Features
Natural language build queries
Goal-based optimization (DPS, survivability, boss killing, clear speed)
Trade-off analysis
Budget-aware recommendations (low/medium/high/unlimited)
Meta comparison and trends
Build Calculator
Accurate DPS calculations with all modifiers
Defense analysis (EHP, mitigation, avoidance)
Damage breakdown by type
Skill interaction calculations
Curse and aura effectiveness
Web Interface
Character import via account/character name
Visual passive tree with optimization highlights
Gear slot recommendations with trade links
Build sharing and saving
Real-time calculation updates
Path of Building Integration
Import PoB build codes
Export optimized builds to PoB format
Sync with PoB's calculation engine
Support for PoB Community Fork features
Quick Start
Prerequisites
Python 3.9+
Node.js 18+ (for web interface)
Git
Installation
Running the Server
Access the web interface at http://localhost:3000
Trade API Authentication
The MCP server can search the official Path of Exile trade site to recommend gear upgrades. This requires authentication to prevent bot abuse.
Automated Setup (Recommended - 2 Minutes)
What happens:
Browser opens to pathofexile.com/trade
You log in with your account (supports 2FA)
Script automatically detects login and extracts your session cookie
Cookie is saved to
.envfileDone! Trade search now works
See
Detailed step-by-step guide
Troubleshooting common issues
Security information
Cookie expiration details
Manual Setup (Fallback)
If the automated method doesn't work:
Visit https://www.pathofexile.com/trade in your browser
Log in to your account
Press F12 to open DevTools
Go to Application → Cookies → pathofexile.com
Find the
POESESSIDcookieCopy its value (32-character string)
Add to your
.envfile:POESESSID=your_cookie_value_here
Usage
Via Web Interface
Navigate to
http://localhost:3000Enter your account name and character name
Click "Analyze Character"
Review recommendations and optimization suggestions
Via MCP Protocol
Via Command Line
Architecture
Core Components
Web Interface
Database Schema
Core Tables
items: All item bases and types
modifiers: Item modifiers and their values
passive_nodes: Passive tree nodes
passive_connections: Tree node connections
skills: Skill gems data
supports: Support gem data
uniques: Unique item data
ascendancies: Ascendancy classes
crafting: Crafting bench recipes
User Tables
saved_builds: User-saved builds
build_snapshots: Historical build versions
optimization_history: Past optimizations
API Integration
Official PoE API
Character data retrieval
Account information
Ladder rankings (with rate limiting)
Stash tab data (optional)
Rate Limiting Strategy
Caching Strategy
L1 Cache: In-memory (5 minutes)
L2 Cache: Redis (1 hour)
L3 Cache: SQLite (persistent)
AI Integration
Natural Language Queries
Context-Aware Responses
The AI maintains context about:
Current character state
Previous questions
Build goals
Budget constraints
Playstyle preferences
Development
Running Tests
Code Quality
Database Migrations
Configuration
Configuration is managed via environment variables and config.yaml:
Security & Privacy
No Credential Storage: Uses OAuth flow for PoE account access
Local-First: All character data cached locally
Optional Cloud Sync: Encrypted cloud backup (opt-in)
Rate Limit Enforcement: Prevents API abuse
Data Encryption: All saved builds encrypted at rest
Performance
Sub-second Analysis: Most character analyses complete in <500ms
Parallel Calculations: Multi-threaded build calculations
Intelligent Caching: Reduces API calls by 90%+
WebSocket Updates: Real-time updates without polling
CDN Assets: Static assets served via CDN
Contributing
This is a personal project, but contributions are welcome!
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
Roadmap
Phase 1 (Current)
MCP server foundation
Basic character analysis
Local database setup
API integration with rate limiting
Phase 2
Build calculator engine
Gear optimization
Passive tree optimization
Web interface MVP
Phase 3
AI natural language queries
Path of Building integration
Trade integration
Build sharing
Phase 4
Advanced AI insights
Meta trend analysis
Build version tracking
Mobile app
License
Private project for personal use.
Credits
Built with data from:
poe2db.tw - Comprehensive PoE2 game data
poe.ninja - Meta builds and economy data
Path of Exile 2 by Grinding Gear Games
Built for the PoE2 community | Report Issues
This server cannot be installed