PokeAPI MCP Server - UBOS

✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

mcp-pokeapi-server

POKEAPI と連携し、MCP(Model Context Protocol)仕様でポケモン情報を取得できるサーバーです。

概要

  • MCP プロトコル(JSON-RPC 2.0 over stdio)で、LLM アプリや MCP クライアントからポケモン情報取得ツールを提供します。
  • POKEAPI(https://pokeapi.co/)を利用。
  • スキーマバリデーションにはzodを使用。

セットアップ

npm install

ビルド

npx tsc

開発用起動(ts-node)

npx ts-node src/index.ts

MCP クライアントからの利用例

MCP クライアントや LLM アプリから、標準入力/出力で JSON-RPC リクエストを送信します。

1. ツール一覧取得(list_tools)

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "list_tools"
}

レスポンス例

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      {
        "name": "getPokemonInfo",
        "description": "ポケモン名またはIDから、POKEAPIでポケモン情報を取得します。",
        "input_schema": { ... },
        "output_schema": { ... }
      }
    ]
  }
}

2. ポケモン情報取得(call_tool)

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "call_tool",
  "params": {
    "name": "getPokemonInfo",
    "arguments": {
      "nameOrId": "pikachu"
    }
  }
}

レスポンス例

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "content": [
      {
        "type": "json",
        "data": {
          "name": "pikachu",
          "id": 25,
          "height": 4,
          "weight": 60,
          "types": ["electric"]
        }
      }
    ]
  }
}

テスト

npm test

参考

Featured Templates

View More
AI Engineering
Python Bug Fixer
117 915
AI Characters
Your Speaking Avatar
162 568
Customer service
Service ERP
124 632
AI Characters
Sarcastic AI Chat Bot
126 1224
Customer service
Multi-language AI Translator
135 521

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.