Brand Images → Notion

Brand Images → Notion

Enriches Claude with tools to generate brand-consistent images using OpenAI's gpt-image-2 and upload them directly to Notion pages.

Category
访问服务器

README

Brand Images → Notion

Generate on-brand images with OpenAI's gpt-image-2 and drop them straight into a Notion page — all by chatting with Claude. You bring a brand/design guide and an idea ("make me an infographic about X"); Claude reads the guide, writes the image prompt, renders it, and uploads the result into Notion as a real image block. No public image hosting, no manual drag-and-drop.

It's a small MCP server with three tools that Claude drives:

Tool What it does
generate_brand_image Renders a PNG with gpt-image-2 — via the OpenAI API (default) or the Codex CLI.
upload_image_to_notion Uploads a local image into a Notion page (Notion-hosted, private).
check_setup Reports which keys/backends are ready.

Quick start (no coding required)

You'll do everything by talking to Claude Code (the CLI, the desktop app, or the VS Code extension).

  1. Get the repo onto your machine. In Claude, say:

    Clone https://github.com/jacobwjs/brand-images-to-notion and open it.

  2. Let Claude set it up. Then say:

    Set up this repo.

    Claude reads CLAUDE.md and walks you through it: installs uv, creates your .env, and asks you for two things —

    • an OpenAI API key (https://platform.openai.com/api-keys), and
    • a Notion integration token (https://www.notion.so/my-integrations) — Claude will explain how to make one and how to share your Notion page with it.
  3. Restart Claude Code when it asks (so the server and your keys load), then say:

    Run check_setup.

  4. Make something. Point Claude at your brand guide and ask, e.g.:

    Here's our brand guide ~/Desktop/brand.html. Make a portrait infographic about why Acme should hire us, and upload it to this Notion page: <paste page URL>.

That's it. Ask for "two different variants" any time you want options.


What you need

  • Claude Code (you're already using it).
  • An OpenAI API key — for image generation. (Or use the Codex CLI backend instead; run codex login once — no key needed.)
  • A Notion integration token, with your target page shared to it.
  • Your brand/design guide in a normal local folder. ⚠️ Not inside Google Drive / iCloud "CloudStorage" folders — macOS blocks reading those. Drag a copy to your Desktop first if needed.

Manual setup (for the technically curious)

# 1. Install uv (launches the server with no pip/venv juggling)
curl -LsSf https://astral.sh/uv/install.sh | sh

# 2. Configure secrets
cp .env.example .env        # then edit .env and fill in your keys

# 3. The server is registered via .mcp.json. Open the folder in Claude Code,
#    approve the "brand-images" server, restart, and ask Claude to run check_setup.

No-uv fallback: pip install mcp, then set .mcp.json to "command": "python3", "args": ["server.py"].


How it works

  1. Claude reads your brand guide and writes a detailed gpt-image-2 prompt (exact colors, fonts, logo, layout, verbatim text).
  2. generate_brand_image renders it to a PNG.
  3. upload_image_to_notion uses Notion's File Upload API (create → send → attach) to post it as a native image block — privately hosted by Notion, no public URL.

Notes & limits

  • Image models occasionally reinterpret logos or garble small text. Just re-run (each run differs) or ask Claude to refine one detail. The output is always the real gpt-image-2 image — never a code-drawn substitute.
  • Keep your tokens in .env (git-ignored). Rotate any token you paste into a chat.
  • When an image references another company, use their name as text only — don't reproduce their logo.

Troubleshooting

Most issues are setup-related. Tell Claude what you see and it can usually fix it — but here are the common ones:

Symptom Fix
Operation not permitted when Claude reads your brand file The file is inside a Google Drive / iCloud CloudStorage/ folder, which macOS blocks. Drag a copy to your Desktop or Downloads and point Claude there.
check_setup says a key is missing even though you edited .env Claude Code only loads .env and MCP servers at startup. Fully restart / reopen the folder, then run check_setup again.
The brand-images tools don't appear When Claude Code starts, it asks you to approve the brand-images server — approve it, then restart. Confirm .mcp.json is present in the folder.
uv: command not found Install it: curl -LsSf https://astral.sh/uv/install.sh | sh (or brew install uv). No-uv fallback: pip install mcp, then set .mcp.json to "command": "python3", "args": ["server.py"].
OpenAI image error / 400 / quota Make sure billing is enabled on your OpenAI account (image generation isn't free), and your key is valid. Or switch to the Codex backend: run codex login, then ask for backend="codex".
Notion upload fails (404 / "could not find page") The page isn't shared with your integration. Open the page → •••Connections → add your integration, then retry. Also check the page URL is correct.
Notion says "unauthorized" / 401 NOTION_TOKEN is wrong or missing in .env. Re-copy it from https://www.notion.so/my-integrations.
The image text is garbled or the logo looks off Normal for image models. Ask Claude to re-run (each run differs) or to refine one detail. It will never substitute a code-drawn image.
You pasted a token into a chat Rotate it: delete/regenerate the integration secret in Notion (or the key in OpenAI) and update .env.

License

MIT — see LICENSE.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选