ShapeWords MCP

io.github.kirrrr-2423由 GitHub 账号 kirrrr-2423 发布v0.2.2更新于 Oct 24, 2026

Generate ShapeWords word clouds as SVG, PNG, or JSON from text or weighted words.

已验证STDIO仅桌面开发者工具媒体与设计

概览

AI 生成的概览

ShapeWords MCP 让助手根据文本或带权重的词生成 SVG、PNG 或 JSON 词云,可使用托管的 ShapeWords 服务,也可在本地用 Skia 引擎渲染。

可以做什么
一次调用即可从原始文本或显式加权词生成词云,返回产物链接、任务元数据和可选的图片内容。异步创建渲染任务,之后按任务 ID 查询状态。选择输出格式(SVG、PNG 或 JSON 布局数据)、画布尺寸、背景、质量、调色板、配色方式、字体和字号。从内置形状、品牌形状或自定义 SVG 路径中选择遮罩形状,并控制旋转、螺旋、填充方式以及用于复现的布局种子。使用 Skia 引擎在本地渲染,而不走托管服务。
适用场景
适合让助手把笔记、提示词、研究片段或关键词列表直接变成可分享的词云图片或布局数据,无需离开对话。既适用于一次性出图,也适用于轮询任务完成的异步批量流程。
运行要求
以本地 stdio 进程运行,通常通过 npx 或克隆的 Node.js 项目启动。默认通过网络调用托管的 ShapeWords Render API,可用 SHAPEWORDS_API_BASE_URL 指向其他地址。仅受保护的部署才需要可选的 SHAPEWORDS_RENDER_API_KEY(或别名 SHAPEWORDS_API_KEY)。超时可通过 SHAPEWORDS_POLL_TIMEOUT_MS 和 SHAPEWORDS_REQUEST_TIMEOUT_MS 配置。
安装前请注意
提交的文本和加权词默认会发送到托管的 ShapeWords 服务,除非使用本地 Skia 引擎,否则不要提交机密内容。托管产物链接因任务存于内存而有效期很短。可选的 API 密钥是机密,通过环境变量传入。该服务器只暴露渲染选项,不包含完整的 ShapeWords 编辑器或文件导入功能。

安装

在 SourceWeft 中

  1. 打开 控制台中的 ShapeWords MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

ShapeWords MCP

Universal MCP server for generating word clouds with ShapeWords.

It exposes ShapeWords rendering tools through the Model Context Protocol, so any MCP-capable client can create SVG, JSON, or PNG word clouds from text, workshop notes, prompts, research snippets, or agent output. By default it uses the hosted ShapeWords Render API; with engine: "skia" it renders locally inside the MCP server with the shared layout core and CanvasKit/Skia.

Tools

All tools use stdio MCP transport.

render_word_cloud

Creates a ShapeWords render job, polls until it is finished, and returns:

  • public artifact URL for hosted renders, or a local inline artifact for engine: "skia";
  • job metadata;
  • optional image content for MCP clients that support image results.

Use this tool for one-shot generation when the caller wants the final artifact.

create_word_cloud_job

Starts a render job and returns the job/status/artifact URLs without waiting.

Use this tool for asynchronous workflows where the client will poll later.

get_word_cloud_job

Checks a render job by ID.

Use this tool with the jobId returned by create_word_cloud_job or render_word_cloud.

Input Schema

render_word_cloud accepts all render options below. create_word_cloud_job accepts the hosted options only: engine: "skia" is local-only and is supported by render_word_cloud.

