scuffed-painter
Scuffed Painter
一个使用 Pillow 将绘图命令渲染为栅格图像的 MCP(Model Context Protocol)服务器。它暴露两个工具:
draw_image— 渲染命令并将结果作为内联 PNG 图像返回。draw_image_to_file— 渲染命令并将结果保存到文件。
支持五种形状,每种形状都是一个 JSON 对象,通过其 "shape" 字段区分:
shape | 参数 |
|
|
|
|
|
|
|
|
|
|
命令按列表顺序在固定大小的白色画布上执行;后面的命令会覆盖先前的命令。颜色可以是 CSS 颜色名称或十六进制颜色代码。
安装
pip install .这将提供 scuffed-painter 控制台脚本,它通过 stdio 启动 MCP 服务器(默认方式)。python -m scuffed_painter 是等效的替代方式。同样的命令还可以通过 HTTP(MCP Streamable HTTP 传输)运行服务器:
scuffed-painter # stdio transport (default)
scuffed-painter --transport http # HTTP on 127.0.0.1:8000
scuffed-painter --transport http --host H --port P--host 和 --port 仅适用于 HTTP 传输;默认值为 127.0.0.1 和 8000。如有必要,可以使用 --enable-cors 启用 CORS。
Related MCP server: openai-imagegen-mcp
MCP 主机配置
stdio
将服务器添加到 MCP 主机的 stdio 服务器配置中:
{
"mcpServers": {
"scuffed-painter": {
"command": "scuffed-painter"
}
}
}注意:在 PATH 受限的主机上,或在 virtualenv 中运行时,请改用已安装的 scuffed-painter 脚本的绝对路径(例如 which scuffed-painter 报告的路径)。
Streamable HTTP
自行启动服务器,然后将 MCP 主机指向该端点(路径为 /mcp):
scuffed-painter --transport http --host 127.0.0.1 --port 8000{
"mcpServers": {
"scuffed-painter": {
"type": "streamable-http",
"url": "http://127.0.0.1:8000/mcp"
}
}
}(调整键名以匹配 MCP 主机的配置格式。)
注意:使用 draw_image_to_file 时,output_path 指的是服务器运行所在的机器。通过 stdio 时,该机器与 MCP 客户端位于同一主机;当通过 HTTP 访问服务器时,该机器则是服务器所在的主机。
示例工具调用
{
"width": 200,
"height": 200,
"commands": [
{"shape": "circle", "center": [100, 80], "radius": 50, "fill": "gold", "outline": "orange", "width": 3},
{"shape": "triangle", "points": [[50, 170], [150, 170], [100, 70]], "fill": "darkgreen"},
{"shape": "line", "start": [20, 185], "end": [180, 185], "color": "black", "width": 2}
]
}开发
仓库布局:
scuffed_painter/ the package
server.py server, tools, command models, rendering
__init__.py re-exports mcp, defines __version__
__main__.py python -m scuffed_painter support
py.typed typing marker
tests/ pytest suite (in-process fastmcp.Client)安装并运行测试:
pip install -e ".[dev]"
python -m pytestMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables creation, management, and export of Excalidraw drawings through natural language. Supports CRUD operations on drawings and export to SVG, PNG, and JSON formats with file-based storage.81,917The Unlicense
- FlicenseNot gradedqualityDmaintenanceEnables image generation and editing via OpenAI's gpt-image-1 model, with options for saving, format control, and transparency.
- FlicenseNot gradedqualityDmaintenanceEnables to create, compose, and export SVG documents programmatically using the svgwrite library through tool calls. Supports shapes, groups, gradients, and pattern generators.
- FlicenseNot gradedqualityBmaintenanceEnables image generation and editing via third-party relay services. Returns local file paths and Markdown display hints.
Related MCP Connectors
Generate images, GIFs, and PDFs from HTML, URLs, or templates — from your AI agent.
Create diagrams in chat, rendered as live interactive draw.io diagrams. 10,000+ searchable shapes.
Generate logos, social posts, app screenshots, comic panels & visual-novel assets from prompts.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/viktor-haag/scuffed-painter'
If you have feedback or need assistance with the MCP directory API, please join our Discord server