
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.
概览
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 配置。
安装
在 SourceWeft 中
- 打开 控制台中的 ShapeWords MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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.
get_word_cloud_job accepts:
words items use this shape:
Rotation presets:
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
textandwords[]are present, ShapeWords renders fromwords[]and keepstextas 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:
Example explicit weighted words:
Shapes
Use shapeType to choose the word-cloud mask.
Stable built-in shape ids accepted by the production renderer include:
Built-in brand shape ids include:
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:
Custom heart example:
Output
render_word_cloud returns:
- text content with the completed job id and artifact location;
structuredContent.jobwith normalized job metadata;structuredContent.artifactUrlfor hosted renders;structuredContent.localArtifactforengine: "skia";structuredContent.siteUrl;- optional MCP image content when
returnImageistrueandformatissvgorpng.
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
svgis the recommended automation format: it is fast, compact, and works with the browserless shared-core renderer.jsonreturns layout data from the same shared-core placement.pngis 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"supportssvg,json, andpng.engine: "browser"supportssvgandpng, notjson.engine: "skia"is local-only and supported byrender_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.seedis honored by browserless/shared-core renders. Useengine: "auto"orengine: "browserless"for reproducible API/MCP output.- Non-zero
seedwith forcedengine: "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:
Or clone locally:
Client Configuration
Use stdio transport in any MCP-compatible client.
For a local clone:
Environment
Example Prompt
Example tool input:
More Examples
Transparent PNG
Local Skia PNG
JSON Layout
Reproducible SVG
Custom Palette and Font
Development
The server uses stdio and writes protocol messages to stdout. Diagnostics are written to stderr.
Notes
- Set
returnImage: trueinrender_word_cloudwhen 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
seedwhen 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
MontserratandOpenDyslexiconly. 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, andfillModeare 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版本历史
1- v0.2.2最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分