Skip to main content
Glama
Danbooru Search MCP

Danbooru Search MCP

by echo-xianyu

⚠️ 纯 AI 生成声明 | Pure AI-Generated Notice

本项目代码由 AI(opencode + GLM-5.2)完全生成,未经人工编写。

This project's code is entirely generated by AI (opencode + GLM-5.2), without human-written code.


⚠️ Deprecated — 已废弃

This repository has been merged into echo-xianyu/Booru-Pictag-Get-MCP (v0.2.0+). All five tools (danbooru_get_character_profile, danbooru_search_character, danbooru_lookup_tag, danbooru_get_wiki_page, danbooru_get_tag_implications) now live there alongside the prompt-building tools, behind a single MCP. This repo is archived — please migrate. See DEPRECATED.md for details and migration steps.

本仓库已合并进 echo-xianyu/Booru-Pictag-Get-MCP (v0.2.0+),五个工具已整体迁入并和多站点搜图工具合并为单一 MCP。本仓库归档停更,请迁移至新仓库。


Danbooru Search MCP

English | 中文


Related MCP server: Gelbooru MCP

English

An MCP (Model Context Protocol) server that searches Danbooru for anime/game characters and their related tags. Given a character tag like hoshino_(blue_archive), it returns the most relevant co-occurring tags (ahoge, pink_hair, blue_eyes, heterochromia, ...) ranked by how often they appear together.

Features

  • Character profile in one call — visual traits, wiki description, multilingual aliases, and costume variant implications, all aggregated in parallel.

  • Auto-correction — misspelled tags are automatically resolved via Danbooru's autocomplete (e.g. amamya_kokoro → amamiya_kokoro).

  • No authentication required — the Danbooru read API is public. Setting DANBOORU_LOGIN / DANBOORU_API_KEY is optional and only raises your rate limit.

  • Zero-install deployment — runs via uvx with no manual install step.

Tools

#

Tool

Purpose

1

danbooru_get_character_profile

⭐ Recommended first. Complete profile: traits + wiki + aliases + implications.

2

danbooru_search_character

Visual trait frequencies for a character tag (ahoge, pink_hair, etc.).

3

danbooru_lookup_tag

Find/verify a tag's exact canonical name. Alias-corrected.

4

danbooru_get_wiki_page

Get the textual wiki description for a tag.

5

danbooru_get_tag_implications

Get the implication chain (A → B auto-adds).

Requirements

  • Python 3.10+

  • uv (recommended) or pip

Install & Configure

Add this to your MCP client config (claude_desktop_config.json, opencode.json, etc.):

{
  "mcpServers": {
    "danbooru": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/echo-xianyu/danbooru-MCP", "danbooru-mcp"]
    }
  }
}

From a local directory:

{
  "mcpServers": {
    "danbooru": {
      "command": "uvx",
      "args": ["--from", "E:\\path\\to\\Danbooru-Search-MCP", "danbooru-mcp"]
    }
  }
}

With optional authentication (higher rate limit):

{
  "mcpServers": {
    "danbooru": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/echo-xianyu/danbooru-MCP", "danbooru-mcp"],
      "env": {
        "DANBOORU_LOGIN": "your_username",
        "DANBOORU_API_KEY": "your_api_key"
      }
    }
  }
}

Usage Examples

Ask your MCP-enabled assistant:

  • "Search hoshino_(blue_archive), return the most relevant trait tags" → calls danbooru_search_character, returns ahoge (0.92), pink_hair (0.92), halo (0.93), ...

  • "Give me the full profile of Amamiya Kokoro" → calls danbooru_get_character_profile with tag=amamiya_kokoro.

  • "What does the ahoge tag mean?" → calls danbooru_get_wiki_page with title=ahoge.

Danbooru Tag Format

Tags use lowercase with underscores, and parentheses for disambiguation:

  • Spaces → underscores: blue archive → blue_archive

  • Disambiguation suffix: hoshino_(blue_archive), rem_(re:zero)

Use danbooru_lookup_tag with a * wildcard to discover the exact canonical name first.

Rate Limits

  • Anonymous reads: 10 requests/second (shared global limit).

  • With API key: higher per-account limits.

  • The server sets a custom User-Agent as required by Danbooru's policy.

License

MIT


中文

一个 MCP(模型上下文协议)服务器,通过 Danbooru 搜索动漫/游戏角色及其相关标签。输入角色标签如 hoshino_(blue_archive),返回最相关的共现标签(ahoge、pink_hair、blue_eyes、heterochromia...),按共现频率排序。

