mapcast

io.github.21prnv由 GitHub 账号 21prnv 发布v0.1.1更新于 Nov 3, 2026

Animated map videos from a prompt: globe dives, country highlights, flags, flights and data maps.

已验证STDIO仅桌面数据与分析媒体与设计

概览

AI 生成的概览

根据助手编写的 JSON 场景渲染动态地图视频和静态图片,支持国家高亮、国旗、地球俯冲、跨国飞行和数据地图。

可以做什么
  • 将场景渲染为 MP4、GIF、PNG 或 JPG,并返回文件路径、影像版权署名和末帧预览
  • 先渲染单帧图片,检查构图、颜色和标注后再生成视频
  • 以着色、聚光、描边或国旗填充样式,在卫星、Blue Marble、Sentinel 或羊皮纸底图上高亮区域
  • 设置镜头动画:推近、拉远、3D 地球俯冲,或在国家之间飞行
  • 按数值给国家着色并生成图例,标注首都或指定城市
适用场景
适合需要由描述生成科普、纪录片或短视频地图画面的场景,例如旋转地球后落到某国、带国旗的区域高亮,或分级设色的数据地图,无需手工剪辑视频。
运行要求
以 stdio 在本地运行,通常通过 npx 加 mcp 参数启动。首次运行会下载 Chromium 和地图数据(之后缓存),输出视频还需要安装 ffmpeg。未声明需要账号、API 密钥或环境变量。
安装前请注意
渲染会在指定路径写入文件,视频渲染较耗 CPU(5 秒 1080p 片段约需 15 秒)。返回的影像版权署名必须在发布视频时展示。争议边界默认按被高亮国家的官方画法绘制,属于敏感的编辑选择。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mapcast

Animated map videos for explainers, documentaries and Shorts, from one line of JSON. Highlight any country, state or province on real satellite imagery or an old paper map: tracing borders, flags, glow, labels, capitals, data colours, a 3D globe dive and camera flights between countries. Free, open source, and built for AI agents to drive.

[npm] [licence: MIT]

[mapcast showcase: globe dive into India, France flag, paper map of Italy, unemployment data map, flight to Turkey]

Full-quality version: docs/showcase.mp4

bash
npx mapcast quick India -o india.mp4

That is the whole setup. The first run downloads Chromium and map data once (both cached); videos also need ffmpeg.

Ask your AI for it

mapcast is made to be driven by AI tools: you describe the map, the agent writes the scene, mapcast renders it.

"Make a YouTube Short that spins the globe and lands on Brazil with its flag." "Old parchment map of Turkey, zooming in, with Istanbul marked." "Colour these countries by unemployment: Spain 11.4, Greece 9.8, Germany 3.4."

Claude Code (skill and MCP server in one install):

/plugin marketplace add 21prnv/mapcast/plugin install mapcast@mapcast

Claude Desktop, Cursor, Windsurf, Codex or any MCP client: add this to the client's MCP config.

json
{  "mcpServers": {    "mapcast": { "command": "npx", "args": ["-y", "mapcast", "mcp"] }  }}

The server offers render_map (saves the video or image and returns a preview of the final frame, so the agent can check its work) and preview_map (one frame, to check a scene before rendering). Every option is described in the tool schema.

Agents that read SKILL.md skills: npx skills add 21prnv/mapcast. The skill is in skills/mapcast, with 27 worked request-to-scene examples.

What it can do

[Gallery: globe, India, France flag, paper Italy, data map, Turkey]

  • Styles: colour tint that keeps the terrain visible, spotlight (rest of the world turns grey), outline, or the country's flag laid over its land.
  • Basemaps: NASA Blue Marble and Sentinel-2 satellite imagery, or an old parchment map with engraved coasts.
  • Cameras: slow push-in, zoom in from a wide view, dive from a spinning 3D globe, fly from country to country.
  • Places: every country by name or ISO code, plus 4,500 states and provinces ("California", "IN-MH"), with capitals or any city marked.
  • Data maps: colour countries by a number with a legend, with names and values on the map.
  • Formats: MP4, GIF, PNG, JPG in 16:9, 9:16, 1:1 or 4:5.
  • Disputed borders: drawn the way the highlighted country officially draws them, or a neutral view on request.

Command line

bash
npx mapcast quick "United States" --style highlight --color yellow -o usa.pngnpx mapcast quick France --style flag -o france.mp4npx mapcast quick Brazil --camera globe -o brazil.mp4          # dive in from a spinning Earthnpx mapcast quick India France Japan --camera fly -o tour.mp4   # fly from country to countrynpx mapcast quick Italy --basemap paper -o italy.mp4
npx mapcast render scene.json -o out.mp4        # any scene; .mp4, .gif, .png or .jpgnpx mapcast render scene.json -o out.png --at 1.2cat scene.json | npx mapcast render - -o out.gifnpx mapcast schema                              # the scene format as JSON Schemanpx mapcast mcp                                 # MCP server on stdio

Every file in examples/ renders as-is.

Scene format

