mcp-thumbapi

mcp-thumbapi

It generates blogpost images, thumbnails, social post images just from the title.

Category
访问服务器

README

@thumbapi/mcp-server

MCP server that exposes the ThumbAPI thumbnail generation endpoint as a Model Context Protocol tool. Point any MCP-compatible AI agent at it and ask for a YouTube thumbnail, Instagram post, X/Twitter card, LinkedIn share, or blog hero image from a title.

  • Transport: stdio (local, no remote server)
  • Runtime: Node.js 18+, installed via npx
  • Tools exposed: generate_thumbnail, login, logout

Sign in

The first time you use the MCP, ask your client (Claude Desktop, Cursor, Claude Code, Windsurf, Cline, Continue) to "log in to thumbapi" — that triggers the login tool. It:

  1. Spins up a one-shot local callback server on a random loopback port.
  2. Opens your browser to app.thumbapi.dev/mcp-login.
  3. Waits for you to click Authorize on the page (log in first if needed).
  4. Writes your API key to ~/.thumbapi/config.json (mode 0600, dir 0700).

Every subsequent generate_thumbnail call reads from that file. No copy-paste.

To sign out locally, ask your client to "log out of thumbapi" — that runs the logout tool, which deletes ~/.thumbapi/config.json. The key on the ThumbAPI dashboard is untouched (rotate it in the dashboard if you also want to invalidate the key server-side).


Install & configure

Below are configs for the 5 most common MCP clients. Each uses the same command and args — only the config file location and JSON wrapper shape change per client. No API key goes into the config; the login tool handles that on first use.

Claude Desktop

Config file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "thumbapi": {
      "command": "npx",
      "args": ["-y", "@thumbapi/mcp-server"]
    }
  }
}

Restart Claude Desktop after saving.

Cursor

Config file: ~/.cursor/mcp.json (or per-project .cursor/mcp.json)

{
  "mcpServers": {
    "thumbapi": {
      "command": "npx",
      "args": ["-y", "@thumbapi/mcp-server"]
    }
  }
}

Reload Cursor's MCP servers from Settings → MCP.

Windsurf

Config file: ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "thumbapi": {
      "command": "npx",
      "args": ["-y", "@thumbapi/mcp-server"]
    }
  }
}

Open Windsurf → Settings → Cascade → MCP Servers → Refresh.

Cline (VS Code extension)

Config file:

  • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
  • Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "thumbapi": {
      "command": "npx",
      "args": ["-y", "@thumbapi/mcp-server"]
    }
  }
}

Open the Cline sidebar → MCP Servers → Restart.

Continue.dev

Config file: ~/.continue/config.json

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@thumbapi/mcp-server"]
        }
      }
    ]
  }
}

Reload Continue from the VS Code / JetBrains extension.


Tool reference

generate_thumbnail

Generates a thumbnail from a title.

Param Type Required Notes
title string (1–200 chars) yes The headline / video title.
format youtube | instagram | x | blogpost | linkedin yes Target platform / aspect ratio.
model sd | hd no Default sd (10 credits). hd needs Pro/Business (20 credits).
outputFormat webp | png no Default webp.
category one of the values below no Content category hint that biases visual style. Omit to auto-detect from the title.

category accepted values — the schema constrains this to the list below; the LLM should pick the closest match, or leave category unset:

auto, tech-saas, business-finance, education-tutorial, fitness-wellness, medical-healthcare, lifestyle-vlog, food-cooking, travel, gaming, entertainment-comedy, news-commentary, creative-design.

Returns an MCP image content block plus a text summary that includes:

  • generationId — stable ID for the generation (useful for logs and audits).
  • imageUrl — public URL on ThumbAPI's CDN. Use this to download or embed the image without decoding base64. The URL is served from Cloudflare R2 and is returned on every successful generation (v1.1.0+).

login

Signs the MCP server in to ThumbAPI. Starts a local callback server on a random loopback port, opens your browser to https://app.thumbapi.dev/mcp-login?callback=…&state=…, and waits for you to click Authorize on the page. The returned API key is written to ~/.thumbapi/config.json (mode 0600, directory 0700).

  • Takes no arguments.
  • Blocks up to ~30 seconds per invocation waiting for the browser callback. If you haven't consented yet, the tool returns "Waiting for browser approval…" — just call login again to keep polling. The underlying local server stays alive across calls for up to 15 minutes.
  • Idempotent: calling login again while a flow is in progress reuses the same URL / port.
  • Only accepts callback traffic bound to 127.0.0.1 and requires the CSRF state param to match — no other machine on your LAN can hit the callback.

logout

Deletes ~/.thumbapi/config.json. Takes no arguments. Does not revoke the key server-side — rotate it in the dashboard if you want to invalidate the key everywhere.


License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选