Pokémon MCP
Exposes PokéAPI as MCP tools for ChatGPT and Cursor, enabling listing, searching, and viewing Pokémon details, plus a visual widget rendering Pokémon cards.
README
Pokémon MCP
MCP server de ejemplo que expone PokéAPI como tools de ChatGPT y Cursor, con un widget visual embebido (MCP Apps).
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:

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.resourceUri - Widget inline con sprite, tipos, habilidades, stats y matchups
- Dos transports: stdio (Cursor) y Streamable HTTP
/mcp(ChatGPT / Inspector) - Preview local en
/previewsin depender del host
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:http
Comprueba 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 |
|---|---|---|
list_pokemon |
Lista Pokémon paginados (limit, offset) |
No |
get_pokemon |
Detalle por nombre o id (pikachu, 25) |
No |
get_type |
Matchups y Pokémon de un tipo | No |
render_pokemon_widget |
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.
Desarrollo
Preview del widget (sin ChatGPT)
npm run build:web
npm run dev:http
| URL | Descripción |
|---|---|
| http://localhost:8787/preview | Pikachu mock |
| http://localhost:8787/preview/live | Datos reales de PokéAPI |
Cursor (stdio)
npm run build:web
npm run dev
Configuració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:http - Expón el puerto con un túnel HTTPS, por ejemplo:
ngrok http 8787 - En ChatGPT: Settings → Apps & Connectors → Advanced → Developer mode
- Crea un connector apuntando a
https://TU-TUNEL.ngrok.app/mcp - En 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 http
Smoke test
npm run smoke
Scripts
| Comando | Descripción |
|---|---|
npm run dev |
MCP por stdio (Cursor) |
npm run dev:http |
MCP HTTP en :8787/mcp |
npm run build:web |
Compila el widget (web/dist/widget.js) |
npm run build |
Widget + TypeScript → dist/ |
npm run smoke |
Prueba rápida del cliente PokéAPI |
Estructura del proyecto
pokemon-mcp/
├── src/
│ ├── pokeapi-client.ts # Cliente HTTP a PokéAPI
│ ├── server.ts # McpServer + tools + resource
│ ├── 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ón
Variables de entorno
Copia .env.example si necesitas overrides:
POKEAPI_BASE_URL=https://pokeapi.co/api/v2
PORT=8787
Referencias
Licencia
MIT — úsalo como base para tus propios MCP servers.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.