Motif

io.github.sleepycobalt由 GitHub 账号 sleepycobalt 发布v0.5.0更新于 Oct 24, 2026

Research synthesis with receipts: cited, critic-checked insights from interview transcripts.

概览

AI 生成的概览

Motif 从访谈转录中合成带引用、经评审检查的洞察,并提供回执以核对每条引用。

可以做什么
Motif 提供五个工具:motif_synthesize 将转录目录或文件列表加问题转化为洞察 JSON、Markdown 报告、有争议的洞察 id 和成本数据;motif_critique 按规则检查洞察或散文文档并返回判定;motif_receipts 返回逐字轮次文本、说话人以及说话人是否为访谈者;motif_board 生成 FigJam 布局 JSON 和 use_figma 脚本;motif_runs_get 获取运行元数据、备注和每轮判定。每个工具都是对共享合成引擎的轻量调用,因此结果与 CLI 和 FigJam 插件一致。缺少判定、运行 id 不存在等失败会返回工具错误,而不是空成功。
适用场景
当设计师或研究人员在智能体宿主中希望把访谈转录合成为带引用、经评审检查的洞察,并核对引用或把结果推送到 FigJam 白板时使用。适合需要每条结论可追溯的定性研究工作流。
运行要求
通过 stdio 运行的本地进程,仅限桌面端。需要 Python 3.10+ 和 etot-motif[mcp] 包(pip install,或 uvx --from "etot-motif[mcp]" motif-mcp),或用 pip install -e ".[mcp]" 安装的代码检出。需要在环境或 .env 文件中提供 ANTHROPIC_API_KEY。宿主需要 motif-mcp 入口点的绝对路径。运行日志写入 ~/.motif/runs 或 runs/,可用 MOTIF_RUNS_DIR 覆盖。另有通过 MOTIF_REMOTE_URL 启用的远程模式。
安装前请注意
必须提供 ANTHROPIC_API_KEY,用于在本地运行引擎;在远程模式下它会随每个任务转发并仅用于该任务。运行日志记录每次提示、响应和迭代,因此转录和模型输出会写入 MOTIF_RUNS_DIR 指定的磁盘位置。合成与评审会消耗 Anthropic API 预算;验收脚本同样消耗 API 预算。motif_board 只返回布局和脚本,本身不接触 Figma;由宿主通过 Figma 的 MCP 服务器执行。MOTIF_REMOTE_TOKEN 选择尚未启用的付费层级。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Motif MCP server

One server, usable from Claude Code, Cursor, Claude Desktop, and any MCP host. A designer or researcher working in an agent environment can say "synthesise these transcripts" and get the same cited, critic-checked result the CLI gives. Every tool is a thin call into synth/engine.py; the loop, prompts, and config are shared with the CLI and the FigJam plugin, never duplicated.

Tools

ToolInOut
motif_synthesizetranscripts_dir or files, question, condition (A/B/C), max_iterationsrun id, insights JSON, report markdown, contested insight ids, cost
motif_critiqueinsights (JSON) or document (markdown/prose); run_id or transcripts_dir; optional transcripts, questionverdict JSON (pass, failures, notes, skipped_rules), summary by rule and by insight, the structured insights, its own run id
motif_receiptsturn_ids; run_id or transcripts_dirverbatim turn text, speaker, whether the speaker was the interviewer; missing
motif_boardrun_id, columns, origin_x, origin_yFigJam layout JSON + one use_figma script per insight for the host to execute through Figma's MCP server
motif_runs_getrun_id, includemeta, notes, per-iteration verdicts; optionally insights, report, per-call token/timing

Failure semantics: a missing verdict, an empty synthesis, an unparseable document, a run that does not exist, or turn ids none of which exist all return an MCP tool error. There is no empty success.

Progress: every engine progress line (each transcript ingested, each model call, each critic iteration) is sent twice: as an MCP log notification, which a host only receives if it has set a logging level, and as a progress notification, which a host receives if it passed a progress token (Claude Code does). stdout is the protocol; nothing else ever writes to it.

Install (local mode)

From PyPI, into any Python 3.10+ environment:

bash
pip install "etot-motif[mcp]"which motif-mcp                # the server entry point; hosts need this absolute path

