Pokémon MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Pokémon MCP
MCP server de ejemplo que expone PokéAPI como tools de ChatGPT y Cursor, con un widget visual embebido (MCP Apps) y eventos que avisan a ChatGPT (MCP Events).
Implementa el flujo recomendado por OpenAI: primero tools, después UI.
Demo
Conector activo en ChatGPT y petición al modelo:

Respuesta con la tarjeta visual generada por render_pokemon_widget:

Related MCP server: Pokemon MCP Server
Características
Tools read-only contra PokéAPI (
list_pokemon,get_pokemon,get_type)Patrón desacoplado: tools de datos + tool de render con
_meta.ui.resourceUriWidget inline con sprite, tipos, habilidades, stats y matchups
Dos transports: stdio (Cursor) y Streamable HTTP
/mcp(ChatGPT / Inspector)Preview local en
/previewsin depender del hostMCP Events: evento
pokemon.appearedque ChatGPT puede vigilar (webhooks firmados)
Requisitos
Node.js 18+
npm
Inicio rápido
git clone git@github.com:omy13/mcp-ui-openai-pokemon.git
cd mcp-ui-openai-pokemon
npm install
npm --prefix web install
npm run build:web # obligatorio antes de arrancar el server
npm run dev:httpComprueba el widget en http://localhost:8787/preview y el endpoint MCP en http://localhost:8787/mcp.
Importante: tras clonar el repo, ejecuta siempre
npm run build:web. El server embebeweb/dist/widget.jsen el resource HTML; sin ese build,dev:httpfallará.
Tools
Tool | Descripción | UI |
| Lista Pokémon paginados ( | No |
| Detalle por nombre o id ( | No |
| Matchups y Pokémon de un tipo | No |
| Renderiza la tarjeta visual | Sí |
Flujo recomendado en ChatGPT:
El modelo llama
get_pokemony obtienestructuredContent.Luego llama
render_pokemon_widgetcon esos campos.ChatGPT monta el iframe con el resource
ui://widget/pokemon-card.html.
MCP Events
El server anuncia la capacidad events y expone un evento:
Evento | Filtro | Payload |
|
|
|
Flujo:
ChatGPT llama
events/listy vepokemon.appeared.El usuario pide, por ejemplo: Avísame cuando aparezca un Pokémon de tipo fuego y dime contra qué tipos es fuerte.
ChatGPT llama
events/subscribecon una URL de callback y una clavewhsec_….El server verifica el callback con un reto firmado y guarda la suscripción en
data/subscriptions.json.POST /dev/wild-pokemonsimula que aparece un Pokémon y el server manda el evento firmado (Standard Webhooks) a cada suscripción que encaje.
Seguridad: callbacks solo HTTPS, sin redirecciones, y la IP se valida al conectar (se bloquean direcciones privadas y locales).
MCP Events es un borrador de extensión. En ChatGPT funciona en chats de trabajo (web, y escritorio con Cloud) y con dots. Esta demo no tiene autenticación: todas las suscripciones son del mismo usuario.
Docs: MCP Events — OpenAI
Probar en local (sin ChatGPT)
events:receiver hace de ChatGPT: levanta un receptor en :9000, se suscribe y verifica las firmas.
# Terminal 1: server MCP (permite callbacks http://localhost solo para esta prueba)
DEV_TRIGGER_TOKEN=secreto EVENTS_ALLOW_INSECURE_LOCALHOST=true npm run dev:http
# Terminal 2: receptor suscrito a Pokémon de tipo fuego
npm run events:receiver -- fire
# Terminal 3: aparece un Charmander
curl -X POST 'http://localhost:8787/dev/wild-pokemon?name=charmander' \
-H 'Authorization: Bearer secreto'Sin ?name= aparece un Pokémon aleatorio de la primera generación. Sin DEV_TRIGGER_TOKEN, /dev/wild-pokemon responde 404.
Probar en ChatGPT
Arranca con
DEV_TRIGGER_TOKEN=secreto npm run dev:httpy expón el puerto con un túnel HTTPS (ver abajo).Conecta el server como plugin y vuelve a escanearlo:
pokemon.appearedaparece junto a las tools.En un chat de trabajo pide que vigile un tipo y qué hacer cuando llegue un evento.
Dispara
POST https://TU-TUNEL/dev/wild-pokemon?name=charmandercon el token.
Desarrollo
Preview del widget (sin ChatGPT)
npm run build:web
npm run dev:httpURL | Descripción |
Pikachu mock | |
Datos reales de PokéAPI |
Cursor (stdio)
npm run build:web
npm run devConfiguración MCP (sustituye PATH_TO_REPO por la ruta absoluta del proyecto):
{
"mcpServers": {
"pokemon-mcp": {
"command": "node",
"args": [
"./node_modules/tsx/dist/cli.mjs",
"src/index.ts"
],
"cwd": "PATH_TO_REPO"
}
}
}Si Cursor no encuentra node (común con nvm), usa la ruta absoluta del binario en command.
ChatGPT (developer mode)
Arranca el server:
npm run build:web && npm run dev:httpExpón el puerto con un túnel HTTPS, por ejemplo:
ngrok http 8787En ChatGPT: Settings → Apps & Connectors → Advanced → Developer mode
Crea un connector apuntando a
https://TU-TUNEL.ngrok.app/mcpEn un chat nuevo, activa el connector y prueba: Muestrame la carta de charmander
Docs: Connect from ChatGPT
MCP Inspector
npx @modelcontextprotocol/inspector@latest \
--server-url http://localhost:8787/mcp \
--transport httpSmoke test
npm run smokeScripts
Comando | Descripción |
| MCP por stdio (Cursor) |
| MCP HTTP en |
| Compila el widget ( |
| Widget + TypeScript → |
| Prueba rápida del cliente PokéAPI |
| Receptor local de MCP Events (hace de ChatGPT) |
Estructura del proyecto
pokemon-mcp/
├── src/
│ ├── pokeapi-client.ts # Cliente HTTP a PokéAPI
│ ├── server.ts # McpServer + tools + resource
│ ├── events.ts # MCP Events: events/list, subscribe, unsubscribe y envío
│ ├── event-subscriptions.ts # Suscripciones guardadas en JSON
│ ├── webhook-delivery.ts # POST firmado + bloqueo de IPs privadas
│ ├── dev-event-receiver.ts # Receptor local para probar eventos
│ ├── widget-resource.ts # HTML embebido del widget
│ ├── preview-widget.ts # Datos mock para /preview
│ ├── http.ts # Transport HTTP + preview
│ └── index.ts # Transport stdio
├── web/
│ ├── src/ # Widget (TypeScript + CSS)
│ └── dist/widget.js # Bundle generado (no versionado)
└── images/ # Capturas para documentaciónVariables de entorno
Copia .env.example si necesitas overrides:
POKEAPI_BASE_URL=https://pokeapi.co/api/v2
PORT=8787
DEV_TRIGGER_TOKEN= # activa POST /dev/wild-pokemon
EVENTS_STORE_PATH=data/subscriptions.json
EVENTS_ALLOW_INSECURE_LOCALHOST=false # true solo para events:receiverReferencias
Licencia
MIT — úsalo como base para tus propios MCP servers.
This server cannot be deployed
Maintenance
Related MCP Connectors
Provide detailed Pokémon data and information through a standardized MCP interface. Enable LLMs an…
Pokemon MCP — wraps PokéAPI (free, no auth required)
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to access comprehensive Pokémon data through PokeAPI, including detailed Pokémon information, type effectiveness charts, encounter locations, and search capabilities. Provides a complete toolkit for retrieving stats, abilities, sprites, battle mechanics, and wild encounter data for all Pokémon.489 npm1MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to fetch Pokémon data, list popular Pokémon, and build tournament squads via the PokéAPI.34-
- AlicenseBqualityDmaintenanceEmpowers AI assistants to fetch and explore comprehensive Pokémon data from PokeAPI via 47 tools covering Pokémon, moves, items, game mechanics, and more.4737 npm1ISC
- FlicenseAqualityDmaintenanceAn MCP server that exposes the PokéAPI as tools and resources, allowing AI assistants to look up Pokémon data in real time without configuration.22-