mcp-pokeapi-server
POKEAPI と連携し、MCP(Model Context Protocol)仕様でポケモン情報を取得できるサーバーです。
概要
セットアップ
ビルド
開発用起動(ts-node)
MCP クライアントからの利用例
MCP クライアントや LLM アプリから、標準入力/出力で JSON-RPC リクエストを送信します。
{
"jsonrpc": "2.0",
"id": 1,
"method": "list_tools"
}
レスポンス例
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"tools": [
{
"name": "getPokemonInfo",
"description": "ポケモン名またはIDから、POKEAPIでポケモン情報を取得します。",
"input_schema": { ... },
"output_schema": { ... }
}
]
}
}
{
"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"]
}
}
]
}
}
テスト
参考