taskboard-mcp
An MCP server that integrates a Kanban task board into a sandboxed agent environment, with tools for task management and deterministic state snapshots for agent evaluation.
README
taskboard-mcp
An MCP server that integrates a Kanban task board into a sandboxed agent environment, built with FastMCP.
The interesting part is not the task board. It is the integration contract: what an RL sandbox needs from an application before it can be used to train or evaluate an agent — a deterministic starting state, an exact snapshot, a restore that round-trips, and rules that hold at the protocol boundary rather than only in the UI.
┌──────────────┐ MCP over stdio/http ┌─────────────────┐
│ agent / │◄───────────────────────►│ server.py │ protocol layer
│ harness │ │ (FastMCP) │ 15 tools, 3 resources
└──────────────┘ └────────┬────────┘
│ │
│ populate / snapshot / restore │
│ (out of band, via CLI) ▼
│ ┌─────────────────┐
└────────────────────────────────►│ db.py │ application layer
│ state.py │ rules + persistence
└────────┬────────┘
▼
SQLite @ /data
Why the layers are split
server.py contains no business rules. Every tool is a two-line translation
between an MCP call and a function in db.py or state.py. That split buys
three things:
- The app is testable without a protocol client in the loop (
test_db.py). - The protocol surface is testable without reasoning about business rules
(
test_mcp_surface.py). - The same rules apply whether a call arrives from an agent, the CLI, or the harness — an agent cannot reach an illegal board state by going around the tool layer, because the tool layer is not where the check lives.
Expected failures raise TaskboardError subclasses and are mapped to
ToolError at the boundary. Unexpected exceptions are deliberately not
caught, so a genuine bug surfaces as a server error instead of being disguised
as a normal negative result.
State hooks
Snapshots are JSON, not a copy of the SQLite file. That costs a little speed and buys a lot: snapshots are diffable, hand-editable, portable across schema-compatible versions, and comparable by hash.
Every snapshot carries a digest — a SHA-256 over the logical state with
volatile fields (row ids, timestamps) excluded, and comments keyed to their
task by title rather than by id. Two boards that arrive at the same logical
state by different routes produce the same digest:
# different ids, different timestamps, same digest
assert snapshot_a["digest"] == snapshot_b["digest"]
That is what makes "did the agent reach the target state?" a one-line check instead of a bespoke comparison per task.
python -m taskboard_mcp populate sprint_demo # deterministic start state
python -m taskboard_mcp snapshot > before.json
python -m taskboard_mcp restore before.json # exact round trip
python -m taskboard_mcp reset # empty board
python -m taskboard_mcp healthcheck # exit 0 if usable
Tool surface
| Tag | Tools |
|---|---|
read |
board_summary, list_tasks, get_task, search_tasks, list_transitions |
write |
create_task, move_task, assign_task, comment_on_task, delete_task |
admin |
populate_state, snapshot_state, restore_state, reset_state, list_fixtures |
Resources: taskboard://board/summary, taskboard://task/{task_id},
taskboard://schema.
Tags are how a deployment filters the agent-visible tool list — see
tool_visibility in app.yaml. The harness still calls admin tools out of
band.
Transition rules
Tasks move through backlog → in_progress → review → done. Skipping a column
is rejected, and so is a no-op move. list_transitions and the
taskboard://schema resource both expose the table so a client can check
before it calls rather than discovering the rule through an error.
Configuration
All configuration is environment-driven, so one image deploys to any sandbox slot without a rebuild.
| Variable | Default | Purpose |
|---|---|---|
TASKBOARD_DB_PATH |
/data/taskboard.db |
SQLite location |
TASKBOARD_FIXTURES_DIR |
/app/fixtures |
Where populate looks |
TASKBOARD_TRANSPORT |
stdio |
stdio, http, or sse |
TASKBOARD_HOST / TASKBOARD_PORT |
0.0.0.0 / 8080 |
HTTP bind |
TASKBOARD_READ_ONLY |
unset | Reject all mutating tools |
Local development
make install # venv + editable install with dev extras
make test # 51 tests
make smoke # spawns the server as a subprocess, drives a full episode
make lint
make run # serve on stdio against ./local.db
Docker
make docker-build
docker run --rm -i -v taskboard-data:/data taskboard-mcp:0.1.0 serve
docker run --rm -v taskboard-data:/data taskboard-mcp:0.1.0 populate sprint_demo
Multi-stage build, non-root user (uid 10001), /data as the only writable
path, and a HEALTHCHECK wired to the CLI's healthcheck subcommand.
Testing approach
51 tests across three layers:
test_db.py— business rules: transition legality, validation, cascade deletes, search behaviour, summary arithmetic.test_state.py— the hooks that matter for sandbox integration: exact round-trip, digest stability under id/timestamp churn, digest sensitivity to real changes, path-traversal rejection on fixture names, autoincrement reset after restore.test_mcp_surface.py— protocol layer via an in-memoryClient: tool registration, docstring coverage, resource templates, error mapping, read-only enforcement.
Each test runs against its own SQLite file in a tmp_path, so the suite is
order-independent.
The suite is mutation-checked: making an illegal transition legal in
config.py turns three tests red, including one that only reads the schema
resource. Tests that stay green under a rule change are not testing the rule.
Connecting a client
{
"mcpServers": {
"taskboard": {
"command": "python",
"args": ["-m", "taskboard_mcp", "serve"],
"env": {
"TASKBOARD_DB_PATH": "/data/taskboard.db",
"TASKBOARD_FIXTURES_DIR": "/app/fixtures"
}
}
}
}
Known limitations
- SQLite means a single writer. Fine for one sandbox per container, which is the deployment model; it would need revisiting for a shared instance.
- Full-state snapshots are
O(n)in board size. At fixture scale that is microseconds, but a board with millions of tasks would want incremental capture. - Search is
LIKE-based substring matching, not FTS. Adequate for the tool surface;sqlite3FTS5 would be the upgrade path if search quality mattered.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。