motion-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
motion-mcp
An MCP server that lets an AI assistant (ChatGPT, Claude, or any other MCP client) read and update tasks in Motion through the official Motion REST API. Retried requests never create duplicate tasks.
Status of this demo, stated up front. The recording below runs against the real Motion API (
api.usemotion.com) in a Motion trial workspace created for this demo; every task it creates is prefixedDEMO. The MCP client is Claude Code, not ChatGPT: adding a custom MCP server with write access to ChatGPT needs a Business or Enterprise/Edu plan (quotes below). ChatGPT connects to the same/mcpURL. A mock of the Motion API (src/mock/motion-mock.ts) is used only by the tests.

Full-quality video: demo/motion-mcp-demo.mp4 (80 s). Recorded on 5 December 2026. In the recording:
The assistant lists open tasks, creates DEMO Review Motion MCP demo with client (LOW, due Dec 12), raises it to ASAP, moves the deadline to Dec 8 and completes it. The right-hand window is the server's live log: each Motion API call with its HTTP status.
A new assistant session sends the same create request with the same idempotency key. The server returns the existing task (
created: false), and Motion still has one such task.A scheduled run (cron, no chat open) calls the same MCP server and writes a report:
demo/scheduled-report.sample.log.The server log shows one
requestIdper tool call, attached to every Motion HTTP call made for it:demo/server.sample.log. The whole run used 11 Motion API calls (10 x 200, 1 x 201), under the 12 requests per minute limit.The last ten seconds are Motion app screenshots before and after the run.
Tools
Tool | What it does | Motion API calls |
| Open tasks (or all with |
|
| Creates one task: |
|
| Changes |
|
| Completes one task. Retrying is safe |
|
There is no delete tool and no bulk tool, on purpose. An assistant can read, create one task, change one task or complete one task.
Priorities are Motion's: ASAP, HIGH, MEDIUM, LOW. dueDate accepts 2026-12-10 (read as 23:59 in DUE_DATE_TIMEZONE, default UTC) or a full ISO 8601 datetime.
Motion has no "complete" endpoint. A task is completed by moving it to a status with isResolvedStatus: true, which the server looks up through GET /v1/statuses?workspaceId=…. A task that is already completed is returned unchanged.
Related MCP server: usemotion-mcp-server
How duplicates are prevented
Motion's API has no idempotency header, so a timed-out and retried create would normally make a second task. create_task therefore requires an idempotencyKey chosen by the caller (for example dot-2026-12-05-weekly-report):
The task carries its key. The key is written into the task description as a last line
mcp-idempotency-key: <key>. Before creating, the server searches Motion for tasks with that name, completed ones included, and returns the one that carries the key. This check still works after a redeploy, with a lost local state, or with two server instances.A local journal (
key -> task id, JSON file) answers repeats without a search. That matters under Motion's limit of 12 requests per minute on individual accounts.Two concurrent calls with the same key are serialized inside the process, so they cannot both create.
Reusing a key for a different task (other name, priority, due date or description) is rejected instead of silently returning the wrong task.
If the duplicate search cannot finish (more than 5 pages of tasks with that name), the server refuses to create rather than risk a duplicate.
Rate limits: 429 responses are retried with back-off and honour Retry-After. Motion documents "12 requests per minute" for individual accounts and "up to 120 requests per minute" for teams (rate limits).
Run it
Requires Node.js 20 or newer.
npm install
npm run build
npm test # 40 tests: idempotency, field mapping, MCP over HTTP
# Against real Motion ("Log into Motion and under the Settings tab, create an API key")
export MOTION_API_KEY=... # never commit it; read from the environment only
export MOTION_WORKSPACE_ID=... # optional if the account has exactly one workspace
export MCP_AUTH_TOKEN=$(openssl rand -hex 32) # optional, see "Authentication"
npm start # streamable HTTP on http://127.0.0.1:8787/mcp
# Or against the bundled mock (used by the tests), no Motion account needed
MOTION_API_KEY=mock-key npm run mock & # mock API on :8790, board on http://127.0.0.1:8790/
MOTION_API_KEY=mock-key MOTION_BASE_URL=http://127.0.0.1:8790/v1 npm startVariable | Default | Meaning |
| (required) | Sent as the |
|
| Point at the mock for testing |
| first workspace if there is exactly one | Workspace the tools work in |
| unset (no auth) | When set, clients must send |
|
| Accepted |
| unset (any browser | Browser origins allowed to call |
|
| IANA zone for bare dates: |
|
| Local journal file |
|
| HTTP listen address |
Connect an assistant
Claude Code (what the recording uses):
claude mcp add --transport http motion https://your-host/mcp --header "Authorization: Bearer $MCP_AUTH_TOKEN"Claude Desktop or any stdio client: run node dist/src/stdio.js with the same environment variables.
ChatGPT: add a custom MCP server with the public HTTPS URL ending in /mcp. OpenAI's docs: "Supported MCP protocols: SSE and streaming HTTP" (developer mode guide), and "For a public endpoint, enter the MCP server URL, including the /mcp path" (connect from ChatGPT). ChatGPT cannot reach localhost: "Can I connect to a local MCP server? Not directly." (help article 12584461). Deploy the server behind HTTPS, or use OpenAI's Secure MCP Tunnel.
Authentication
The built-in bearer token suits Claude Code, the cron job and server-to-server use. ChatGPT's documented options are different: "Authentication options include OAuth, No authentication, and OAuth or no authentication" (developer mode guide). A static bearer token is not in that list. For ChatGPT the choice is:
No authentication: acceptable only for a short test with a throwaway Motion workspace, because anyone who learns the URL can change tasks.
OAuth 2.1 in front of the server: the production setup, planned for Phase 2.
Independently of the token, /mcp refuses requests whose Host header is not in ALLOWED_HOSTS or that carry a browser Origin not in ALLOWED_ORIGINS. This blocks DNS-rebinding attacks, where a web page open in your browser tries to reach a server on localhost.
Scheduled run without a chat
src/scheduled-report.ts is a plain MCP client. It connects to the same /mcp endpoint the assistant uses, calls list_tasks, and appends a summary (open, overdue, ASAP/HIGH) to a log file. It exits non-zero on failure, so the scheduler can alert.
0 8 * * 1-5 cd /srv/motion-mcp && MCP_URL=https://your-host/mcp MCP_AUTH_TOKEN=... npm run -s reportLogs
JSON lines on stderr, one requestId per tool call, repeated on every Motion HTTP call made for it:
{"ts":"…","level":"info","event":"motion.http","requestId":"9227c875-…","tool":"complete_task","method":"PATCH","path":"/v1/tasks/tk_2bedca2f5411","status":200,"ms":3,"attempt":0}The API key is never logged. The requestId is also returned to the assistant in every tool result, so a chat answer can be matched to the server log.
Dot and custom MCP: what OpenAI docs say today
Checked on 5 December 2026 against OpenAI's own pages.
Which plans can add a custom MCP server with write tools. "Custom MCP server connections and full MCP support are available for ChatGPT Business and Enterprise/Edu customers on ChatGPT web." And: "Pro users can connect custom MCP servers with read/fetch permissions." (help article 12584461, updated about 2 December 2026). The article does not mention Plus or Free. For a Business workspace: "Only admins and owners can create and publish plugins for custom MCP servers."
Write actions. "Any tools your app exposes (including write actions) are available, subject to confirmation settings." ChatGPT "may ask for confirmation" before write actions, and "Some especially risky actions may be blocked instead of being presented for approval."
Dots. OpenAI introduced dots on 29 September 2026 (introducing dots) and on 2 December 2026 said: "Dots are now available globally on Plus, Pro, Business Standard, and Business Premium plans and are enabled by default on ChatGPT Enterprise" (bringing dots to more people). These pages say dots work with apps the user allows: "You choose which apps dots can access". None of OpenAI's pages on dots that I read mention custom MCP servers.
Scheduled tasks. OpenAI documents scheduled and event-triggered tasks, the latter for "supported Gmail, Slack, or GitHub activity". I found no statement that a scheduled task or a dot can call tools on a custom MCP server.
What to check on your plan before relying on it: (1) on Business or Enterprise, add this server under Plugins → Add custom MCP server and confirm a dot can use it; (2) on Pro, expect only list_tasks to be usable, since write tools are read/fetch-restricted; (3) whether a scheduled dot run can call it without a chat open. If (3) does not work, the cron runner in this repo produces the scheduled report independently of ChatGPT.
Limits of this demo
Run against a real Motion trial workspace, not yours. These points were confirmed live on 5 December 2026 and the code follows them:
The resolved status is named
Completed; the server still finds it by theisResolvedStatusflag, not by name.GET /v1/statusesreturns a plain array.PATCH /v1/tasks/{id}rejectsworkspaceIdwith HTTP 400property workspaceId should not exist, although the API reference marks it required. The server does not send it. The first live run caught this; the mock now behaves the same way.Descriptions go in as Markdown and come back as HTML; the idempotency marker is still found.
A bare due date used to be sent as 23:59 UTC, which is already the next day in Europe (Motion showed
2026-12-12as Dec 13). It is now 23:59 inDUE_DATE_TIMEZONE. The recording was made before this fix; its dates are shown in UTC.Not tested in ChatGPT or in a dot (see the section above for why).
The duplicate check matches by task name plus key. If someone renames the task in Motion and then the original create is retried, the journal still catches it, but a fresh server with an empty journal would not.
The local journal is a file. Several instances behind a load balancer should share it (Redis or a database) or rely on the Motion-side marker alone.
Phase 2
Run the same demo against your real Motion workspace and your Dot / ChatGPT plan, with screenshots before and after each change.
OAuth 2.1 in front of the server for ChatGPT, plus deployment on your infrastructure (one small server or serverless function).
Failure alerts (scheduler exit code and Motion error rates), shared journal for multiple instances, key-rotation and troubleshooting docs.
More Motion fields if you need them: projects, labels, assignees, auto-scheduling.
Project layout
src/motion/client.ts Motion REST client (X-API-Key, 429 back-off, no delete/bulk methods)
src/service.ts Task logic: idempotent create, update, complete, list
src/idempotency.ts Key marker, journal, per-key lock
src/mcp.ts The four MCP tools, request ids, error mapping
src/http.ts Streamable HTTP server on /mcp (stateless), /healthz
src/stdio.ts stdio entry point
src/scheduled-report.ts Cron runner: MCP client that writes a report
src/mock/motion-mock.ts Mock of the Motion API for tests and demos
test/ node:test suites
demo/ Recording, sample logs, transcript rendererLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage tasks, Focus Zone, notes, projects, and task history from compatible AI assistants.
Read and write your own Microsoft To Do, Google Tasks or Todoist tasks from any AI agent.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Task management for people and AI agents, with scoped OAuth access to issues, projects, and docs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceConnects AI assistants to Motion for comprehensive task and project management, including creating/updating tasks, managing projects, handling workspaces, comments, and recurring tasks with smart rate limiting.2MIT
- FlicenseNot gradedqualityDmaintenanceEnables interaction with the Motion API for task and project management, including listing, creating, updating, and deleting tasks, projects, comments, and workspaces.-
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to manage Motion tasks, projects, workspaces, schedules, comments, custom fields, and recurring tasks through natural-language conversation via the Model Context Protocol.Apache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to manage tasks, projects, workspaces, schedules, comments, custom fields, recurring tasks, and statuses in Motion through natural language conversations.Apache 2.0