Booru-Pictag-Get-MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Booru-Pictag-Get-MCPsearch for hatsune_miku on danbooru"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Booru-Pictag-Get-MCP
⚠️ 纯 AI 生成声明 | Pure AI-Generated Notice — 详见
AIGC_NOTICE.md
An MCP server that searches booru image boards (Danbooru / AIBooru / e621 / Gelbooru / Rule34) and cleans their tags into ready-to-use AI-art prompts for Stable Diffusion / Illustrious / Pony / SDXL and any booru-tag-driven model.
This is a Python port + MCP integration of booru-prompt-gallery by Mexes-GM (MIT). The prompt-cleaning pipeline — tag extraction, multi-subject guard, smart tag combination, redundancy folding, category splitting, background modes — is a 1:1 port of the original TypeScript modules. Wrapped as 4 callable MCP tools, no Web UI, no Supabase/Redis/Cloudflare deps. See AIGC_NOTICE.md for the full derivation & attribution.
Upstream | Mexes-GM/booru-prompt-gallery — TypeScript + Next.js 15 web app (MIT) |
This repo | echo-xianyu/Booru-Pictag-Get-MCP — Python 3 + FastMCP server |
License | MIT — original credit preserved, dual attribution. See |
Install
Option A — local path
Clone, then point uvx at the local checkout:
git clone https://github.com/echo-xianyu/Booru-Pictag-Get-MCP.git
cd Booru-Pictag-Get-MCP
uvx --from . booru-pictag-get-mcpOption B — cloud / direct from GitHub
uvx --from "git+https://github.com/echo-xianyu/Booru-Pictag-Get-MCP" booru-pictag-get-mcpHTTP/2 extra (recommended — required for e621)
uvx --from . --with h2 booru-pictag-get-mcpe621's TLS stack frequently errors out on HTTP/1.1 keep-alive. The HTTP client auto-detects h2 and falls back to HTTP/1.1 if absent.
Related MCP server: Deepghs MCP
Configure (opencode / any MCP client)
{
"mcp": {
"booru-pictag-get": {
"command": "uvx",
// Option A — local:
"args": ["--from", "E:\\MCP\\booru-pictag-get-mcp", "booru-pictag-get-mcp"],
// Option B — cloud (no checkout on disk):
// "args": ["--from", "git+https://github.com/echo-xianyu/Booru-Pictag-Get-MCP", "booru-pictag-get-mcp"],
// HTTP/2 for e621 — prepend "--with", "h2" to args above.
"environment": {
"BOORU_DEFAULT_PROVIDER": "danbooru",
"DANBOORU_USERNAME_APIKEY": "youruser:yourkey", // optional, raises rate limit
"GELBOORU_USER_ID": "<your_user_id>", // required by Gelbooru since 2025-08
"GELBOORU_API_KEY": "<your_api_key>",
"RULE34_USER_ID": "<your_user_id>", // required by Rule34 since 2025-08
"RULE34_API_KEY": "<your_api_key>"
}
}
}
}API key policy (Aug 2025): Danbooru, AIBooru, and e621 work with no key. Gelbooru and Rule34 tightened auth and now require keys. Without them, those two providers return 401; the others keep working.
Tools
Tool | Use it for |
| Recommended. Search a booru tag → ready-to-use cleaned prompt + category split. One step. |
| Clean an already-known tag set (no network). Accepts raw booru format or comma-list. |
| Raw post list (no cleaning). Inspect original tags before deciding how to process them. |
| Turn a natural word into the canonical booru tag form. Call this BEFORE search if unsure of a tag's spelling. |
Each tool's description in tools/list carries full search-semantics guidance:
Booru search is tag-based AND, not keyword search. Prefer a single tag (
hatsune_miku) over stacking (hatsune_miku blue_hair smile), which usually returns 0 posts.Multi-word tags use underscore:
blue_hair, neverblue hair.Don't write natural-language queries ("a girl with blue hair sitting in a classroom"); translate to booru tags first via
autocomplete_tags.
Scope & design choices
Pure Python — no Supabase / Redis / Cloudflare / Vercel. Endpoints are public booru APIs; no proprietary backend.
Tag-conflict rules are off by default in the prompt pipeline (mirrors the original
cleanPrompt.ts, which never calledtag-conflicts.ts). The 180+ rules were authored assuming a single subject — enabling them by default would mangle legitimate multi-character prompts (e.g.1girl+1boysex scenes,smile+cryingbittersweet scenes,long_hair+short_hairtwo-character shots). The resolver remains callable viabooru_mcp.core.tag_conflicts.resolve_conflicts()for explicit opt-in.optimize_tagshas a multi-subject guard: when the prompt contains multi-character markers (2girls/2boys/multiple_*/couple/group/duo…), it skips the hair-length / breast-size / eye-color "keep best per hierarchy" pick and the shared-noun tag combination — so two characters with different features survive intact.Tag categories for Gelbooru/Rule34 come from a static
data/tag_categories.jsondictionary (one-shot dump from Danbooru's publictags.json, generated byscripts/dump_tag_categories.py) with a keyword-classifier fallback. No external database at runtime.Tag-conflict rules are overridable via
data/tag_conflicts_overrides.json(additive — overrides can only widen a built-in rule, never narrow it). Seedata/tag_conflicts_overrides.example.json. Audit current rules withpython scripts/inspect_tag_conflicts.py --builtin.
Credits
Prompt-cleaning pipeline ported (1:1 line-for-line where possible) from booru-prompt-gallery by Mexes-GM (MIT). Original copyright preserved in LICENSE.
Python port + MCP server by echo-xianyu. The vast majority of the code was generated by AI (opencode + GLM-5.2); see AIGC_NOTICE.md for the full statement.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/echo-xianyu/Booru-Pictag-Get-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server