Or with no install step, if you have uv: the command is uvx --from "etot-motif[mcp]" motif-mcp. Installed this way the server uses the packaged config and writes run logs to ~/.motif/runs (override with MOTIF_RUNS_DIR).

From a Motif checkout:

bash
git clone https://github.com/sleepycobalt/motif.gitcd motifpython3 -m venv .venv && source .venv/bin/activatepip install -e ".[mcp]"echo "ANTHROPIC_API_KEY=your-key-here" > .envls .venv/bin/motif-mcp        # the server entry point

The server reads ANTHROPIC_API_KEY from the environment or the repo's .env, writes run logs to runs/ in the repo (override with MOTIF_RUNS_DIR), and uses config/synth.yaml, a symlink to the packaged synth/synth.yaml (override with MOTIF_CONFIG). Every host below needs the absolute path to .venv/bin/motif-mcp; hosts spawn servers without your shell's PATH.

Claude Code

bash
claude mcp add motif -- /ABSOLUTE/PATH/TO/motif/.venv/bin/motif-mcp

Optionally install the skill so Claude Code knows the workflow (verify citations with receipts, mind contested insights, push to FigJam):

bash
mkdir -p ~/.claude/skills/motifcp /ABSOLUTE/PATH/TO/motif/surfaces/mcp/skills/motif/SKILL.md ~/.claude/skills/motif/SKILL.md

Then in a new Claude Code session:

/mcp                                   # motif should show as connectedsynthesise ./data/raw/Dataset-2 with motif and open the report

Claude Code calls motif_synthesize, streams the engine's progress, and can then call motif_receipts to verify any citation or motif_board to push the run onto a FigJam board via Figma's MCP server.

Cursor

Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

json
{  "mcpServers": {    "motif": {      "command": "/ABSOLUTE/PATH/TO/motif/.venv/bin/motif-mcp",      "env": { "ANTHROPIC_API_KEY": "your-key-here" }    }  }}

Restart Cursor; the five motif_* tools appear under MCP tools.

Claude Desktop

Open the config file (Claude menu → Settings → Developer → Edit Config), or edit it directly:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
json
{  "mcpServers": {    "motif": {      "command": "/ABSOLUTE/PATH/TO/motif/.venv/bin/motif-mcp",      "env": {        "ANTHROPIC_API_KEY": "your-key-here",        "MOTIF_RUNS_DIR": "/ABSOLUTE/PATH/TO/motif/runs"      }    }  }}

Quit and reopen Claude Desktop; the tools appear under the tools icon in the chat box. Claude Desktop cannot open files on your disk, so ask for the report markdown in the reply, or read it from the run directory.

Remote mode

Set MOTIF_REMOTE_URL and the same five tools forward to the hosted Motif service (surfaces/hosted/) instead of running the engine locally: no Python dependencies beyond the server itself, and the same results. Your ANTHROPIC_API_KEY is forwarded with each job and used for that job only. In remote mode a tool's run_id is the hosted job id, valid for an hour after the job finishes; motif_receipts, motif_board, and motif_runs_get take it. The hosted engine runs with the logger's redact=True: prompt and response bodies are stored as length + SHA-256, corpora are never snapshotted, and the job's uploads are deleted at expiry. MOTIF_REMOTE_TOKEN selects the paid tier, which is not switched on yet.

bash
claude mcp add motif -e MOTIF_REMOTE_URL=https://motif-hosted.fly.dev -e ANTHROPIC_API_KEY=your-key-here -- motif-mcp

Board output through Figma's MCP server

motif_board returns a layout and scripts; it does not touch Figma. The host (Claude Code with Figma's MCP server authenticated) runs each script with use_figma against a FigJam board URL and reads the result back with get_figjam. Verified on a real board on 2026-09-04 (docs/exhibits/step-zero/, docs/exhibits/board-r5/).

Listing

listing.md holds the descriptions for directories that index MCP servers; server.json is the manifest for the official MCP registry (publish after the package is on PyPI).

Tests

bash
.venv/bin/python -m pytest -q tests               # offline: stubbed model, spawns the server over stdio.venv/bin/python scripts/critique_acceptance.py   # spends API budget: critic vs eval2 human scoring

来源:surfaces/mcp/README.md,提交 3aa944a

工具

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

版本历史

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

评分

已满足适用检查项的 40%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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

    请在仓库或注册中心条目中声明许可证。