ASCII & SVG Art Studio

ASCII & SVG Art Studio

Enables AI to create ASCII and SVG art through a character canvas, with tools for drawing, previewing, and exporting to multiple formats, as well as composing stop-motion animations with optional voice-over.

Category
访问服务器

README

      .   *   .          *      .    *
   *     ┌──────────────────────────┐   .
      .  │   A S C I I  &  S V G    │  *
   .     │       A R T   S T U D I O│     .
      *  └──────────────────────────┘  .
      .    *      .     *      .   *

ASCII & SVG Art Studio

English | 简体中文

An MCP server that gives an AI a drawing hand made of text. Build a character canvas, watch it render as a real PNG you can look at, iterate, export to PNG / JPG / PDF / SVG / TXT, or shoot a stop-motion animation and composite it into an MP4/GIF — with an optional voice-over synthesized from text.

It exposes itself to any MCP client as ASCII & SVG Art Studio.

What it looks like

<table> <tr> <td align="center"><img src="gallery/moonlit_bay/moonlit_bay.png" alt="Moonlit Bay — a night scene of a mountain silhouette, a full moon, scattered stars, and rippling water, drawn entirely in ASCII shading and framed in a double-line box" width="420"></td> <td align="center"><img src="gallery/daybreak_bay/daybreak_bay.png" alt="Daybreak Bay — the same bay at dawn: a backlit mountain silhouette, a half-risen sun with its shimmering reflection, fading stars, two birds, and a small sailboat heading out" width="420"></td> </tr> <tr> <td align="center"><em>"Moonlit Bay" — Claude Opus 4.6</em></td> <td align="center"><em>"Daybreak Bay" — Claude Fable 5</em></td> </tr> </table>

The same bay, by night and at dawn — a diptych drawn start to finish through this MCP's tools by two different Claude models: canvas drawing, shaded fills, box frames, rendered to PNG for preview, then exported to gallery/ in PNG, JPG, TXT (editable source), and print-ready PDF. Nothing was hand-edited outside the tool calls.

Tools

Tool What it does
create_canvas Create a character canvas to draw on (up to 10M cells)
canvas_draw Batch-draw onto a canvas: text, box, hline/vline/line, fill (shaded palettes), stamp, circle, ellipse, clear, char
canvas_get Read a canvas back as text; supports reading just a region for large canvases
canvas_resize Resize a canvas, keeping existing content where it still fits
canvas_list / canvas_delete List / remove canvases
preview Render text, a canvas, or SVG to a PNG and hand it back inline so the model can actually see it
save Write to disk as PNG / JPG / PDF / SVG / TXT — quality and print-friendly (white bg) options included
create_table Build a formatted ASCII table
export One call to gallery/<name>/: editable source, metadata, and every requested format, organized
animation_frame Stop-motion style: snapshot a canvas (or raw text) as one frame, with a hold (repeat count)
animation_render Composite frames into MP4/GIF with ffmpeg; MP4 can be muxed with an audio track
animation_list / animation_delete List / remove in-memory animations
speak Text-to-speech via espeak-ng with an effects chain (robot / radio / echo / cave / deep) — feed the output straight into animation_render as a voice-over
list_styles Reference sheet: available box-drawing styles and shading palettes

The typical loop is draw → preview → tweak → preview again → save/export — the model gets to actually look at its own work before committing to a file.

Installation

Requires Python >= 3.10.

git clone https://github.com/SolenmeChiara/ASCII_ART_MCP.git
cd ASCII_ART_MCP
pip install -r requirements.txt

That gets you canvases, PNG/JPG/PDF/TXT export, and animation rendering. Two things are optional or external:

  • SVG rendering (the svg= input/output paths) needs cairosvg, which isn't in requirements.txt by default:
    pip install cairosvg
    
    On Windows, cairosvg also needs the GTK runtime installed separately.
  • Animation rendering (animation_render, export with mp4/gif) needs ffmpeg on your PATH.
  • Voice synthesis (speak) needs espeak-ng. It's looked up on PATH first, then at C:/Program Files/eSpeak NG/.

Known limitation: font handling is Windows-first

Text rendering (preview / save / export when the source isn't already an image) picks fonts from built-in candidate lists. On Windows that's C:/Windows/Fontsseguisym.ttf, msgothic.ttc, simsun.ttc, consola.ttf, cour.ttf — covering monospace + symbols + CJK. Linux/macOS have their own fallback chain (DejaVu Sans Mono, Menlo, Monaco, Apple Symbols, PingFang — see server.py:288-335, server.py:505-507), but it has only been tested on Windows, and the Linux list currently has no CJK entry, so Chinese/Japanese/Korean glyphs may render as boxes there. The speak tool finds espeak-ng via PATH first and only falls back to the Windows install location (server.py:1440-1443), so a normally installed espeak-ng on Linux/macOS should just work. If your platform's fonts live elsewhere, point _find_font/_FALLBACK_FONT_PATHS at them. PRs welcome.

Running it

Mode A — stdio (local, the usual case)

Run it directly:

python server.py

Claude Desktop — add to your MCP config:

{
  "mcpServers": {
    "ascii-art-studio": {
      "command": "python",
      "args": ["/path/to/ASCII_ART_MCP/server.py"]
    }
  }
}

Claude Code:

claude mcp add ascii-art-studio -- python /path/to/ASCII_ART_MCP/server.py

Mode B — Streamable HTTP (remote / from your phone)

cp .env.example .env
python -c "import secrets; print(secrets.token_urlsafe(32))"
# paste the output into MCP_PATH_SECRET in .env
start_http.bat

This serves on port 8767. The MCP endpoint is at:

http://<host>:8767/mcp/<MCP_PATH_SECRET>/

with a plain health check at /health. To expose it to the internet without port-forwarding, start_tunnel.bat opens a Cloudflare quick tunnel (cloudflared) and prints a random *.trycloudflare.com URL.

Security note. The path secret is the only authentication this server has. Keep .env out of version control (it already is — see .gitignore) and don't share the URL casually. The HTTP transport also disables MCP's DNS-rebinding protection (server.py:611-613) so it works behind a tunnel or bare IP — which means you should never run it publicly without a secret set. If MCP_PATH_SECRET is empty, http_server.py refuses to mount the MCP endpoint at all.

A quick example

create_canvas(width=60, height=20, name="scene")
canvas_draw("scene", [
    {"op": "box",  "x": 0, "y": 0, "w": 60, "h": 20, "style": "double", "title": "Hello"},
    {"op": "fill", "x": 1, "y": 1, "w": 58, "h": 18, "palette": "blocks", "direction": "radial"},
    {"op": "text", "x": 22, "y": 10, "text": "Hello, world!"}
])
preview(canvas="scene")                       # look at it
save(path="D:/art/hello.png", canvas="scene") # happy with it, keep it

Credits

Inspiration and reference drawn from ascii-art-mcp by dmarsters and nakkas by arikusi. Thanks for showing what this space could look like.

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

官方
精选