taskgate-mcp
This MCP server lets agents and humans operate a gated task registry, from planning and ordering work to collecting verification/review evidence and closing tasks.
Inspect work: list/filter tasks, get the next actionable task, show a task's effective policy and subtasks, read the mutation log, validate the registry, and diagnose project setup.
Run the task lifecycle: claim planned tasks, update statuses, record verification/review evidence, add notes, and enforce review/evidence rules.
Plan and structure work: add tasks or subtasks, edit draft/planned tasks, set profiles, change execution order, reset sort order, and manage dependencies.
Maintain generated output: render the Markdown view from
tasks.jsonor check for drift.Run quality gates: execute configured project gates, optionally scoped to a task's profile, and return a compact JSON report.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@taskgate-mcp what's the next task I can claim?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
taskgate
A task registry that makes "done" mean something. Tasks move through a strict status flow, and the transitions that matter are gated by evidence: a task enters review only with a green verification, and closes only with a review from a different identity that lists the commands it checked. It ships as a CLI and as an MCP server, so coding agents (Claude Code, Codex, VS Code Copilot, Cursor, Gemini CLI) and humans work from the same registry.
stdlib-only, no runtime dependencies; Python 3.11+; Linux, macOS and Windows
state is plain files you commit:
tasks.json(source of truth), an append-onlytasks.log.jsonland a generatedtasks.mdone code path: every MCP tool calls the same CLI command a human would run
Quick start
cd your-project
uvx taskgate init
uvx taskgate add --id T-1 --title "Parse the header" --verification-cmd "pytest tests/test_header.py"
uvx taskgate next # which task may start now
uvx taskgate claim T-1 --by devAdd it to your agent (prints a ready-to-paste block; see docs/clients.md):
uvx taskgate config-snippet claude # also: vscode, codex, cursor, gemini, genericFrom a checkout instead of PyPI: uvx --from /path/to/taskgate taskgate ..., or
taskgate config-snippet claude --from /path/to/taskgate.
Related MCP server: coordination_bus/mcp_server.py
The flow
draft -> planned -> in_progress -> in_review -> done
| ^ |
v | +--> in_progress (review rejected)
blocked
any non-terminal status -> cancelledRule | What it enforces |
order |
|
phase gate | a task in a later phase waits until every earlier phase is closed and the registry validates |
dependencies |
|
verification |
|
review |
|
fresh evidence | a new verification voids an earlier review; results are never accepted together in one call |
planning | adding, moving and re-linking tasks is limited to the |
subtasks | a task with |
profile | the task's |
Identities (--by, or the TASKGATE_BY environment variable, default human) are declared by the caller.
This is a process barrier that keeps roles apart and leaves a trail in the log; it is not authentication.
Subtasks and profiles: matching the checks to the change
A full verification and an independent review are worth their cost for a risky change and wasteful for a typo in the docs. taskgate lets the plan say, per task, how much checking it gets.
Subtasks. taskgate add --parent T-12 --title ... --verification-cmd ... adds T-12.1, T-12.2, ... (one level;
phase comes from the parent). The parent is claimed first and stays in_progress; next then returns its first open
subtask. Each subtask has its own cheap verification_cmd, and the parent is verified and reviewed once, at the end,
over the whole change. A small step therefore costs one fast check, not a full gate plus a review.
Profiles. Define named closing policies in taskgate.toml:
[quality]
build = [["dotnet", "build", "-c", "Release"]]
test = [["dotnet", "test", "-c", "Release", "--no-build"]]
[profiles.docs] # documentation-only change
require_review = false # done needs only a green verification
gates = ["tasks"] # quality_check(task=...) runs just these
[profiles.code] # behaviour change: the strong reviewer, all gates
reviewer = "reviewer"
gates = ["build", "test", "tasks"]
[profiles.chore] # small mechanical change: a cheaper reviewer
reviewer = "reviewer-lite"
review_delay_seconds = 0
gates = ["build", "tasks"]Assign one with taskgate add --profile docs ... or, for a planned task, taskgate profile T-3 docs --by planner.
A subtask inherits its parent's profile unless it has its own. Tasks without a profile use the project-wide settings
(reviewer, require_review, review_delay_seconds, every gate). The profile cannot change once work has started, so
the bar a task is judged by cannot be lowered after the fact. taskgate show T-3 prints the task with its effective
policy and subtasks; quality_check with task=T-3 runs only that profile's gates.
Configuration
Optional taskgate.toml in the project root; every key has a default
(examples/taskgate.toml).
Key | Default | Meaning |
|
| where |
|
| heading of the Markdown view |
|
| task id regex; a named group |
| none |
|
|
| identities allowed to add, move and re-link tasks |
|
| identity whose |
| any | restrict |
|
|
|
|
| minimum time between verification and review |
| none | named gates for the |
| none | per-task closing policy: |
The project root is TASKGATE_ROOT if set, otherwise the nearest ancestor of the working directory that has
taskgate.toml or .taskgate/.
examples/embersail.toml reproduces a stricter real-world setup (ids P<phase>-NN,
architect/human planners) to show the engine is not tied to one convention.
Commands
init, validate, render [--check], next [--json], list [--status] [--json], show, claim, update,
add [--parent] [--profile], edit, note, log [--task] [--by] [--limit] [--json], doctor, profile, sort,
move, depends, mcp, config-snippet. taskgate <command> --help lists the flags.
edit changes the title, spec anchor or verification command of a draft/planned task (planners only); note appends a
timestamped remark to a task in any status; log reads the mutation log; doctor checks the project setup and is the
first command to run when a client reports "no taskgate project found". Returning a task from review with --reason
records the reason as a note.
Recording evidence, in separate calls:
taskgate update T-1 --verification-result '{"ok": true}' --by dev
taskgate update T-1 --status in_review --by dev
taskgate update T-1 --status done --by reviewer \
--review-result '{"ok": true, "by": "reviewer", "checks": ["pytest -q"]}'MCP tools
task_list, task_next, task_show, task_log, task_doctor, task_validate (read-only, so clients can skip the
approval prompt), task_claim, task_update, task_add, task_edit, task_note, task_profile, task_move,
task_depends, task_sort, task_render and quality_check. task_list and task_next take json: true.
Tool failures come back as isError results rather than protocol errors, so an agent sees the reason. Arguments a
tool does not declare, or required ones that are missing, are rejected with the list of allowed names instead of
being ignored.
The server speaks newline-delimited JSON-RPC 2.0 over stdio. Run it with taskgate mcp or taskgate-mcp.
Development
python -m pip install -e ".[dev]"
ruff check . && mypy && pytestReleasing
Pushing to main runs the tests on Linux, macOS and Windows and builds the package. If version in
pyproject.toml has no v<version> tag yet, the workflow publishes to PyPI through trusted publishing and
creates the tag and GitHub release. To release: bump version in pyproject.toml and
src/taskgate/__init__.py (a test keeps them equal), add a changelog entry, merge to main.
One-time setup, either way: a GitHub environment named pypi. Then either store a PyPI API token as the
repository secret PYPI_API_TOKEN (the first release of a new project needs an account-wide token; narrow it
to the project afterwards), or add a (pending) trusted publisher on PyPI for this repository, workflow
ci.yml, environment pypi. With the secret set it is used; without it the workflow falls back to trusted
publishing.
Status
Alpha. Not included: synchronization with a forge (GitLab/GitHub issues). It originated in the Embersail project's task tooling. Plans for the next editions are in TODO.md.
License
MIT
Available Tools
17 toolsquality_checkA
Run quality gates and return a compact JSON report. Gate names come from [quality] in taskgate.toml; the built-in gate 'tasks' validates the registry and checks the Markdown view. Without 'checks' every gate runs; with task= only the gates of that task's profile run (a docs task can skip the build and test gates).
Inputs: task, checks.
task_addA
Add a draft/planned task or, with parent, a subtask (id . assigned when id is omitted; one level, phase and default profile come from the parent; the parent must be in_progress before a subtask can start, and cannot close while subtasks are open). profile picks a review/verification profile from taskgate.toml. Duplicate ids and closed phases are rejected. Only identities listed in 'planners' may add tasks; pass by explicitly.
Inputs: by (required), title (required), verification_cmd (required), id, +7 more.
task_claimA
Claim a planned task (-> in_progress, sets owner and started). Refused unless every earlier task is done/cancelled (order and phase gate) and its dependencies are done.
Inputs: id (required), by, force.
task_dependsA
Change the dependencies of a draft/planned task: set (replace; [] clears), add and/or remove ids. Each dependency must exist and be placed before the task (use task_move first). Planners only.
Inputs: by (required), id (required), add, set, +1 more.
task_doctorBRead-only
Diagnose the project: root, configuration, registry validity, view drift and log.
Inputs: no named parameters.
task_editA
Change the title, spec_source (path + section; empty string clears it) or verification_cmd of a draft/planned task. Planners only; pass at least one of title, spec, verification_cmd. Started tasks take task_note instead.
Inputs: by (required), id (required), spec, title, +1 more.
task_listARead-only
List tasks (optional status filter); json=true returns the task records as a JSON array.
Inputs: json, status.
task_logBRead-only
The append-only mutation log as a JSON array, optionally for one task (subtasks included), one identity, or the last N events.
Inputs: by, task, limit.
task_moveA
Change the execution order: place a draft/planned task directly before or after another. Never in front of a task that is in flight or done, and phases stay ascending. Planners only; pass exactly one of before/after.
Inputs: by (required), id (required), after, before.
task_nextBRead-only
Show the one task that may start now: the queue head, planned, with dependencies and the phase gate met.
Inputs: json, owner.
task_noteA
Append a timestamped note to a task in any status (decisions, follow-ups, reasons). Does not change status.
Inputs: id (required), text (required), by.
task_profileA
Set or clear the review/verification profile of a draft/planned task (profiles are defined in taskgate.toml, e.g. a docs profile without review). Not allowed once the task has started. Planners only; pass name or clear=true.
Inputs: by (required), id (required), name, clear.
task_renderA
Render the Markdown view from tasks.json; check=true fails on drift instead of writing.
Inputs: check.
task_showARead-only
One task with its effective closing policy (profile, whether a review is required and by whom, review delay, quality gates) and its subtasks. Read it before verifying or reviewing to know what that task needs.
Inputs: id (required).
task_sortA
Reset the execution order to phase, then id; discards any order set with task_move.
Inputs: by.
task_updateA
Advance a task's status and record evidence (transitions are enforced). Send verification_result and review_result in SEPARATE calls: the caller identity (by) is the verifier; a review must come from the reviewer identity of the task's profile (see task_show), a different one, after that profile's delay since the stored verification, and must list the commands it checked in checks=[...]; closing as done needs a fresh review_result in the same call, unless the task's profile sets require_review = false. A task with open subtasks cannot go to in_review, done or cancelled.
Inputs: id (required), by, reason, status, +2 more.
task_validateARead-only
Validate tasks.json: schema, status transitions and evidence gates.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools have a clearly distinct target: list/show/add/edit/note/claim/update each map to a different action on tasks, with task_next, task_depends, task_move and task_sort covering distinct planning concerns. The main ambiguity is validation: task_validate, task_doctor, task_render (check=true) and quality_check all touch registry validity and view drift, so an agent may pick the wrong one. task_claim also partially overlaps task_update, since both can move a task to in_progress.
Sixteen of seventeen tools follow a clean snake_case task_<verb> pattern (task_list, task_add, task_move, task_update, etc.), which is highly predictable. The lone outlier, quality_check, is defensible as a different domain (quality gates) but breaks the otherwise uniform prefix convention.
Seventeen tools is at the high end, but this is a rich gated-workflow domain where each tool carries a distinct responsibility (ordering, dependencies, profiles, evidence, rendering, logging). The validation cluster is somewhat redundant, keeping it from a perfect score, but no tool looks gratuitous.
The surface covers the full lifecycle: create, edit, plan, claim, transition with evidence, verify/review profiles, dependencies, ordering, notes, logging, validation and rendering. The notable gap is a delete/remove operation (tasks can only be cancelled by status change), and there is no search beyond a status filter, but agents can work around both.
Maintenance
Related MCP Connectors
Task contract, evidence check and done gate for AI coding agents. Read-only, no sign-in.
Shared task queue for humans and AI agents: leases, handoffs, approvals and signed receipts.
Task tracking built for coding agents. Work is leased, so two agents never take the same SubTask.
Git collaboration for AI agents and people: tasks, hand-offs, reviews, teams, shared memory.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables structured role-to-role handoffs and merge gating for multi-agent collaboration. It persists evidence and computes approval gates without invoking LLMs.-
- FlicenseNot gradedqualityCmaintenanceEnables MCP-capable coding agents to coordinate via authenticated task creation, claiming, messaging, and review approval over a secure local event log.-
- AlicenseNot gradedqualityAmaintenanceEnables AI coding providers to coordinate structured multi-agent workflows with documents, tracked tasks, handoffs, and health evidence. It owns task claims, action logs, and final health results while leaving specification files on the filesystem.29 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding providers to run structured multi-agent workflows by claiming tasks, logging actions, managing handoffs, and enforcing server-side health gates across explorer, consultant, builder, and reviewer roles. Specifications stay as Markdown on disk while tracked task state, acceptance evidence, and completion checks are owned by the server.29 npmMIT