功能特点

  • 一次调用获取完整角色档案 — 视觉特征、Wiki 描述、多语言别名、服装变体蕴含关系,并行聚合。

  • 自动纠错 — 拼写的标签名自动通过 Danbooru autocomplete 纠正(如 amamya_kokoro → amamiya_kokoro)。

  • 无需认证 — Danbooru 只读 API 公开可用。设置 DANBOORU_LOGIN / DANBOORU_API_KEY 是可选的,仅用于提升限速。

  • 零安装部署 — 通过 uvx 运行,无需手动安装。

工具列表

#

工具

用途

1

danbooru_get_character_profile

⭐ 推荐首选。 完整档案:特征 + Wiki + 别名 + 蕴含关系。

2

danbooru_search_character

获取角色视觉特征频率(ahoge、pink_hair 等)。

3

danbooru_lookup_tag

查找/验证标签的规范名称,支持别名纠错。

4

danbooru_get_wiki_page

获取标签的 Wiki 文字描述。

5

danbooru_get_tag_implications

获取标签蕴含链(A → B 自动附加)。

环境要求

  • Python 3.10+

  • uv(推荐)或 pip

安装与配置

将以下内容添加到 MCP 客户端配置中(claude_desktop_config.json、opencode.json 等):

{
  "mcpServers": {
    "danbooru": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/echo-xianyu/danbooru-MCP", "danbooru-mcp"]
    }
  }
}

从本地目录运行:

{
  "mcpServers": {
    "danbooru": {
      "command": "uvx",
      "args": ["--from", "E:\\path\\to\\Danbooru-Search-MCP", "danbooru-mcp"]
    }
  }
}

带认证(提升限速,可选):

{
  "mcpServers": {
    "danbooru": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/echo-xianyu/danbooru-MCP", "danbooru-mcp"],
      "env": {
        "DANBOORU_LOGIN": "你的用户名",
        "DANBOORU_API_KEY": "你的API密钥"
      }
    }
  }
}

使用示例

对支持 MCP 的 AI 助手说:

  • "搜索 hoshino_(blue_archive),返回最相关的特征标签" → 调用 danbooru_search_character,返回 ahoge(0.92)、pink_hair(0.92)、halo(0.93)...

  • "给我天宫心(Amamiya Kokoro)的完整角色档案" → 调用 danbooru_get_character_profile,参数 tag=amamiya_kokoro。

  • "ahoge 这个标签是什么意思?" → 调用 danbooru_get_wiki_page,参数 title=ahoge。

Danbooru 标签格式

标签使用小写 + 下划线,括号用于消歧:

  • 空格 → 下划线:blue archive → blue_archive

  • 消歧后缀:hoshino_(blue_archive)、rem_(re:zero)

不确定标签名时,先用 danbooru_lookup_tag 加 * 通配符查找。

限速

  • 匿名读取:10 请求/秒(全站共享)。

  • 带 API 密钥:更高的账户级限速。

  • 服务器已设置 Danbooru 要求的自定义 User-Agent。

许可证

MIT

Available Tools

5 tools
danbooru_get_character_profileA
Read-onlyIdempotent

RECOMMENDED FIRST CHOICE for any character/tag lookup.

Returns everything in one call: visual traits (co-occurrence frequencies), wiki description, multilingual aliases, and tag implications in both directions (what this tag implies, and what tags imply this one — e.g. all costume variants).

Aggregates these data sources in parallel:

  1. Related tags (co-occurrence frequencies) -> visual traits.

  2. Wiki page -> textual description and multilingual aliases.

  3. Tag implications (antecedent) -> tags auto-added by this tag.

  4. Tag implications (consequent) -> tags that auto-add this tag (e.g. costume variants like hoshino_(swimsuit)_(blue_archive) imply hoshino_(blue_archive)).

Each source degrades gracefully: a missing wiki page or empty implications do not fail the whole request.

When auto_resolve is enabled (default) and the queried tag does not exist on Danbooru, the tool corrects the tag name via autocomplete and rebuilds the profile. The correction is reported in resolved_from.

Args: params (GetProfileInput): Validated input: - tag (str): Character tag, e.g. 'hoshino_(blue_archive)'. - limit (int): Max characteristic tags (1-100, default 25). - response_format (ResponseFormat): 'markdown' or 'json'. - auto_resolve (bool): Auto-correct misspelled tags (default True).

