getcompetitive 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +165 -0
- package/dist/archetypes.js +712 -0
- package/dist/archetypes.js.map +1 -0
- package/dist/dex.js +414 -0
- package/dist/dex.js.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/regulations.data.js +854 -0
- package/dist/regulations.data.js.map +1 -0
- package/dist/regulations.js +91 -0
- package/dist/regulations.js.map +1 -0
- package/dist/result.js +50 -0
- package/dist/result.js.map +1 -0
- package/dist/threats.js +336 -0
- package/dist/threats.js.map +1 -0
- package/dist/tools/analyze.js +268 -0
- package/dist/tools/analyze.js.map +1 -0
- package/dist/tools/calc.js +718 -0
- package/dist/tools/calc.js.map +1 -0
- package/dist/tools/data.js +763 -0
- package/dist/tools/data.js.map +1 -0
- package/dist/tools/meta.js +158 -0
- package/dist/tools/meta.js.map +1 -0
- package/dist/tools/regulations.js +332 -0
- package/dist/tools/regulations.js.map +1 -0
- package/dist/tools/schemas.js +13 -0
- package/dist/tools/schemas.js.map +1 -0
- package/dist/tools/team.js +221 -0
- package/dist/tools/team.js.map +1 -0
- package/package.json +48 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 getcompetitive contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# getcompetitive
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/getcompetitive)
|
|
4
|
+
[](https://github.com/mriver15/getcompetitive/actions/workflows/ci.yml)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
[](#install)
|
|
7
|
+
[](https://glama.ai/mcp/servers/mriver15/getcompetitive)
|
|
8
|
+
|
|
9
|
+
A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that gives
|
|
10
|
+
AI agents everything needed to build, analyze, and validate competitive Pokémon
|
|
11
|
+
teams — including **Pokémon Champions / VGC** regulations.
|
|
12
|
+
|
|
13
|
+
## What it provides
|
|
14
|
+
|
|
15
|
+
- **25 tools** across five domains: data, team building, meta (curated), battle mechanics, and official regulation sets
|
|
16
|
+
- **Structured, agent-first definitions** — every tool declares MCP annotations and an output schema, returns `structuredContent` alongside JSON text, and documents all of its parameters; the deterministic half of the [TDQS](https://tdqs.dev) checklist is linted in CI
|
|
17
|
+
- Full **Pokémon Showdown** competitive dataset — species, alternate forms, stats, moves, items, abilities, natures, learnsets, types, tiers
|
|
18
|
+
- **Battle math** from Smogon's calculator — stat calculation and full damage calculation (weather, terrain, boosts, items, Tera)
|
|
19
|
+
- **Official Regulation Sets** (M-A → M-C) with seasonal legal rosters and team legality checking
|
|
20
|
+
- Generation-aware data (1–9, default 9)
|
|
21
|
+
|
|
22
|
+
Built on [`@pkmn/dex`](https://github.com/pkmn/EPOKe) (Showdown data) and
|
|
23
|
+
[`@smogon/calc`](https://github.com/smogon/calc) (battle math).
|
|
24
|
+
|
|
25
|
+
## Tools
|
|
26
|
+
|
|
27
|
+
### Data
|
|
28
|
+
| Tool | Purpose |
|
|
29
|
+
| --- | --- |
|
|
30
|
+
| `get_pokemon` | Types, base stats, BST, abilities, tiers, forms, weight, gender, evolutions |
|
|
31
|
+
| `list_forms` | All forms of a species (alternate, cosmetic, battle-only) |
|
|
32
|
+
| `search` | Fuzzy name search across species / moves / items / abilities / natures |
|
|
33
|
+
| `get_move` | Type, category, power, accuracy, PP, priority, target, secondary effects |
|
|
34
|
+
| `get_item` | Effect, flags, mega stone, Z-move, Fling, boosts |
|
|
35
|
+
| `get_ability` | Effect description, flags |
|
|
36
|
+
| `get_nature` | Boosts / lowers which stat |
|
|
37
|
+
| `get_learnset` | All learnable moves grouped by method (level-up, TM, egg, tutor, event) |
|
|
38
|
+
| `get_type` | Defensive weaknesses, resistances, immunities |
|
|
39
|
+
| `type_chart` | Matchup multiplier, offensive coverage, or defensive chart (defender can be a species) |
|
|
40
|
+
|
|
41
|
+
### Team building
|
|
42
|
+
| Tool | Purpose |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `list_archetypes` | Recognized archetypes (Hyper Offense, Rain, Stall, Trick Room, …) with roles + members |
|
|
45
|
+
| `get_archetype` | Full detail: description, roles, members, strengths, weaknesses, counters, tips |
|
|
46
|
+
| `list_tiers` | All legal Pokemon grouped by competitive tier (singles/doubles) |
|
|
47
|
+
| `speed_tiers` | Speed of every Pokemon in a tier at common investment levels, sorted |
|
|
48
|
+
| `analyze_team` | Team synergy: stacked defensive weaknesses, offensive coverage gaps, speed placement, and a heuristic 0-100 score |
|
|
49
|
+
|
|
50
|
+
### Meta (curated)
|
|
51
|
+
| Tool | Purpose |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| `list_threats` | Curated meta threat list for a regulation (role, tier, standard set) |
|
|
54
|
+
| `get_set` | Standard set for a species (item, ability, nature, EVs, 4 moves, Tera) |
|
|
55
|
+
|
|
56
|
+
### Regulations (Pokémon Champions / VGC)
|
|
57
|
+
| Tool | Purpose |
|
|
58
|
+
| --- | --- |
|
|
59
|
+
| `list_regulations` | Official Regulation Sets with dates, status, and roster size |
|
|
60
|
+
| `get_regulation` | Full set rules: battle rules, clauses, Mega rules, and the complete legal roster |
|
|
61
|
+
| `check_legality` | Validate a team against a set: illegal species, Species/Item Clause, illegal moves, team size, Mega eligibility |
|
|
62
|
+
|
|
63
|
+
### Battle mechanics
|
|
64
|
+
| Tool | Purpose |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| `calculate_stats` | Final 6 stats at a level with EVs/IVs/nature (in-game formula) |
|
|
67
|
+
| `calculate_damage` | Full damage calc (sets, item, ability, boosts, weather, terrain, hazards) |
|
|
68
|
+
| `calc_matchups` | Batch damage: one attacker vs many defenders — best move, damage range, KO chance, who moves first |
|
|
69
|
+
| `speed_check` | Final Speed (nature/EV/IV/boost/Scarf) vs a regulation roster's invested/uninvested speeds |
|
|
70
|
+
| `optimize_evs` | EV spread solver: min EVs to survive / outspeed / guarantee a KO, then maximize a stat |
|
|
71
|
+
|
|
72
|
+
> **Two taxonomies.** `list_tiers` / `speed_tiers` use **Smogon fan tiers**
|
|
73
|
+
> (OU/UU/Uber — a community laddering system). The Regulation tools use the
|
|
74
|
+
> **official Pokémon Champions / VGC Regulation Sets** (seasonal legal rosters).
|
|
75
|
+
|
|
76
|
+
## Install
|
|
77
|
+
|
|
78
|
+
### npm
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npm install -g getcompetitive # or: npx getcompetitive
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Docker
|
|
85
|
+
|
|
86
|
+
No Node.js or npm install required — the image builds the server from source:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
docker build -t getcompetitive .
|
|
90
|
+
docker run -i --rm getcompetitive # speaks MCP over stdio
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### From source
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
git clone https://github.com/mriver15/getcompetitive.git
|
|
97
|
+
cd getcompetitive
|
|
98
|
+
npm install
|
|
99
|
+
npm run build
|
|
100
|
+
npm start # starts the MCP server on stdio
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Configure an MCP client
|
|
104
|
+
|
|
105
|
+
With npm:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"mcpServers": {
|
|
110
|
+
"getcompetitive": {
|
|
111
|
+
"command": "npx",
|
|
112
|
+
"args": ["getcompetitive"]
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
With Docker (after `docker build -t getcompetitive .`):
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"mcpServers": {
|
|
123
|
+
"getcompetitive": {
|
|
124
|
+
"command": "docker",
|
|
125
|
+
"args": ["run", "-i", "--rm", "getcompetitive"]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
For Claude Desktop, add one of the same entries under `mcpServers` in
|
|
132
|
+
`claude_desktop_config.json`.
|
|
133
|
+
|
|
134
|
+
## Verify
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
npm test # builds and drives every tool over real MCP stdio
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Example queries
|
|
141
|
+
|
|
142
|
+
- `get_pokemon` `{ "species": "Ogerpon-Wellspring" }`
|
|
143
|
+
- `type_chart` `{ "attacker": "Ice", "defender": "Garchomp" }` → 4x super effective
|
|
144
|
+
- `calculate_stats` `{ "species": "Garchomp", "level": 50, "nature": "Jolly", "evs": { "atk": 252, "spe": 252 } }`
|
|
145
|
+
- `calculate_damage` `{ "attacker": { "species": "Garchomp", "level": 50, "nature": "Jolly", "evs": { "atk": 252, "spe": 252 }, "item": "Choice Band" }, "defender": { "species": "Corviknight", "level": 50, "nature": "Impish", "evs": { "hp": 252, "def": 252 } }, "move": "Dragon Claw" }`
|
|
146
|
+
- `check_legality` `{ "regulation": "m-c", "team": [ { "species": "Garchomp", "item": "Choice Band" } ] }`
|
|
147
|
+
- `analyze_team` `{ "team": [ { "species": "Garchomp", "moves": ["Earthquake", "Dragon Claw", "Rock Slide"] } ], "regulation": "m-c" }`
|
|
148
|
+
|
|
149
|
+
## Data freshness
|
|
150
|
+
|
|
151
|
+
The Showdown dataset and battle math track `@pkmn/dex` / `@smogon/calc`. Official
|
|
152
|
+
**Regulation Sets change seasonally**; the legal rosters are regenerated with
|
|
153
|
+
`node scripts/extract-regs.mjs`, and the curated **threat list / standard sets**
|
|
154
|
+
(`src/threats.ts`) are keyed by regulation — scaffold a new one with
|
|
155
|
+
`node scripts/threat-scaffold.mjs <regulation>`. See [CONTRIBUTING](CONTRIBUTING.md).
|
|
156
|
+
|
|
157
|
+
## Contributing
|
|
158
|
+
|
|
159
|
+
Pull requests welcome. See [CONTRIBUTING](CONTRIBUTING.md) for setup and
|
|
160
|
+
conventions, and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for community standards.
|
|
161
|
+
|
|
162
|
+
## License
|
|
163
|
+
|
|
164
|
+
[MIT](LICENSE). Data is sourced from the Pokémon Showdown ecosystem and
|
|
165
|
+
Bulbapedia; Pokémon is © Nintendo / Game Freak.
|