The Pokémon VGC Damage Calculator MCP Server provides a standardized interface for AI agents to perform accurate Pokémon damage calculations using the @smogon/calc
package. It offers comprehensive input handling for Pokémon stats, abilities, items, moves, and field conditions through a Model-Context Protocol (MCP) compliant implementation.
You can install the package globally using npm:
npm install -g pokemon-vgc-calc-mcp
Configure your MCP client (Claude Desktop, Cursor, etc.) by adding the following to your configuration:
{
"mcpServers": {
"pokemon-calc": {
"command": "npx",
"args": ["pokemon-vgc-calc-mcp"],
"env": {}
}
}
}
If you prefer to run the server locally:
git clone https://github.com/jpbullalayao/pokemon-vgc-calc-mcp.git
npm install
npm run build
Then configure your MCP client with:
{
"mcpServers": {
"pokemon-calc": {
"command": "node",
"args": ["path/to/pokemon-vgc-calc-mcp/dist/index.js"],
"env": {}
}
}
}
The server provides one primary tool: calculateDamage
This tool calculates battle damage between an attacking and defending Pokémon.
attacker
: Pokémon object with species, level, stats, ability, item, etc.defender
: Pokémon object with species, level, stats, ability, item, etc.move
: Move object with name and optional critical hit flagfield
: Field conditions including weather, terrain, and side effectsdescription
: Human-readable calculation resultdamage
: [min, max] damage rangekoChance
: Knock-out probability descriptionfullResult
: Complete result object from smogon/calcHere's an example of how to use the tool:
{
"attacker": {
"species": "Pikachu",
"level": 50,
"ability": "Static",
"item": "Light Ball",
"nature": "Timid",
"evs": { "spa": 252, "spe": 252, "hp": 4 }
},
"defender": {
"species": "Charizard",
"level": 50,
"ability": "Blaze"
},
"move": {
"name": "Thunderbolt"
},
"field": {
"gameType": "Singles"
}
}
Output:
**252 SpA Light Ball Pikachu Thunderbolt vs. 0 HP / 0 SpD Charizard: 198-234 (107 - 126.4%) -- guaranteed OHKO**
Damage: 198-234
KO Chance: guaranteed OHKO
You can test the MCP server using the MCP Inspector:
npm run build
npx @modelcontextprotocol/inspector node path/to/pokemon-vgc-calc-mcp/dist/index.js
Try this example to verify your setup:
{
"attacker": {
"species": "Chien-Pao",
"nature": "Jolly",
"evs": {
"atk": 252,
"spe": 252,
"hp": 4
},
"level": 50
},
"defender": {
"species": "Flutter Mane",
"nature": "Modest",
"evs": {
"hp": 164,
"def": 100
},
"level": 50
},
"move": {
"name": "Icicle Crash"
},
"field": {}
}
**252 Atk Sword of Ruin Chien-Pao Icicle Crash vs. 164 HP / 100 Def Flutter Mane: 126-148 (83.4 - 98%) -- guaranteed 2HKO**
Damage: 126-148
KO Chance: guaranteed 2HKO
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "pokemon-calc" '{"command":"npx","args":["pokemon-vgc-calc-mcp"],"env":[]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"pokemon-calc": {
"command": "npx",
"args": [
"pokemon-vgc-calc-mcp"
],
"env": []
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"pokemon-calc": {
"command": "npx",
"args": [
"pokemon-vgc-calc-mcp"
],
"env": []
}
}
}
3. Restart Claude Desktop for the changes to take effect