Carbono
Enables AI to generate images by describing them with HTML using Tailwind CSS and DaisyUI, which are rendered to PNG images.
README
Carbono — Image-generation MCP for the AI
Carbono is an MCP server whose purpose is to generate images for the AI. The AI describes the visual content with HTML (using Tailwind CSS v4 classes and DaisyUI components) and Carbono renders it to PNG with headless Chrome, returning the image inline as an MCP image content block.
The transport is stdio: the server speaks JSON-RPC over stdin/stdout, so
it integrates directly with any MCP client (Claude Desktop, Claude Code, etc.)
without opening ports or running HTTP servers.
- npm: https://www.npmjs.com/package/mcp-carbono
- GitHub: https://github.com/dinnger/mcp-carbono
npm i mcp-carbono
How it works
AI ──(HTML + Tailwind/DaisyUI)──▶ Carbono (MCP stdio)
│
├─ compiles CSS (Tailwind v4 + DaisyUI)
├─ assembles a full HTML document
└─ renders with headless Chrome (Puppeteer)
│
AI ◀──────────(inline PNG image)──────┘
Carbono keeps a workspace on disk with documents, pages, templates and reusable palettes, so the AI can build compositions step by step and re-render them whenever needed.
Project structure
index.ts → stdio entrypoint (boots the McpServer)
tools.ts → Central tool registry (Registry Pattern)
types.ts → Shared types: ToolDefinition, ok() helper
tools/ → Tool definitions by domain
├─ document.tool.ts → create / get / list / delete / history of documents
├─ page.tool.ts → add / edit / reorder pages and render to PNG
├─ palette.tool.ts → color palettes and DaisyUI themes
└─ template.tool.ts → reusable templates
carbono/ → Rendering and storage core
├─ render.ts → HTML → PNG with headless Chrome
├─ tailwind.ts → compiles Tailwind v4 + DaisyUI
├─ schema.ts → Zod schemas of the data model
├─ store.ts → workspace persistence
└─ history.ts → operation history and rollback
util/ → envs, logger and workspace paths
scripts/ → Puppeteer browser installation
Requirements
- Bun — the entrypoint runs on Bun (
#!/usr/bin/env bun) - A Chromium browser for Puppeteer (downloaded automatically on
postinstall)
Installation
Install from npm:
npm i mcp-carbono
Installing the package downloads Chromium automatically (via postinstall). To
(re)download the browser manually:
npm run browser:install
Running
bunx mcp-carbono
# or, if installed locally
bun run start
The process waits for JSON-RPC messages on stdin. It prints nothing to stdout
(reserved for the MCP protocol); logs are written to logs/agents.log.
Configuring an MCP client
Claude Code
Add the server with the CLI:
claude mcp add carbono -- bunx mcp-carbono
Or, for all your projects (user scope):
claude mcp add --scope user carbono -- bunx mcp-carbono
Check it was registered with claude mcp list.
Claude Desktop
Edit claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json,
Windows: %APPDATA%\Claude\claude_desktop_config.json) and add:
{
"mcpServers": {
"carbono": {
"command": "bunx",
"args": ["mcp-carbono"]
}
}
}
Then restart Claude Desktop.
Codex
Add the server to ~/.codex/config.toml:
[mcp_servers.carbono]
command = "bunx"
args = ["mcp-carbono"]
Or register it with the Codex CLI:
codex mcp add carbono -- bunx mcp-carbono
Windows note: if
bunxis not found, use the absolute path tobunx.cmd(or setcommand = "cmd",args = ["/c", "bunx", "mcp-carbono"]).
Available tools
All tools are exposed with the carbono_ prefix.
Documents
| Tool | Description |
|---|---|
carbono_document_create |
Creates a document (optionally from a template and with a palette) |
carbono_document_get |
Returns the document metadata and the list of pages (id and name, without the HTML) |
carbono_document_page_get |
Returns the full information of a single page (including its HTML) |
carbono_document_list |
Lists the stored documents |
carbono_document_delete |
Deletes a document |
carbono_document_rename |
Renames a document |
carbono_document_history |
Returns the operation history |
carbono_document_rollback |
Rolls the document back to a previous version |
Pages (includes image generation)
| Tool | Description |
|---|---|
carbono_page_add |
Adds a page with HTML (Tailwind + DaisyUI) |
carbono_page_update |
Replaces a page's HTML |
carbono_page_delete |
Deletes a page |
carbono_page_reorder |
Reorders the pages |
carbono_page_get_html |
Returns the raw HTML or the assembled document |
carbono_page_screenshot |
Renders the page to PNG and returns it inline. With save: true (or a path) it also writes the file to disk and returns the absolute path |
Palettes
| Tool | Description |
|---|---|
carbono_palette_save |
Saves a palette (CSS variables + DaisyUI theme) |
carbono_palette_list |
Lists the saved palettes |
carbono_palette_apply |
Applies a palette to a document |
carbono_palette_delete |
Deletes a palette |
Templates
| Tool | Description |
|---|---|
carbono_template_save |
Saves a document (or a subset of pages) as a template |
carbono_template_list |
Lists the templates |
carbono_template_apply |
Applies a template to a new or existing document |
carbono_template_delete |
Deletes a template |
Typical flow
carbono_document_create→ create a document.carbono_palette_save+carbono_palette_apply→ (optional) define the colors.carbono_page_add→ add one or more pages with HTML/Tailwind/DaisyUI.carbono_page_screenshot→ get the PNG image ready for the AI.
Image generation
carbono_page_screenshot renders the page with headless Chrome via Puppeteer
(carbono/render.ts). In development (Windows/macOS) Puppeteer
uses the Chromium it downloads at install time; on Linux servers, the stability
flags (--no-sandbox, --disable-dev-shm-usage, --no-zygote, etc.) are already
configured.
Environment variables
| Variable | Description | Default |
|---|---|---|
CARBONO_WORKSPACE_DIR |
Workspace folder (documents, templates, palettes, history). | <project>/workspace |
CARBONO_PUPPETEER_EXECUTABLE |
Path to a system Chrome/Chromium binary. Only if you want to force your own instead of Puppeteer's. | (empty → uses Puppeteer's) |
PUPPETEER_CACHE_DIR |
Browser cache path. If set, honor it both at install and run time. | <project>/.puppeteer-cache |
Notes
- The transport is stdio; there is no HTTP server or webhooks.
stdoutis reserved for the MCP protocol: logging is written tologs/agents.log.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。