Returns: str: Markdown profile or JSON. Success JSON schema: { "tag": {"name": str, "category": str, "category_id": int, "post_count": int}, "characteristics": [ {name, category, post_count, frequency}, ... ], "wiki_page_tags": [ {name, category, post_count}, ... ], "implied_by": [ {antecedent_name, consequent_name, status}, ... ], "implies_this": [ {antecedent_name, consequent_name, status}, ... ], "wiki": {"title": str, "other_names": [str], "body": str} | null, "resolved_from": {"original": str, "resolved": str, "corrected": bool} | null, "suggestions": [ {name, category, post_count, is_alias}, ... ] } Error: "Error: ".

Examples: - "Give me everything about Hoshino from Blue Archive" -> params with tag='hoshino_(blue_archive)'. - "Full profile of Rem from Re:Zero" -> params with tag='rem_(re:zero)'.

Inputs: params (required). Returns: result

danbooru_get_tag_implicationsA
Read-onlyIdempotent

Get the implication chain for a tag (A -> B auto-adds).

For character costume variants, use danbooru_get_character_profile which queries both directions. This tool queries only the antecedent direction (what does this tag imply).

A Danbooru implication A -> B means every post tagged A is automatically also tagged B. This tool queries the antecedent direction (what does this tag imply). For the reverse direction (what tags imply this tag, e.g. costume variants), use danbooru_get_character_profile which queries both directions.

For characters this often encodes the source work (hoshino_(blue_archive) -> blue_archive) and structural traits. Not every character tag has implications, so an empty list is a valid result.

Args: params (GetImplicationsInput): Validated input: - tag (str): Antecedent tag, e.g. 'hoshino_(blue_archive)'. - limit (int): Max implications (1-1000, default 50). - response_format (ResponseFormat): 'markdown' or 'json'.

Returns: str: Markdown table or JSON. Success JSON schema: { "query": str, "implications": [ {"id": int, "antecedent_name": str, "consequent_name": str, "status": str, "created_at": str} ] } Error: "Error: ".

Examples: - "What tags are auto-added when tagging Hoshino?" -> params with tag='hoshino_(blue_archive)'. - "Trace the implication chain of pink_hair" -> params with tag='pink_hair'.

Inputs: params (required). Returns: result

danbooru_get_wiki_pageA
Read-onlyIdempotent

Get the textual wiki description for a tag.

For complete character info, use danbooru_get_character_profile instead. This tool retrieves the wiki page only. Wiki pages contain the canonical description, often listing a character's appearance, source work, voice actor, and alternate costumes.

The body is written in Danbooru DText markup; this tool converts it to readable plain text in markdown mode.

Args: params (GetWikiInput): Validated input: - title (str): Wiki title, e.g. 'hoshino_(blue_archive)'. - body_limit (int): Truncate body to N chars (0 = full). - response_format (ResponseFormat): 'markdown' or 'json'.

Returns: str: Markdown or JSON. Success JSON schema: { "title": str, "category_name": str|null, "other_names": [str, ...], "body": str, "is_deleted": bool, "is_locked": bool, "created_at": str, "updated_at": str } Error: "Error: " (404 if no wiki page exists).

Examples: - "Describe Hoshino from Blue Archive" -> params with title='hoshino_(blue_archive)'. - "What does the ahoge tag mean?" -> params with title='ahoge'.

Inputs: params (required). Returns: result

danbooru_lookup_tagA
Read-onlyIdempotent

Utility: find or verify a tag's exact canonical name.

NOT for character analysis — use danbooru_get_character_profile or danbooru_search_character for that. This tool is for finding/verifying tag names and listing related tag variants (e.g. all costume variants of a character).

Uses Danbooru's autocomplete endpoint as the primary search engine because it reliably resolves aliases (e.g. amamya_kokoro -> amamiya_kokoro) and performs prefix matching without requiring explicit * wildcards. The tags.json endpoint is used only as a fallback when autocomplete returns nothing.

Args: params (LookupTagInput): Validated input: - query (str): Name pattern. Wildcards (*) supported but often unnecessary — autocomplete does prefix matching automatically. - category (Optional[TagCategory]): Filter by category. - limit (int): Max results (1-200, default 25). - order (str): 'count' | 'name' | 'date'. - hide_empty (bool): Hide zero-post tags (default True). - response_format (ResponseFormat): 'markdown' or 'json'. - auto_resolve (bool): Fall back to tags.json if autocomplete returns nothing (default True).

Returns: str: Markdown table or JSON. Success JSON schema: { "query": str, "results": [ {"name": str, "category": str, "category_id": int, "post_count": int, "is_deprecated": bool, "created_at": str, "is_alias": bool, "match_type": str} ] } Error: "Error: ".