FieldTypeDefaultLimitsDescription
renderProfileenumcanvascanvas, apiDefault option profile. canvas matches the main ShapeWords canvas; api keeps the older compact Render API defaults.
textstringoptional1-100,000 charsSource text for the word cloud. Required unless words is provided.
wordsobject[]optional1-1000 itemsExplicit weighted words. Use when the caller already tokenized, lemmatized, or scored text.
localeenumenen, ru, ar, es, fr, zhRender/UI locale passed to ShapeWords.
formatenumsvgsvg, png, jsonArtifact format. SVG is the fastest default. JSON returns layout data. PNG is rasterized from the same shared layout.
widthinteger800240-4096Canvas width in pixels.
heightinteger600240-4096Canvas height in pixels.
backgroundenumwhitetransparent, white, darkOutput background.
qualityenumhqsq, hqStandard or high-quality render. hq matches the main canvas export scale and is slower.
engineenumautoauto, browser, browserless, skiaRenderer engine. skia uses the local MCP shared-core + CanvasKit renderer without server-side Chromium.
returnLayoutbooleanfalsetrue/falseInclude layout metadata when supported.
shapeTypestringcloud1-80 charsShape id. Use a built-in id or custom with customShapeDefinition.
customShapeDefinitionobjectomittedsee belowCustom SVG path shape. Required when shapeType is custom.
maxWordsinteger7001-1000Maximum number of words to place.
seedinteger00-4294967295Unsigned 32-bit layout seed for reproducible browserless renders. Same input, options, and seed produce the same SVG/layout.
fontFamilystringMontserrat1-80 charsShapeWords font family name, for example Inter, Roboto, Montserrat, Noto Sans.
minFontSizeinteger184-400Minimum word font size.
maxFontSizeinteger968-700Maximum word font size.
paddinginteger30-100Pixel padding used by collision detection.
rotationPresetenumorthogonalsee belowRotation preset matching the main ShapeWords canvas.
rotationsinteger[]omitted-90 to 90, max 64 valuesExplicit rotation angles. When provided, these override rotationPreset.
spiralTypeenumarchimedeanarchimedean, rectangularPlacement spiral algorithm.
fillModeenumfillfill, frequencyShape filling strategy.
palettestring[]service defaultup to 12 colorsHex colors: #rgb, #rrggbb, or #rrggbbaa.
colorModeenumservice defaultsequential, random, byFrequencyHow palette colors are assigned to words.
returnImagebooleanfalserender_word_cloud onlyDownload the finished SVG/PNG artifact and return it as MCP image content.
pollIntervalMsintegerenv/default250-10,000Polling interval for render_word_cloud.
pollTimeoutMsintegerenv/default1,000-180,000Maximum wait time for render_word_cloud.

get_word_cloud_job accepts:

FieldTypeLimitsDescription
jobIdstring6-64 charsShapeWords render job id.

words items use this shape:

FieldTypeDefaultLimitsDescription
textstringrequired1-120 charsDisplay word or emoji.
valueinteger11-100,000Weight/frequency used for sizing.
kindenumwordword, emojiWord type. Emoji are kept horizontal by the renderer.
sizeScalenumberomitted0.1-5Optional extra size multiplier used by the ShapeWords layout core when available.
repeatbooleantruetrue/falseWhether the layout may repeat this word to improve shape filling.

Rotation presets:

text
horizontal, vertical, orthogonal, crossing, crossingVoids, dancing,positiveSlope, negativeSlope, random, custom, mixed, angled, free

renderProfile: "canvas" sends the same practical defaults as the main editor canvas: shapeType: "cloud", width: 800, height: 600, quality: "hq", maxWords: 700, seed: 0, fontFamily: "Montserrat", minFontSize: 18, maxFontSize: 96, padding: 3, rotationPreset: "orthogonal", spiralType: "archimedean", and fillMode: "fill".

Use renderProfile: "api" only when you need the older compact Render API defaults: circle shape, 1024x640, SQ quality, and 120 max words.

Text Input

The MCP server can send either raw text, explicit words, or both:

  • repeated words increase frequency, for example cloud cloud cloud render render API;
  • words[] preserves caller-provided weights and avoids differences in tokenization, stop words, or lemmatization;
  • when both text and words[] are present, ShapeWords renders from words[] and keeps text as source context;
  • paragraphs, meeting notes, workshop notes, prompts, research snippets, and keyword lists are valid;
  • files such as CSV, Excel, or Google Sheets are not uploaded through this MCP server; paste or generate the text content first.

Example weighted text:

json
{  "text": "MCP MCP MCP ShapeWords ShapeWords word cloud word cloud render API agents tools",  "shapeType": "cloud",  "format": "svg",  "seed": 12345}

Example explicit weighted words:

json
{  "words": [    { "text": "ShapeWords", "value": 12 },    { "text": "MCP", "value": 9 },    { "text": "canvas", "value": 7 },    { "text": "layout", "value": 6 },    { "text": "render", "value": 5 }  ],  "shapeType": "cloud",  "format": "svg"}

Shapes

Use shapeType to choose the word-cloud mask.

Stable built-in shape ids accepted by the production renderer include:

