{
  "markdown": "<div align=\"center\">\n  <h1>@cyanheads/pokeapi-mcp-server</h1>\n  <p><b>Look up Pokémon, moves, abilities, items, natures, and type matchups from PokéAPI v2 via MCP. STDIO or Streamable HTTP.</b>\n  <div>7 Tools • 2 Resources</div>\n  </p>\n</div>\n\n<div align=\"center\">\n\n[![Version](https://img.shields.io/badge/Version-0.1.8-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/pokeapi-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/pokeapi-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/pokeapi-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)\n\n</div>\n\n<div align=\"center\">\n\n[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/pokeapi-mcp-server/releases/latest/download/pokeapi-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=pokeapi-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvcG9rZWFwaS1tY3Atc2VydmVyIl19) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22pokeapi-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fpokeapi-mcp-server%22%5D%7D)\n\n[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)\n\n</div>\n\n<div align=\"center\">\n\n**Public Hosted Server:** [https://pokeapi.caseyjhand.com/mcp](https://pokeapi.caseyjhand.com/mcp)\n\n</div>\n\n---\n\n## Tools\n\nSeven tools covering the full PokéAPI v2 surface — a flagship consolidation tool, a computed matchup tool, single-resource lookups, and a filter tool:\n\n| Tool | Description |\n|:-----|:------------|\n| `pokeapi_get_pokemon` | Denormalized Pokémon dossier in one call: base stats, types, abilities with effect text, height/weight, evolution chain, learnable moves, sprites, species flavor text, and variant list |\n| `pokeapi_get_type_matchups` | Computed offensive and defensive type effectiveness — for a type name or Pokémon identifier; correctly composes dual-type matchups |\n| `pokeapi_get_move` | Move details: type, damage class, power, accuracy, PP, priority, target, stat changes, status-effect chance, and full English effect text |\n| `pokeapi_get_ability` | Ability details: full and short English effect text, and the Pokémon that have it (with hidden-ability flag and slot) |\n| `pokeapi_get_item` | Item details: effect text, category, cost, fling power, attributes, and Pokémon that commonly hold it |\n| `pokeapi_get_nature` | Nature details: stat boost/penalty, preferred and disliked berry flavor. Returns all 25 natures when called without an identifier |\n| `pokeapi_find_pokemon` | Filter Pokémon by generation, type, pokédex, or egg group; also resolves fuzzy name queries to canonical entries |\n\n### `pokeapi_get_pokemon`\n\nThe flagship tool — fans out across the PokéAPI resource graph in parallel and returns one denormalized dossier, replacing 10–30 sub-resource GETs.\n\n- Fetches `/pokemon`, `/pokemon-species`, `/evolution-chain`, and each `/ability` in a two-tier parallel fan-out\n- Includes sprites (with `official-artwork` high-quality art URL), `is_legendary`, `is_mythical`, `capture_rate`, `growth_rate`, `gender_rate`\n- `include_moves` (default `false`) — set to `true` for a summarized learnable-move list filtered to the latest generation\n- `game_version` string to select flavor text by game (e.g. `\"sword\"`, `\"red\"`) — silently falls back to first available when no match\n- Surfaces the variant list so callers can re-call with a specific form name (regional forms, Gigantamax, Mega, etc.)\n\n---\n\n### `pokeapi_get_type_matchups`\n\nComputed type effectiveness — pass a type name or Pokémon identifier to get the full offensive and defensive breakdown with multiplier values.\n\n- For dual-type Pokémon: composes both type defensive relations correctly (immune in either type wins)\n- Returns `superEffective`, `resistant`, and `immune` lists for both offense and defense\n- Accepts either `type` (type name) or `pokemon` (name or dex number) — exactly one required\n\n---\n\n### `pokeapi_find_pokemon`\n\nFilter Pokémon by multiple criteria — returns names and dex numbers for follow-up `pokeapi_get_pokemon` calls.\n\n- Filters: `generation` (e.g. `\"generation-i\"`), `type` (e.g. `\"fire\"`), `pokedex` (e.g. `\"kanto\"`), `egg_group` (e.g. `\"fairy\"`)\n- `query` parameter for fuzzy name search\n- Pagination via `limit` and `offset`\n\n---\n\n## Resources and prompts\n\n| Type | Name | Description |\n|:-----|:-----|:------------|\n| Resource | `pokeapi://pokemon/{identifier}` | Pokémon dossier by name or dex number — same payload as `pokeapi_get_pokemon` without moves |\n| Resource | `pokeapi://type/{typeName}` | Type damage relations — raw multiplier table, offensive and defensive |\n\nAll resource data is also reachable via tools.\n\n---\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):\n\n- Declarative tool and resource definitions — single file per primitive, framework handles registration and validation\n- Unified error handling — handlers throw, framework catches, classifies, and formats\n- Pluggable auth: `none`, `jwt`, `oauth`\n- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`\n- Structured logging with optional OpenTelemetry tracing\n- STDIO and Streamable HTTP transports\n\nPokéAPI-specific:\n\n- Keyless and read-only — no API key, no auth, no configuration required to run\n- Graph-walk consolidation — `pokeapi_get_pokemon` fans out across `/pokemon`, `/pokemon-species`, `/evolution-chain`, and N `/ability` endpoints in two parallel tiers, returning one object\n- Aggressive caching — PokéAPI data is static game data; responses are cached in `ctx.state` with a configurable TTL (default 6 h) to respect PokéAPI's fair-use policy\n- Input normalization — accepts lowercase-hyphenated names or numeric IDs; strips and lowercases user input before fetching\n- English-first — `effect_entries` and `flavor_text_entries` are always filtered to `language.name === 'en'`; absent entries surface as `null` rather than a foreign-language string\n\nAgent-friendly output:\n\n- Dual-type composition — `pokeapi_get_type_matchups` computes the effective matchup matrix from raw damage relations, so agents get a direct answer rather than raw tables to multiply\n- Variant surface — `pokeapi_get_pokemon` lists all form variants so agents can identify and re-call with specific forms (Alolan, Galarian, Mega, Gigantamax)\n- Sparse-safe nullable fields — upstream absent fields surface as `null` rather than crashing or returning a fabricated default\n\n---\n\n## Getting started\n\n### Public Hosted Instance\n\nA public instance is available at `https://pokeapi.caseyjhand.com/mcp` — no installation required. Point any MCP client at it via Streamable HTTP:\n\n```json\n{\n  \"mcpServers\": {\n    \"pokeapi-mcp-server\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"https://pokeapi.caseyjhand.com/mcp\"\n    }\n  }\n}\n```\n\n### Self-Hosted / Local\n\nNo API key required. Add the following to your MCP client configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"pokeapi-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"@cyanheads/pokeapi-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"pokeapi-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cyanheads/pokeapi-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"pokeapi-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"-i\", \"--rm\",\n        \"-e\", \"MCP_TRANSPORT_TYPE=stdio\",\n        \"ghcr.io/cyanheads/pokeapi-mcp-server:latest\"\n      ]\n    }\n  }\n}\n```\n\nFor Streamable HTTP, set the transport and start the server:\n\n```sh\nMCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http\n# Server listens at http://localhost:3010/mcp\n```\n\n### Prerequisites\n\n- [Bun v1.3.0](https://bun.sh/) or higher (or Node.js v24+).\n- No API key required — PokéAPI is fully public.\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/pokeapi-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd pokeapi-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n4. **Configure environment (optional):**\n\n```sh\ncp .env.example .env\n# All vars are optional — the server works with defaults\n```\n\n---\n\n## Configuration\n\n| Variable | Description | Default |\n|:---------|:------------|:--------|\n| `POKEAPI_BASE_URL` | PokéAPI base URL — override for local mirrors or proxies. | `https://pokeapi.co/api/v2` |\n| `POKEAPI_CACHE_TTL_SECONDS` | How long to cache PokéAPI responses (seconds). | `21600` (6 h) |\n| `POKEAPI_REQUEST_TIMEOUT_MS` | Per-request timeout in milliseconds. | `10000` |\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |\n| `MCP_SESSION_MODE` | Session mode: `auto`, `stateful`, or `stateless`; `auto` is the framework schema default and resolves to stateful. | `stateless` |\n| `MCP_HTTP_PORT` | Port for HTTP server. | `3010` |\n| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |\n| `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |\n| `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |\n| `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry). | `false` |\n\nSee [`.env.example`](./.env.example) for the full list of optional overrides.\n\n### Self-hosting for high-volume use\n\nPokéAPI's [Fair Use Policy](https://pokeapi.co/docs/v2#fairuse) asks consumers to cache aggressively and points high-volume deployments toward running a local instance. This server already caches responses for 6 hours by default (`POKEAPI_CACHE_TTL_SECONDS`), which covers most workloads. For hosted or batch-heavy deployments, run the [official PokéAPI Docker image](https://github.com/PokeAPI/pokeapi) locally and point `POKEAPI_BASE_URL` at it — the server switches transparently.\n\n---\n\n## Running the server\n\n### Local development\n\n- **Build and run:**\n\n  ```sh\n  bun run rebuild\n\n  bun run start:stdio\n  # or\n  bun run start:http\n  ```\n\n- **Run checks and tests:**\n\n  ```sh\n  bun run devcheck   # Lint, format, typecheck, security\n  bun run test       # Vitest test suite\n  bun run lint:mcp   # Validate MCP definitions against spec\n  ```\n\n### Docker\n\n```sh\ndocker build -t pokeapi-mcp-server .\ndocker run --rm -p 3010:3010 pokeapi-mcp-server\n```\n\nThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/pokeapi-mcp-server`. Build with `--build-arg OTEL_ENABLED=false` to omit OpenTelemetry peer dependencies.\n\n---\n\n## Project structure\n\n| Path | Purpose |\n|:-----|:--------|\n| `src/index.ts` | `createApp()` entry point — registers tools, resources, and inits services. |\n| `src/config/` | Server-specific env var parsing with Zod (`server-config.ts`). |\n| `src/mcp-server/tools/` | Tool definitions (`*.tool.ts`). |\n| `src/mcp-server/resources/` | Resource definitions (`*.resource.ts`). |\n| `src/services/pokeapi/` | `PokeApiService` — typed fetch methods, caching, retry, timeout. |\n| `tests/` | Vitest test suite mirroring `src/`. |\n\n---\n\n## Development guide\n\nSee [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:\n\n- Handlers throw, framework catches — catch typed upstream errors only to map a declared `errors[]` contract with `ctx.fail(...)`\n- Use `ctx.log` for request-scoped logging, `ctx.state` for tenant-scoped storage (and caching)\n- Register new tools and resources via the barrels in `src/mcp-server/*/definitions/index.ts`\n- Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields\n\n---\n\n## Contributing\n\nIssues and pull requests are welcome. Run checks and tests before submitting:\n\n```sh\nbun run devcheck\nbun run test\n```\n\n---\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE) for details.\n",
  "bytes": 13073,
  "sha": "35565254d870251f080a4fc6ea503391cfb178324777f7b8cb2204bc5e8503da",
  "repo_slug": "cyanheads/pokeapi-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cyanheads_pokeapi_mcp_server_f9e1c0d7/readme"
}