unfoldx-mcp

v0.11.1
unfoldx-mcp Checked 3 days ago Published 12 hours ago

UnfoldX MCP server (stdio) - the unfoldx.v2 public API as MCP tools for agents.

Thin clients and the open API contract for UnfoldX: a CLI, an MCP server and agent skills. No engine internals. The CLI and MCP server talk to production (https://api.unfoldx.ai/api) by default; set UNFOLDX_API_BASE=https://dev.unfoldx.ai/api for the development site. Logins are stored per API base, so after upgrading from 0.6.x (which defaulted to the development site) run unfoldx login again, and unset any UNFOLDX_TOKEN issued by the development site. The public contract lives in cli/src/unfoldx_cli/openapi.json and is shipped with the stdlib-only CLI package and shared by MCP.

Summary extracted from the README.

UnfoldX

Delegate explainer videos to the UnfoldX main agent and follow them to the finished film.

Thin clients and the open API contract for UnfoldX: a CLI, an MCP server and agent skills. No engine internals.

Layout

├── cli/              # `unfoldx` CLI — stdlib-only HTTPS client (PyPI: unfoldx)
├── mcp/              # `unfoldx-mcp` — stdio MCP server over the same client (PyPI: unfoldx-mcp)
├── skills/           # Agent skills (Claude Code etc.) wrapping the CLI
└── docs/             # CLI reference

Quick start

pip install unfoldx
unfoldx doctor                     # credentials, connectivity, version
unfoldx login                      # device code, approved in the browser
unfoldx runs submit --goal "讲清楚量子纠缠" --file notes.pdf --json
unfoldx runs wait <run_id> --json
unfoldx runs answer <run_id> --route template --json
unfoldx runs wait <run_id> --json
unfoldx artifacts download <run_id>.video --out ./out --json

The CLI and MCP server talk to production (https://api.unfoldx.ai/api) by default; set UNFOLDX_API_BASE=https://dev.unfoldx.ai/api for the development site. Logins are stored per API base, so after upgrading from 0.6.x (which defaulted to the development site) run unfoldx login again, and unset any UNFOLDX_TOKEN issued by the development site.

The public contract lives in cli/src/unfoldx_cli/openapi.json and is shipped with the stdlib-only CLI package and shared by MCP.

For MCP hosts: install unfoldx-mcp (uv tool install unfoldx-mcp --with-executables-from unfoldx, which also installs the unfoldx CLI used to log in) and register unfoldx-mcp as a stdio server; it uses the CLI's login. See mcp/README.md.

Browser extension

开物 UnfoldX 极速成片 turns the page you are reading, selected text or a screenshot into an explainer video in the browser side panel. It is under review on the Chrome Web Store; until it is listed, download the zip from the latest extension release and load it unpacked (chrome://extensions → Developer mode → Load unpacked). The release notes have step-by-step instructions. The extension source is not in this repository.

Design principles

  • One contract. The CLI and the MCP server are adapters over the same HTTP API and answer with the same unfoldx.v2 envelope.
  • Agent-first, user-approved. Agents follow runs with resumable cursors and closed-set errors; unfoldx credits says what a key may still spend today, and spending above that budget is confirmed by the user on the web.
  • Fail loud, leak nothing. Errors are actionable but never expose server internals; tokens are redacted from every output path and bound to the API that issued them.