text
rectangle, circle, heart, star, cloud, diamond, tree, triangle, arrow,square, pentagon, hexagon, octagon, cross, plus, moon, sun, drop,flame, leaf, flower, mountain, apple, house, book, camera, music,chat, location, trophy, rocket, plane, car, shield, lightning, check,infinity, tag

Built-in brand shape ids include:

text
brand-product-hunt, brand-y-combinator, brand-hacker-news,brand-indie-hackers, brand-github, brand-figma, brand-notion,brand-stripe, brand-vercel, brand-linear, brand-supabase,brand-railway, brand-netlify, brand-firebase, brand-cloudflare,brand-airtable, brand-replit, brand-anthropic

The production renderer may also accept additional generated ShapeWords ids. For portable automation, prefer the stable ids above or pass a custom SVG shape.

The local engine: "skia" path currently supports rectangle, square, circle, diamond, triangle, star, heart, cloud, custom SVG shapes, and vendored Font Awesome shape ids such as fa-cat. Unsupported local shape ids are rejected instead of silently changing the requested shape.

Custom Shapes

Set shapeType to custom and provide customShapeDefinition:

FieldTypeRequiredLimitsDescription
pathstringyes1-100,000 charsSVG path data used as the mask.
viewBoxstringyes1-120 charsSVG viewBox, for example 0 0 100 100.
fillRuleenumnononzero, evenoddSVG fill rule. Defaults to renderer behavior when omitted.
namestringno1-80 charsOptional human-readable name.
nameEnstringno1-80 charsOptional English name.

Custom heart example:

json
{  "text": "love love design care product community team support",  "shapeType": "custom",  "customShapeDefinition": {    "name": "Heart",    "path": "M 50 90 C 25 70, 0 50, 0 30 A 25 25 0 0 1 50 30 A 25 25 0 0 1 100 30 C 100 50, 75 70, 50 90 Z",    "viewBox": "0 0 100 100",    "fillRule": "nonzero"  },  "format": "svg"}

Output

render_word_cloud returns:

  • text content with the completed job id and artifact location;
  • structuredContent.job with normalized job metadata;
  • structuredContent.artifactUrl for hosted renders;
  • structuredContent.localArtifact for engine: "skia";
  • structuredContent.siteUrl;
  • optional MCP image content when returnImage is true and format is svg or png.

For engine: "skia", render_word_cloud always returns inline MCP image content for format: "png" or format: "svg" because there is no hosted artifact URL.

create_word_cloud_job returns the same metadata immediately after job creation, without waiting for completion.

get_word_cloud_job returns the latest job status and artifact URL.

Generated artifact URLs are short-lived because the ShapeWords Render API stores render jobs in memory.

Format and Engine Notes

  • svg is the recommended automation format: it is fast, compact, and works with the browserless shared-core renderer.
  • json returns layout data from the same shared-core placement.
  • png is rasterized from the same generated SVG/layout, so word placement matches SVG/JSON for the same input and options.
  • engine: "auto" is recommended unless you need to force a specific path.
  • engine: "browserless" supports svg, json, and png.
  • engine: "browser" supports svg and png, not json.
  • engine: "skia" is local-only and supported by render_word_cloud. It does not create pollable hosted jobs. Layout is generated by the vendored ShapeWords shared core; PNG is drawn directly with CanvasKit/Skia.
  • seed is honored by browserless/shared-core renders. Use engine: "auto" or engine: "browserless" for reproducible API/MCP output.
  • Non-zero seed with forced engine: "browser" is rejected by the Render API because the browser fallback does not use the deterministic shared-core seed path.

Quick Start

Run directly from GitHub:

bash
npx -y github:kirrrr-2423/shapewords-mcp

Or clone locally:

bash
git clone https://github.com/kirrrr-2423/shapewords-mcp.gitcd shapewords-mcpnpm installnpm start

Client Configuration

Use stdio transport in any MCP-compatible client.

json
{  "mcpServers": {    "shapewords": {      "command": "npx",      "args": ["-y", "github:kirrrr-2423/shapewords-mcp"],      "env": {        "SHAPEWORDS_API_BASE_URL": "https://shapewords.fun"      }    }  }}

For a local clone:

json
{  "mcpServers": {    "shapewords": {      "command": "node",      "args": ["/absolute/path/to/shapewords-mcp/src/index.js"],      "env": {        "SHAPEWORDS_API_BASE_URL": "https://shapewords.fun"      }    }  }}

