GW2 MCP Server
Connects Large Language Models (LLMs) with Guild Wars 2 data sources. Requires a Guild Wars 2 API key for wallet functionality.
GW2 MCP Server
A Model Context Provider (MCP) server for Guild Wars 2 that bridges Large Language Models (LLMs) with Guild Wars 2 data sources.
Features
- Wiki Search: Search and retrieve content from the Guild Wars 2 wiki
- Wallet Information: Access user wallet and currency data via GW2 API
- Smart Caching: Efficient caching with appropriate TTL for static and dynamic data
- Rate Limiting: Respectful API usage with built-in rate limiting
- Extensible Architecture: Modular design for easy feature additions
Requirements
- Go 1.24 or higher
- Guild Wars 2 API key (for wallet functionality)
Installation
- Clone the repository:
git clone https://github.com/AlyxPink/gw2-mcp.git
cd gw2-mcp
- Install dependencies:
go mod tidy
- Build the server:
go build -o gw2-mcp ./cmd/server
Usage
Running the Server
The MCP server communicates via stdio (standard input/output):
./gw2-mcp
You can configure Claude Desktop, LM Studio, or other LLM tools to interact with the server using this configuration:
{
"mcpServers": {
"gw2-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"alyxpink/gw2-mcp:v1"
]
}
}
}
MCP Tools
The server provides the following tools for LLM interaction:
1. Wiki Search (wiki_search)
Search the Guild Wars 2 wiki for information.
Parameters:
query(required): Search query stringlimit(optional): Maximum number of results (default: 5)
Example:
{
"tool": "wiki_search",
"arguments": {
"query": "Dragon Bash",
"limit": 3
}
}
2. Get Wallet (get_wallet)
Retrieve user's wallet information including all currencies.
Parameters:
api_key(required): Guild Wars 2 API key with account scope
Example:
{
"tool": "get_wallet",
"arguments": {
"api_key": "YOUR_GW2_API_KEY"
}
}
3. Get Currencies (get_currencies)
Get information about Guild Wars 2 currencies.
Parameters:
ids(optional): Array of specific currency IDs to fetch
Example:
{
"tool": "get_currencies",
"arguments": {
"ids": [1, 2, 3]
}
}
MCP Resources
The server provides the following resources:
Currency List (gw2://currencies)
Complete list of all Guild Wars 2 currencies with metadata.
API Key Setup
To use wallet functionality, you need a Guild Wars 2 API key:
- Visit Guild Wars 2 API Key Management
- Create a new API key with the following permissions:
account- Required for wallet accesswallet- Required for currency information
- Copy the generated API key
Security Note: API keys are hashed before caching for security. Never share your API key.
Caching Strategy
The server implements intelligent caching:
- Static Data (currencies, wiki content): Cached for 24 hours to 1 year
- Dynamic Data (wallet balances): Cached for 5 minutes
- Search Results: Cached for 24 hours
Architecture
The project follows Clean Architecture principles:
internal/
├── server/ # MCP server implementation
├── cache/ # Caching layer
├── gw2api/ # GW2 API client
└── wiki/ # Wiki API client
Development
Code Standards
- Format code with
gofumpt - Lint with
golangci-lint - Write unit tests for core functionality
- Follow conventional commit messages
Running Tests
go test ./...
Linting
golangci-lint run
Formatting
gofumpt -w .
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Run linting and formatting
- Submit a pull request
License
GNU Affero General Public License v3.0 - see LICENSE file for details.
Acknowledgments
- Guild Wars 2 API for providing comprehensive game data
- Guild Wars 2 Wiki for extensive game documentation
- MCP Go for the MCP implementation framework
Related Servers
MCP Server Market
A centralized repository for discovering and utilizing Model Context Protocol (MCP) servers.
Search Movie
一个基于 Model Context Protocol (MCP) 构建的智能电影和电视剧资源搜索工具,支持多源搜索和链接验证。An intelligent movie and TV series resource search tool based on Model Context Protocol (MCP), supporting multi-source search and link verification.
APOLOGY-AS-A-SERVICE
A live Model Context Protocol (MCP) server that provides context-aware crisis communication for AI agents
Poof
Background removal API - remove backgrounds from images with a simple API call. Supports PNG, JPEG, WebP output with transparency or custom backgrounds.
Upstox MCP server
A MCP server for integrating with the Upstox trading API by Upstox.
Quiz MCP
MCP server for interactive quizzes
Flux Image MCP Server
Generate images using Replicate's Flux Schnell model.
Currency And Oil
Zenrus MCP Server 是一个提供实时货币汇率和石油价格的服务器,支持多种计算功能,适用于金融分析和自动化工具集成。
winforensics-mcp
A comprehensive MCP server for Windows digital forensics on KALI Linux
MCP Location Services for LLM
Provides geocoding, reverse geocoding, routing, and driving distance calculations for LLMs using pgGeocoder and pgrServer.