Skip to main content
Glama

铁匠徽章

概述

Poke-MCP 是一个模型上下文协议 (MCP) 服务器,通过标准化接口提供 Pokémon 信息。它连接到PokeAPI以获取 Pokémon 数据,并通过 MCP 工具将其公开,这些工具可供任何兼容 MCP 的客户端使用,例如 Claude Desktop App、Continue、Cline 等。

特征

  • 通过名称获取特定神奇宝贝的信息

  • 发现随机宝可梦

  • 寻找来自特定地区(关都、城都、丰缘等)的随机神奇宝贝

  • 获取特定类型的随机神奇宝贝(火、水、电等)

  • 神奇宝贝信息的自然语言查询界面

工作原理

Poke-MCP 使用模型上下文协议构建,该协议使 AI 应用程序能够以标准化的方式访问外部工具和数据源。服务器:

  1. 连接到 PokeAPI 以获取 Pokémon 数据

  2. 通过 MCP 界面公开多种工具

  3. 处理来自 MCP 客户端的请求

  4. 返回格式化的神奇宝贝信息

MCP 工具

该服务器提供以下工具:

  • get-pokemon:通过名称获取特定神奇宝贝的详细信息

  • random-pokemon:获取有关随机神奇宝贝的信息

  • random-pokemon-from-region:从特定区域随机获取一只神奇宝贝

  • random-pokemon-by-type:获取特定类型的随机神奇宝贝

  • pokemon-query:回答有关 Pokémon 的自然语言查询

建筑学

该服务器使用以下方式构建:

  • TypeScript

  • MCP TypeScript SDK(@modelcontextprotocol/sdk)

  • Zod 用于输入验证

  • MCP 通信的标准 I/O 传输

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 Pokémcp:

npx -y @smithery/cli install @NaveenBandarage/poke-mcp --client claude

手动安装

# Clone the repository git clone https://github.com/yourusername/poke-mcp.git cd poke-mcp # Install dependencies npm install # Build the project npm run build

用法

使用 Claude 桌面应用程序

  1. 下载并安装Claude 桌面应用程序

  2. 打开 Claude 桌面设置

  3. 转到开发者设置并编辑配置文件

  4. 添加以下配置:

{ "mcpServers": { "pokedex": { "command": "path/to/poke-mcp/build/index.js" } } }
  1. 重启Claude桌面

  2. 你现在应该可以看到 Claude 中可用的 Pokémon 工具

示例查询

连接到 MCP 客户端后,您可以提出以下问题:

  • “跟我讲讲皮卡丘吧”

  • “给我一只随机的宝可梦”

  • “随机给我看看一只来自关东地区的宝可梦”

  • “随机水系宝可梦是什么?”

项目结构

  • src/index.ts:主服务器实现

  • src/types.ts:Pokémon 数据的 TypeScript 类型定义

  • package.json:项目依赖项和脚本

  • tsconfig.json:TypeScript 配置

添加新功能

要添加新工具或增强现有工具:

  1. 定义新的辅助函数来获取和格式化数据

  2. 使用 server.tool() 方法注册新工具

  3. 实现工具逻辑来处理请求并返回响应

执照

国际学习中心

致谢


该项目演示了如何构建自定义 MCP 服务器,以使用特定领域的知识和功能扩展 AI 助手。

Related MCP Servers

  • -
    security
    F
    license
    -
    quality
    A Model Context Protocol server that interfaces with PokeAPI to provide Pokémon information to LLM applications through JSON-RPC over stdio.
    Last updated -
  • -
    security
    F
    license
    -
    quality
    An MCP server implementation that enables users to interact with the PokeAPI to fetch Pokemon information through natural language queries.
    Last updated -
    • Linux
    • Apple
  • -
    security
    A
    license
    -
    quality
    A server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.
    Last updated -
    1
    11
    MIT License
  • -
    security
    F
    license
    -
    quality
    An MCP server that provides detailed Pokémon information by integrating with the PokeAPI, allowing users to fetch comprehensive data about Pokémon and simulate battles.
    Last updated -
    1

View all related MCP servers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NaveenBandarage/poke-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server