Environment

VariableDefaultDescription
SHAPEWORDS_API_BASE_URLhttps://shapewords.funShapeWords app URL.
SHAPEWORDS_RENDER_API_KEYemptyOptional bearer token if your Render API requires one.
SHAPEWORDS_API_KEYemptyBackward-compatible alias for SHAPEWORDS_RENDER_API_KEY.
SHAPEWORDS_POLL_INTERVAL_MS1500Polling interval for completed renders.
SHAPEWORDS_POLL_TIMEOUT_MS90000Render wait timeout.
SHAPEWORDS_REQUEST_TIMEOUT_MS30000Per-request timeout for hosted API and artifact requests.
SHAPEWORDS_MAX_IMAGE_BYTES8388608Max downloaded artifact size when returnImage is true.

Example Prompt

text
Create a fast SVG word cloud about MCP, universal tools, word cloud generation, AI agents, and ShapeWords. Use the default ShapeWords canvas profile and return the artifact URL.

Example tool input:

json
{  "text": "MCP MCP MCP Model Context Protocol word cloud word cloud ShapeWords tools resources prompts stdio server client universal integration connector API render PNG SVG artifact agents automation context protocol schema",  "locale": "en",  "format": "svg",  "width": 800,  "height": 600,  "background": "white",  "quality": "hq",  "engine": "auto",  "returnLayout": false,  "shapeType": "cloud",  "seed": 12345,  "palette": ["#7c3aed", "#ddd6fe", "#14b8a6", "#111827"],  "returnImage": false}

More Examples

Transparent PNG

json
{  "text": "launch launch startup product customers retention growth metrics roadmap",  "format": "png",  "engine": "auto",  "shapeType": "rocket",  "width": 1200,  "height": 900,  "background": "transparent",  "quality": "hq",  "returnImage": true}

Local Skia PNG

json
{  "words": [    { "text": "MCP", "value": 12 },    { "text": "ShapeWords", "value": 10 },    { "text": "Skia", "value": 8 },    { "text": "CanvasKit", "value": 7 },    { "text": "local", "value": 6 },    { "text": "renderer", "value": 5 }  ],  "format": "png",  "engine": "skia",  "shapeType": "cloud",  "width": 800,  "height": 600,  "quality": "sq",  "seed": 12345}

JSON Layout

json
{  "text": "design system tokens components variants accessibility contrast typography layout",  "format": "json",  "engine": "browserless",  "shapeType": "diamond",  "returnLayout": true,  "seed": 7,  "maxWords": 80}

Reproducible SVG

json
{  "text": "MCP shared core browserless renderer reproducible seed deterministic layout",  "format": "svg",  "engine": "browserless",  "shapeType": "cloud",  "returnLayout": true,  "seed": 12345}

Custom Palette and Font

json
{  "text": "research synthesis interview persona journey insight opportunity experiment",  "format": "svg",  "shapeType": "book",  "fontFamily": "Roboto",  "palette": ["#111827", "#2563eb", "#14b8a6", "#f59e0b"],  "colorMode": "byFrequency",  "maxWords": 160}

Development

bash
npm installnpm run smokenpm run smoke:skianpm run inspect

The server uses stdio and writes protocol messages to stdout. Diagnostics are written to stderr.

Notes

  • Set returnImage: true in render_word_cloud when the MCP client supports image content and needs hosted-render bytes inline. Local Skia image renders are inline automatically.
  • For automation-heavy use, prefer SVG or JSON layout artifacts; request PNG only when the caller needs raster pixels.
  • Set seed when the caller needs repeatable SVG/JSON/PNG placement across MCP runs. engine: "skia" is deterministic by default.
  • Local Skia PNG output is capped at 40,000,000 pixels after quality scaling to avoid excessive local memory use.
  • Local Skia font rendering currently supports bundled Montserrat and OpenDyslexic only. Hosted renders may support more font families.
  • The MCP schema currently exposes rendering and style options only. It does not expose ShapeWords UI-only workflows such as the advanced word editor, 2D/3D view switching, CSV/Excel upload, Google Sheets import, or live room controls.
  • padding, rotationPreset, rotations, spiralType, and fillMode are exposed so MCP callers can match the main ShapeWords canvas more closely.

See THIRD_PARTY_NOTICES.txt for bundled Font Awesome and font asset notices.

来源:README.md,提交 93b207b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分