Skip to main content
Glama

BOOTH Lens MCP

A remote Model Context Protocol server for BOOTH Lens — image and text search for BOOTH outfits, clothing, and hair.

This repository contains only the MCP adapter. It calls the public BOOTH Lens HTTP API; it does not contain the search model, weights, catalog data, or account database.

Hosted endpoint

https://booth.catlee.fun/mcp/

The endpoint uses MCP Streamable HTTP. Anonymous access is rate-limited by client IP. Query images are sent ephemerally and are not stored by the service.

Related MCP server: Danbooru Tag RAG MCP Server

Tools

Tool

What it does

search_by_text

Natural-language search (Chinese, English, Japanese), clothing or hair

search_by_image

Visual search from raw base64 or a data:image/... URL

search_by_image_url

Visual search from a public http(s) image URL

health

Check which search pools are loaded

Results include item_id, name, url, image_url, hearts, item tags, and a similarity score. Public BOOTH URLs are returned; images are not copied.

Use the hosted server

Claude Code

claude mcp add --transport http booth-lens https://booth.catlee.fun/mcp/

Cursor

~/.cursor/mcp.json:

{
  "mcpServers": {
    "booth-lens": {
      "url": "https://booth.catlee.fun/mcp/"
    }
  }
}

VS Code

.vscode/mcp.json:

{
  "servers": {
    "booth-lens": {
      "type": "http",
      "url": "https://booth.catlee.fun/mcp/"
    }
  }
}

Clients that only speak stdio

Bridge the remote endpoint with mcp-remote:

{
  "mcpServers": {
    "booth-lens": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://booth.catlee.fun/mcp/"]
    }
  }
}

If your client does not follow redirects, keep the trailing slash in the URL.

Example prompts

  • Find a white blouse with a ribbon for a VRM avatar.

  • Search hair: long silver twin tails.

  • Use this image to find the outfit: ...

Self-host the adapter

The adapter only needs outbound access to a BOOTH Lens API.

python -m venv .venv
. .venv/bin/activate
pip install -e .
BOOTH_LENS_API_URL=https://booth.catlee.fun \
BOOTH_MCP_PUBLIC_HOST=localhost \
booth-lens-mcp

The MCP endpoint is then:

http://127.0.0.1:8002/mcp/

Docker

docker build -t booth-lens-mcp .
docker run --rm -p 8002:8002 \
  -e BOOTH_MCP_PUBLIC_HOST=localhost \
  booth-lens-mcp

Behind a reverse proxy, set BOOTH_MCP_PUBLIC_HOST to the public hostname so the MCP transport security allowlist accepts the Host header.

Configuration

Variable

Default

Meaning

BOOTH_LENS_API_URL

https://booth.catlee.fun

Backend API base URL

BOOTH_MCP_PUBLIC_HOST

localhost

Public hostname for transport security

BOOTH_MCP_HOST

127.0.0.1

Listen address

BOOTH_MCP_PORT

8002

Listen port

BOOTH_MCP_RATE_LIMIT

120

Per-IP MCP requests per minute; 0 disables

BOOTH_MCP_MAX_BODY_BYTES

33554432

Max MCP request body

BOOTH_MCP_MAX_IMAGE_BYTES

20971520

Max decoded image size

BOOTH_MCP_REQUEST_TIMEOUT

120

Backend request timeout (seconds)

See .env.example.

Privacy and limits

  • No login or account data is exposed through MCP.

  • Query images are forwarded ephemerally; the backend is called with ephemeral=true for image and URL searches.

  • Only public catalog metadata and BOOTH image URLs are returned.

  • MCP requests are limited per IP; the backend applies its own search limits too.

  • Responses can be slower when the GPU queue is busy; clients should allow long-running tool calls.

Not included

  • Search model checkpoints, LoRA weights, and catalog data

  • BOOTH images or a mirror of BOOTH content

  • The BOOTH Lens web UI, accounts, favorites, or history

BOOTH Lens is an independent project and is not affiliated with BOOTH.

Development

pip install -e ".[dev]"
pytest

The adapter uses the official Python MCP SDK (mcp>=2.3) and FastAPI.

License

MIT. See LICENSE.

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables searching local images using natural Japanese queries, leveraging a Japanese-specific CLIP model for similarity search and providing efficient caching and fast retrieval via MCP and HTTP endpoints.
      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
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables users to search and retrieve photos from a self-hosted Immich photo library via natural language, supporting CLIP-based semantic search, metadata filtering, album browsing, and share link creation.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to search, filter, and manage a private local photo library with CLIP-based text and similarity search, EXIF/GPS metadata, duplicate detection, albums, and folder indexing, returning ranked results and optional contact sheets.
      MIT