Skip to main content
Glama
ygocdb-mcp

ygocdb-mcp

by lieyanqzu

百鸽(ygocdb.com) MCP Server

English | 中文

一个基于 Model Context Protocol (MCP) 的服务端,用于与 百鸽(ygocdb.com)等 API 交互。提供了一系列工具来查询游戏王中文卡牌信息。

API 文档

本服务端基于游戏王卡牌数据库的公开 API。

  • 卡牌搜索: https://ygocdb.com/api/v0/?search=关键字

  • 卡牌图片: https://cdn.233.momobako.com/ygopro/pics/<id>.jpg

Related MCP server: Internetsearch-mcp-server

使用示例

使用示例

功能特性

  • search_cards
    通过关键字搜索游戏王卡牌,可以搜索卡牌名称、效果文本等。

  • get_card_by_id
    通过卡牌ID获取单张游戏王卡牌的详细信息。

  • get_card_image
    通过卡牌ID获取游戏王卡牌的图片。

使用方法

通过 NPM 包使用

# 全局安装
npm install -g ygocdb-mcp-server

# 或直接运行(推荐)
npx ygocdb-mcp-server

本地开发

# 克隆项目
git clone <repository-url>
cd ygocdb-mcp

# 安装依赖
npm install

# 构建项目
npm run build

# 运行 STDIO 模式
npm run start:stdio

# 运行 HTTP 模式
npm run start:http

运行模式

服务端支持两种运行模式:

STDIO 模式(默认)

用于与 Claude Desktop 等 MCP 客户端直接集成:

npm run start:stdio

HTTP 模式

用于容器部署或 HTTP 客户端访问:

npm run start:http

HTTP 服务器将在端口 8081 上启动,端点为 http://localhost:8081/mcp

在 Claude Desktop 中集成

在 claude_desktop_config.json 中添加配置:

使用 NPX(推荐)

{
  "mcpServers": {
    "ygocdb": {
      "command": "npx",
      "args": ["ygocdb-mcp-server"]
    }
  }
}

使用本地构建

{
  "mcpServers": {
    "ygocdb": {
      "command": "node",
      "args": ["path/to/ygocdb-mcp/dist/index.js"],
      "cwd": "path/to/ygocdb-mcp"
    }
  }
}

Docker 部署

# 构建镜像
docker build -t ygocdb-mcp .

# 运行 STDIO 模式(用于集成)
docker run -i --rm ygocdb-mcp

# 运行 HTTP 模式(用于服务)
docker run -p 8081:8081 ygocdb-mcp

跨平台支持

项目使用 cross-env 确保在所有平台上正确设置环境变量:

  • Windows: npm run start:http 或 npm run start:stdio

  • macOS/Linux: npm run start:http 或 npm run start:stdio

  • Docker: 自动使用 HTTP 模式

Available Tools

3 tools
get_card_by_idA
Read-only

通过卡牌ID获取单张游戏王卡牌的详细信息

Inputs: id (required).

get_card_imageA
Read-only

通过卡牌ID获取游戏王卡牌的图片

Inputs: id (required).

search_cardsB
Read-only

通过关键字搜索游戏王卡牌,可以搜索卡牌名称、效果文本等。

Inputs: query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: get_card_by_id retrieves detailed card information, get_card_image fetches the card's image, and search_cards performs keyword-based searches. There is no overlap in functionality, making it easy for an agent to select the correct tool without confusion.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with snake_case (e.g., get_card_by_id, get_card_image, search_cards). The naming is predictable and readable, with no deviations or mixed conventions.

    Tool Count3/5

    With only 3 tools, the set feels thin for a card database server, as it lacks operations like updating, deleting, or managing card collections. However, it covers basic retrieval and search functions adequately for its limited scope.

    Completeness3/5

    The tools provide good read/search coverage (get and search), but there are notable gaps in CRUD operations—no create, update, or delete functions. This limits the server to querying only, which may cause dead ends for agents needing to modify data.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for using various search tools like Tavily API. Planning to support various search tools (i.e. wiki search, searxng, etc)
      3
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provide seamless access to Magic: The Gathering Chinese card data from 大学院废墟(sbwsz.com) through a set of powerful query tools. Search cards by complex criteria, retrieve card sets, and get detailed card information to enhance your applications or workflows.
      6
      23 npm
      2
      MIT