Content
# POE2 Bundles2 Resource Reading MCP Server
Implementing a MCP server for POE2 game resource reading, helping you quickly analyze POE2 game resources.
Implemented a complete POE2 game resource reading MCP server, including:
1. MCP SDK-based server framework, supporting stdio transmission and tool registration
2. Oodle decompression P/Invoke encapsulation, supporting parsing of POE2 bundle files
3. Bundles2 index parsing and file reading core logic
4. 12 MCP tools, covering session management, directory browsing, file reading, and file analysis
5. Singleton session caching, avoiding repeated parsing of index files
## Project Configuration (oo2core.dll can be obtained from Poe2PriceGUI)
```
<ItemGroup>
<!-- Oodle decompression DLL: POE2 bundle uses Oodle compression, requires oo2core.dll at runtime -->
<None Include="..\..\libs\bundle\oo2core.dll">
<Link>oo2core.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
```
## Default Path
```
BundleSession.cs allows setting the default path; otherwise, the MCP game path needs to be provided.
```
## Configuration Method
```
{
"mcpServers": {
"poe2-bundle": {
"command": "\"e:\\mcp_bundle_server\\bin\\Release\\Poe2BundleMcpServer.exe\"",
"args": [],
"env": {
"START_MCP_TIMEOUT_MS": "60000",
"RUN_MCP_TIMEOUT_MS": "120000"
}
}
}
}
```
## Capability Description
### Session Management
- `set_game_dir` - Set the POE2 game directory and open Bundles2/_.index.bin. Use the default WeGame directory for an empty path.
- `get_status` - Get the current session status (whether opened, game directory, bundle count, file count).
### Directory Browsing
- `list_bundles` - List all bundles in the index (filtered by prefix, paginated). Return each bundle's name and file count.
- `list_paths` - List paths in the index (filtered by prefix and extension, paginated). Return each path's path/bundleName/size.
- `list_directory` - List direct sub-items (subdirectories and files) under a specified virtual directory, similar to ls. An empty string represents the root directory.
- `search_paths` - Search for paths (containing a specified substring, case-insensitive).
### File Reading
- `get_file_info` - Get detailed information about a single file (path/bundleName/offset/size/hash).
- `read_file` - Read file content (automatically detect encoding), return text preview and base64 fragments. Suitable for quickly viewing file structure.
- `read_file_text` - Read the entire file text (automatically detect UTF-16/UTF-8). Only for text format files.
- `read_file_base64` - Read file raw bytes (base64 encoded). For binary files (.epk/.pet/.trl, etc.).
### File Analysis
- `analyze_ao` - Analyze .ao/.aoc file structure, identify cleared sub-blocks, and classify modification methods.