@doist/automations-mcp

中文文档
2.2.0发布于 2026/11/11UNLICENSEDTypeScriptES Module近 30 天下载 1.4万

MCP server and importable AI tools for Todoist Automations

此软件包已被标记为弃用

Moved to @todoist/automations-mcp. Replace @doist/automations-mcp with @todoist/automations-mcp in your dependencies and imports.

原始使用文档
文档目录6 节
  1. What it exports
  2. Chat turns
  3. Draft tests
  4. Running it locally
  5. Releases
  6. Adding a tool

@doist/automations-mcp

The MCP server for Todoist Automations: the tools that give an agent the same access to a user's automations that the tda CLI gives, packaged for the hosted MCP server at ai.todoist.net. The design and the rollout it is part of are in the spec.

What it exports

getMcpServer({ token, baseUrl }) builds an McpServer over one user's Automations, bound to the bearer token it is given: a delegated Todoist OAuth token with the automations audience, or a Todoist personal token.

validateAutomationsToken(token, baseUrl) classifies a token before any tool runs, with one status-only call to the automations list: valid, invalid (401) or forbidden (403 with an insufficient_scope challenge). A 403 without that challenge counts as valid on purpose: it is a refusal consent cannot lift, such as the waiting list, so each tool surfaces the backend's own message instead of the client looping through OAuth. Any other status throws TokenValidationError from @doist/mcp-core/host with the status on it, which the hosted server treats as transient for 5xx. Both functions follow the contract every Doist MCP server shares, from @doist/mcp-core/host.

That is the whole published surface. The tools themselves are typed against @doist/automations-sdk, which is not published, so they are reached through the server rather than exported, and the build refuses to emit a declaration that would leave a consumer with an import it cannot resolve.

Chat turns

start-conversation and continue-conversation each run one durable server turn inside the tool call, the way tda chat does in a process: the call blocks until the agent stops, which can take minutes, and reports liveness every ten seconds through notifications/progress when the client sent a progress token, or a debug log message otherwise. Cancelling the call aborts the upstream turn; the partial reply is persisted and continue-conversation resumes it. The shared logic is @doist/automations-sdk/chat-turn, so the CLI and this package cannot drift on how a pending action is read or a connection resolved.

Draft tests

test-draft starts a test run and, unless waitMinutes is 0, polls it until it ends or the wait runs out, reporting progress every ten seconds the same way. A run still going at the limit keeps running and get-test-run reads it later; a cancelled or failed wait names the run for the same reason. The start, the polling and the outcome mapping are the SDK's startDraftTest and waitForDraftTest, shared with tda draft test.

Running it locally

Everything here can run against a real account without the hosted server. AUTOMATIONS_API_KEY is a Todoist personal token or the output of tda auth token view; AUTOMATIONS_BASE_URL points at staging or a local backend and defaults to production.

npm run build:core                                   # once, from the monorepo root
npm run build:mcp                                    # produces apps/mcp/dist
npm --workspace=apps/mcp run inspect                 # the MCP inspector over stdio
npm --workspace=apps/mcp run tool -- find-automations '{"limit": 5}'
npm --workspace=apps/mcp run tool -- start-conversation '{"message": "Draft an automation that..."}'
npm --workspace=apps/mcp run tool:list

An MCP client can point at the stdio build directly, with the same environment:

{
    "mcpServers": {
        "automations": {
            "command": "node",
            "args": ["/path/to/automations/apps/mcp/dist/main.js"],
            "env": { "AUTOMATIONS_API_KEY": "..." }
        }
    }
}

Releases

@doist/automations-mcp is published from main by .github/workflows/release-mcp.yml, which runs semantic-release with the configuration in release.config.js. The version comes from the conventional-commit messages of the commits that count towards this package, so nothing is bumped by hand and the repository holds no version number of its own. The same commits make up the release notes and the Comms announcement. Releases go to the latest dist tag: the consumer is the hosted server, which pins an exact version. After publishing, the workflow sends an automations-mcp-updated dispatch to Doist/todoist-ai-integrations, whose update workflow installs the version, runs its checks, commits and redeploys, so a release reaches ai.todoist.net without waiting for a dependency PR.

The workspace libraries the package uses are not published, so npm run build compiles them into dist/ and only the packages under dependencies stay external. Any change here counts, except tests, docs and package.json fields that don't change what gets installed. packages/sdk, packages/core and packages/bitmapist are shared with the backend and the web app, so a change confined to them counts only when its commit is scoped mcp or sdk. Any other change there still ships, with the next release. See Published packages for how to split pull requests so each change lands in the right release.

Adding a tool

src/tool-registry.ts is the single source of truth for the tool surface; the server, run-tool and the token-footprint baseline derive from it, and src/tool-registry.test.ts fails when the views drift.

  1. src/utils/tool-names.ts: add the name.
  2. src/tools/<tool-name>.ts: the definition, satisfies AutomationsTool<...>. Copy find-automations.ts.
  3. src/tool-registry.ts: add it to the map, in the section it belongs to.
  4. src/tools/tool-annotations.test.ts: add its annotation expectation.
  5. src/tools/<tool-name>.test.ts: tests against a faked AutomationsApi.
  6. src/mcp-server.ts: add to instructions only when the tool needs cross-tool routing guidance; per-tool detail belongs in its own description.

Output schemas never use .nullable(): nulls are stripped before the SDK validates the output, so a nullable field is a validation failure waiting to happen. Use .optional() and leave the key out. src/tools/output-schema-nullability.test.ts enforces it.

src/token-footprint.test.ts prints what the tool surface costs a model on every tools/list. If a change pushes the combined fixed cost over its budget, raise the budget in the same PR and say so.

版本与发布记录

@doist/automations-mcp 共发布 80 个版本,首次发布于 2026/09/18;过去 12 个月发布了 80 个版本。

版本发布日期距今
2.2.0latest2026/11/112 天前
2.1.02026/11/112 天前
2.0.32026/11/103 天前
2.0.22026/11/094 天前
2.0.12026/11/094 天前
2.0.02026/11/094 天前

关于 @doist/automations-mcp 的常见问题

@doist/automations-mcp 是什么?

MCP server and importable AI tools for Todoist Automations注意:该包已被作者标记为弃用——Moved to @todoist/automations-mcp. Replace @doist/automations-mcp with @todoist/automations-mcp in your dependencies and imports.

如何安装 @doist/automations-mcp?

在项目目录运行 npm install @doist/automations-mcp,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@modelcontextprotocol/server(^2.2.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 automations-mcp,可以用 npx automations-mcp 直接运行。

@doist/automations-mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@doist/automations-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@doist/automations-mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24.15.0 <25。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@doist/automations-mcp 可以商用吗?

@doist/automations-mcp 使用 UNLICENSED 许可。作者声明为 UNLICENSED,即不授予公开使用许可(与公共领域的 Unlicense 不同)。使用前需获得作者授权。以上为概括,不构成法律意见,请以许可原文为准。

@doist/automations-mcp 的下载量有多少?

根据 npm 官方下载统计,@doist/automations-mcp 在 2026/10/13 – 2026/11/11 这 30 天内被下载 13,759 次,日均约 459 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@doist/automations-mcp 还在维护吗?

最新版本 2.2.0 发布于 2026/11/11(2 天前);至今共发布 80 个版本,其中过去 12 个月发布了 80 个;首次发布于 2026/09/18。作者已将其标记为弃用,新项目建议寻找替代方案。