Examples: - "Does the tag amamiya_kokoro exist?" -> query='amamiya_kokoro'. - "Find Amamiya Kokoro even if misspelled" -> query='amamya_kokoro' (autocomplete corrects it to amamiya_kokoro). - "List all Blue Archive character tags" -> query='*_(blue_archive)', category='character', order='count'.

Inputs: params (required). Returns: result

danbooru_search_characterA
Read-onlyIdempotent

Get visual trait frequencies for a character tag.

Best tool for character visual trait analysis. Use danbooru_get_character_profile if you also need wiki/implications. Given a character or copyright tag (e.g. hoshino_(blue_archive)), it returns the tags that most frequently appear alongside it on Danbooru posts. A tag with frequency 0.92 (like ahoge or pink_hair for Hoshino) appears in 92%% of posts carrying the query tag, so it is a defining visual trait.

Results are ordered by co-occurrence frequency (descending). Meta tags such as highres are excluded by default because they describe image quality, not the character.

When auto_resolve is enabled (default) and the queried tag does not exist on Danbooru, the tool automatically queries the autocomplete endpoint to find the correct name (e.g. correcting a misspelled amamya_kokoro to amamiya_kokoro), re-runs the search with the corrected name, and reports the correction in resolved_from.

Args: params (SearchCharacterInput): Validated input: - tag (str): Canonical Danbooru tag, e.g. 'hoshino_(blue_archive)'. - limit (int): Max related tags to return (1-100, default 25). - category (Optional[TagCategory]): Filter to one category. - min_frequency (float): Min co-occurrence frequency 0-1. - exclude_meta (bool): Drop meta tags (default True). - response_format (ResponseFormat): 'markdown' or 'json'. - auto_resolve (bool): Auto-correct misspelled tags (default True).

Returns: str: Markdown table or JSON. Success JSON schema: { "query": str, "tag": {"name": str, "category": str, "category_id": int, "post_count": int}, "related_tags": [ {"name": str, "category": str, "category_id": int, "post_count": int, "frequency": float, "jaccard_similarity": float, "overlap_coefficient": float} ], "wiki_page_tags": [ {"name": str, "category": str, "category_id": int, "post_count": int} ], "resolved_from": {"original": str, "resolved": str, "corrected": bool} | null, "suggestions": [ {name, category, post_count, is_alias}, ... ] # when tag not found } Error: "Error: ".

Examples: - "What does Hoshino from Blue Archive look like?" -> params with tag='hoshino_(blue_archive)' -> returns ahoge, pink_hair, blue_eyes, heterochromia, halo, ... - "Find all copyright tags related to this character" -> params with tag='hoshino_(blue_archive)', category='copyright'.

Inputs: params (required). Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.7/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clear, distinct purpose with explicit usage guidance. The comprehensive danbooru_get_character_profile is recommended as the first choice, while other tools handle specific subtasks like forward implications, wiki text, tag lookups, and visual trait frequencies. Overlap between get_character_profile and search_character is resolved by the description recommending get_character_profile for full info, minimizing ambiguity.

    Naming Consistency5/5

    All tools follow a consistent danbooru_verb_noun pattern in snake_case. Three use 'get', one uses 'lookup', and one uses 'search'—all clear verbs paired with specific nouns (character_profile, tag_implications, wiki_page, tag, character). No mixing of conventions or vague names.

    Tool Count5/5

    Five tools is well-scoped for a Danbooru search MCP covering character profiles, tag implications, wiki pages, tag lookups, and visual trait analysis. The number is neither too few to limit functionality nor excessive for the domain, providing a focused yet flexible set.

    Completeness4/5

    The tool surface covers core character/tag operations well: full profile, forward implications, wiki content, tag search, and visual trait analysis. Minor missing features include reverse implications only available within the profile tool (no standalone reverse tool) and lack of direct post/search capabilities. However, these gaps do not severely hinder common workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables searching and analyzing Danbooru tags, character statistics, and wiki information. Extracts tags from posts, analyzes frequently used tags for characters with customizable filters, and retrieves detailed wiki entries.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A Python MCP server that wraps the Gelbooru API. Connect it to any MCP-compatible client (Claude Desktop, Cursor, etc.) to search posts, look up tags, and generate Stable Diffusion prompts from real character appearance data — all directly from your AI assistant.
      2
      7
      1
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables semantic search of Danbooru tags using natural language queries to generate precise prompts for anime-style image generation.
      7
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables searching and retrieving anime and manga data from MyAnimeList via the Jikan API, including anime details, top rankings, and character information.
      140 npm
      MIT