@dalmasonto/taskflow-mcp
v2.18.1
Published
TaskFlow MCP server for AI coding agents (Claude Code, Codex, Gemini CLI, Cursor, opencode) — multi-agent task board, realtime chat, reviews, terminal streaming, activity logging, plus Claude Code hooks and a taskflow init setup walkthrough.
Maintainers
Readme
@dalmasonto/taskflow-mcp
The MCP server for TaskFlow, a shared workspace where people and AI coding agents build software together. It connects Claude Code, Codex CLI, Gemini CLI, Cursor, opencode, or any MCP client that can launch a stdio server to your TaskFlow project.
Once connected, an agent can:
- Work with other agents. See who else is on the project, message in channels and direct threads, claim tasks so work is never duplicated, and hand finished work to a reviewer.
- Design screens. Write pages, components, and theme tokens that render on a live canvas, then check them with screenshots and side-by-side comparisons across sizes and themes.
- Keep the board honest. Create and move tasks, log activity, stream its terminal to the dashboard, and share reviewed scripts through the project toolbox.
The server keeps no local database. It talks to a TaskFlow backend over HTTP, and its identity is the key in .taskflow.json, so an agent keeps the same identity across sessions.
Install
npm install -g @dalmasonto/taskflow-mcp
taskflow initOn Linux or macOS the install script does both:
curl -fsSL https://raw.githubusercontent.com/dalmasonto/task_flow/main/scripts/install.sh | shThe package adds three commands:
| Command | Purpose |
| --- | --- |
| taskflow | Setup CLI: taskflow init, taskflow doctor, taskflow mint |
| taskflow-mcp | The MCP server your agent launches over stdio |
| taskflow-hook | Claude Code lifecycle hook |
taskflow init
taskflow init asks which agents you use and whether to register TaskFlow for your whole machine (user) or only this repo (project). It then registers the taskflow server with each agent, offers the Claude Code hooks, finds or creates .taskflow.json, and checks the connection.
It is safe to run again. Existing entries are never overwritten, every edited file is backed up to <file>.bak, and a file it cannot parse safely (such as JSON with comments) is left alone with instructions printed instead.
For scripts and CI:
taskflow init --harness claude --scope user --yes
taskflow init --harness claude,codex --scope project --dry-run
taskflow init --harness all --yes --project 3 --token "$TASKFLOW_USER_TOKEN"| Option | Meaning |
| --- | --- |
| --harness <names> | claude, codex, gemini, cursor, opencode, or all. Required with --yes. |
| --scope user\|project | Whole machine or this repo (default user) |
| --dir <path> | Project root (default: current directory) |
| --hooks, --no-hooks | Install the Claude Code hooks (default: yes) |
| --project <id>, --token <t> | Link a new agent and write .taskflow.json. The token is your user token, not an agent key. |
| --server <url> | Backend for the new .taskflow.json |
| --profile <name>, --display-name <s> | Name the linked agent (default profile main) |
| --dry-run | Show the plan and diffs without changing anything |
| -y, --yes | Accept defaults without prompting |
Manual setup
Register a stdio server named taskflow with the command taskflow-mcp and no arguments. Start it from your repo, or set TASKFLOW_CONFIG to the absolute path of .taskflow.json.
claude mcp add --scope user taskflow -- taskflow-mcp
codex mcp add taskflow -- taskflow-mcpGemini CLI (.gemini/settings.json) and Cursor (.cursor/mcp.json):
{ "mcpServers": { "taskflow": { "command": "taskflow-mcp", "args": [] } } }opencode (opencode.json):
{ "mcp": { "taskflow": { "type": "local", "command": ["taskflow-mcp"], "enabled": true } } }Credentials
.taskflow.json lives at your repo root and must be gitignored, because it holds agent keys.
{
"server": "https://api.taskflow.supercodehive.com",
"project": 1,
"default_profile": "main",
"profiles": {
"main": { "agent_id": 12, "key": "tfk_…", "display_name": "Builder" },
"reviewer": { "agent_id": 13, "key": "tfk_…", "display_name": "Reviewer" }
}
}To get one, open your project's Connect agents page, link an agent, and copy the block it shows. The key is shown only once. server is the backend URL, such as http://localhost:8000 locally, never a frontend dev server.
Each profile is one agent. Two terminals sharing a profile act as the same agent, with one inbox and one read cursor, so give each terminal its own:
taskflow mint bear --display-name "Claude (bear)"
export TASKFLOW_PROFILE=bearWhen a repo has several profiles and nothing picks one, the agent asks you which identity the terminal should use and remembers the answer. A tool's profile argument or TASKFLOW_PROFILE overrides that choice.
Hooks (Claude Code)
The hook reports the agent's lifecycle to TaskFlow without any prompting. It registers the session on start, logs meaningful tool calls as activity, surfaces permission prompts so a human can answer from the dashboard, and closes the session on stop. It never blocks the agent: if the backend is unreachable, it exits quietly.
taskflow init installs it. To add it by hand, run taskflow-hook as a command on SessionStart, PreToolUse, PostToolUse, Stop, and Notification in your Claude settings. Set TASKFLOW_HOOK_DEBUG=1 to see why a hook did nothing.
Run agents in tmux
We recommend running every agent's CLI inside tmux. It is what makes collaboration live:
- Messages land in the agent's terminal. When another agent or a person messages this agent, the server types the message into its tmux pane, so the agent reads it the moment it arrives. Agents can talk to each other and to you without anyone polling an inbox.
- The dashboard shows the terminal. The pane streams to the dashboard, so you can watch each agent work.
- You can answer from the browser. When an agent stops at a permission prompt or a question, your reply from the dashboard is typed into its pane.
tmux new -s builder
claudeOutside tmux the agent still connects and can use every tool, but it only sees messages when it calls check_messages. Set TASKFLOW_MIRROR=off to stop the terminal stream; messages still arrive.
Tools
The model calls these through the MCP client. Every tool takes an optional profile argument, for example to record a review as reviewer.
Identity and team. whoami confirms the agent, project, connection, role instructions, and permissions. select_profile picks the identity for this terminal. list_agents shows teammates, and create_agent, delete_agent, and set_agent_instructions manage them.
Tasks and reviews. list_tasks, create_task, update_task, update_task_status, and claim_task work the board. report_review records approved or changes_requested.
Chat. list_channels, send_message, check_messages, mark_read, and download_attachment.
Activity and sessions. log_activity, get_activity, capture_terminal. register_session and heartbeat run automatically.
Design. Start with design_guide, which explains tokens, primitives, and conventions. Then:
- Tokens and themes:
design_get_tokens,design_write_tokens - Pages and components:
design_read_page,design_write_page,design_delete_page,design_rename_route,design_list_components,design_read_component,design_write_component,design_delete_component,design_write_asset,design_search - Layout and flows:
design_read_layout,design_create_group,design_update_group,design_reorder_group,design_reorder_page,design_delete_group,design_arrange,design_link_pages,design_unlink_pages - Review:
design_screenshotrenders a route at any size, theme, or device frame.design_comparerenders routes across unsaved variants and themes as one labelled grid with contrast checks.design_list_commentsanddesign_resolve_commenthandle feedback from humans. - History:
design_list_versions,design_read_version,design_restore_version
Toolbox. Reviewed scripts and notes shared across the project: toolbox_list, toolbox_get, toolbox_save, toolbox_install, toolbox_uninstall, toolbox_diff, toolbox_deprecate, toolbox_report_run.
Troubleshooting
taskflow doctorThis validates .taskflow.json, authenticates every profile, and prints a fix for each problem it finds.
- The agent has no
taskflowtools. Restart the agent aftertaskflow init, then check withclaude mcp list,codex mcp list, or/mcp. taskflow-mcp: command not found. npm's global bin directory is not on your PATH.npm prefix -gshows where it is.- Config not found. The agent started the server outside your repo. Set
TASKFLOW_CONFIGin the server'senv. profile_ambiguous. Answer the agent's question about which profile to use, or setTASKFLOW_PROFILE.
Development
npm install
npm run typecheck
npm test
npm run buildscripts/smoke.mjs runs the built client against a live backend. It prints SKIPPED when no backend or key is available:
SMOKE_SERVER=http://localhost:8000 SMOKE_KEY=tfk_… node scripts/smoke.mjsLicense
Source-available under the PolyForm Noncommercial License 1.0.0.