json
{  "aspect": "16:9",  "duration": 5,  "camera": "push-in",  "highlights": [    { "country": "India", "style": "solid", "color": "#c8102e", "label": "INDIA" }  ]}
FieldValuesDefault
aspect16:9, 9:16, 1:1, 4:5 (or set width/height)16:9
durationseconds5 (7 for globe, 1 + 3 per country for fly)
fpsframes per second30
camerapush-in, zoom-in, globe (3D Earth dive), fly (country to country), static, or { "move", "fill", "from" }push-in
basemapsatellite, bluemarble, sentinel, paper (old parchment map)satellite
povauto (the country's own official borders), default, or a code like ind, chn, pakauto
effects.gradenatural, muted, mononatural
effects.vignette0 to 10.45
effects.blur0 to 1: soft-focus edges, like a camera lens0
effects.gridtrue or { "step", "color", "opacity" }: lat/long grid over the sea onlyoff
effects.borderstrue: thin borders of neighbouring countrieson for paper and states
labelAnimdefault label animation for every highlightrise

Each highlight:

FieldValuesDefault
countryname ("India") or ISO code ("IN", "IND")country or region required
regiona state or province: "California", "Bavaria", "US-CA", "IN-MH"
stylesolid (tinted fill), highlight (rest of the world goes grey), outline, flag (the country's flag over the terrain)solid
colorany CSS colour or red, yellow, blue, ...a distinct colour per country
labeltext, or false for nonethe country name
border{ "color", "width", "glow" } or falsewhite, glowing
labelAnimrise, type (typewriter), spread (letters close in), slide, poprise
labelSizemultiplier on the automatic label size, e.g. 0.7 or 1.31
labelFontsans, serif, or any font namesans (serif on paper)
capitaltrue for the capital (a state's own capital for region), or a city name like "Mumbai"off
startseconds when this country starts animatingstaggered automatically

Data maps

Colour countries by a number, with a legend:

json
{  "data": {    "title": "GDP 2024 (trillion US$)",    "prefix": "$",    "unit": "T",    "scheme": "heat",    "values": { "India": 3.9, "China": 18.7, "Japan": 4.1 }  }}

scheme is one of reds, blues, greens, heat, purples, diverging, or a list of colours. Set "labels" to "name", "value" (the number with prefix/unit) or "both" to label each country, and min/max to fix the colour range. A highlight's label can have a second line: "INDIA\n1.4 BILLION".

How it works

A scene is resolved against Natural Earth borders, the imagery tiles the camera path needs are fetched and cached, and a headless Chromium draws each frame on a canvas (WebGL for the globe). Frames are piped to ffmpeg. A 5 second 1080p clip takes about 15 seconds on a laptop.

Credits and licence

MIT. Map data, imagery and font licences are in NOTICE.md. Satellite imagery needs a credit line wherever you publish; mapcast prints the exact line after every render.

Contributions are welcome: see CONTRIBUTING.md.

[M8ven Score]

来源:README.md,提交 3bef8e8

工具

2

render_map

Render an animated map video (.mp4, .gif) or image (.png, .jpg) and save it to disk. Returns the file path, the imagery credit line (must be shown wherever the video is published) and a small preview of the final frame. Highlights countries on real satellite imagery (or an old paper map) with a tracing border, colour fill, glow and label, the look of documentary/explainer YouTube videos. Write a scene: { "highlights": [{ "country": "India" }] } is a complete one. Add only what the request asks for; defaults look good. Map requests to fields: a colour -> highlights[].color; "show the flag" -> style "flag"; "rest of the world grey/dark" -> style "highlight"; "just the border" -> style "outline"; "old map / history / parchment" -> basemap "paper"; "from space / the globe / spinning Earth" -> camera "globe"; "zoom in from far away" -> camera "zoom-in"; "travel/tour/go from X to Y" -> camera "fly" with highlights in visiting order; a state or province -> highlights[].region; "Shorts/Reels/TikTok/vertical" -> aspect "9:16"; "mark the capital" -> capital true; "compare countries by <number>" -> data.values with a title. Borders follow the highlighted country's official view of disputed areas (pov "auto"). A 5 second 1080p video takes roughly 10-30 seconds. Use preview_map first when unsure how a scene will look.

输入参数atscene必填output

preview_map

Quickly render one frame of a scene and return it as an image, without making a video. Use it to check framing, colours and labels before render_map. Highlights countries on real satellite imagery (or an old paper map) with a tracing border, colour fill, glow and label, the look of documentary/explainer YouTube videos. Write a scene: { "highlights": [{ "country": "India" }] } is a complete one. Add only what the request asks for; defaults look good. Map requests to fields: a colour -> highlights[].color; "show the flag" -> style "flag"; "rest of the world grey/dark" -> style "highlight"; "just the border" -> style "outline"; "old map / history / parchment" -> basemap "paper"; "from space / the globe / spinning Earth" -> camera "globe"; "zoom in from far away" -> camera "zoom-in"; "travel/tour/go from X to Y" -> camera "fly" with highlights in visiting order; a state or province -> highlights[].region; "Shorts/Reels/TikTok/vertical" -> aspect "9:16"; "mark the capital" -> capital true; "compare countries by <number>" -> data.values with a title. Borders follow the highlighted country's official view of disputed areas (pov "auto").

输入参数atscene必填

版本历史

1
  1. v0.1.1最新Oct 31, 2026

评分

已满足适用检查项的 90%

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

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分