taskboard-mcp
# taskboard-mcp
A small [Model Context Protocol](https://modelcontextprotocol.io) server that lets an AI agent work with a task board, but only the parts it has been granted.
The data is a fictional sample board, built in so the server runs anywhere.
## The idea
Connecting an AI agent to your tools is easy. Making sure it can only do what it should is the actual work. This server enforces two rules:
1. **Scopes decide which tools exist.** A tool is registered only when its scope is granted, so a read-only agent never even sees `create_task`. It has nothing to try.
2. **Workspaces decide which records exist.** An agent scoped to one workspace sees only that workspace's tasks and members. A task from another workspace returns the same "not found" as an id that doesn't exist, so nothing leaks.
## Tools
| Tool | Scope | What it does |
|---|---|---|
| `list_tasks` | `tasks:read` | Tasks in the visible workspaces, optional status filter |
| `get_task` | `tasks:read` | One task by id |
| `list_members` | `members:read` | Members of the visible workspaces |
| `create_task` | `tasks:write` | New task in a visible workspace, always starts in `todo` |
## Run it
```bash
npm install
npm run build
MCP_SCOPES=tasks:read,members:read MCP_WORKSPACES=design npm start
```
- `MCP_SCOPES`: comma-separated, from `tasks:read`, `members:read`, `tasks:write`. Defaults to `tasks:read`.
- `MCP_WORKSPACES`: comma-separated, from `design`, `marketing`, `open-source`. Empty means nothing is visible. Access is opt-in.
An unknown scope or workspace stops the server at startup instead of being ignored.
### Use it from an MCP client
```json
{
"mcpServers": {
"taskboard": {
"command": "node",
"args": ["/path/to/taskboard-mcp/dist/index.js"],
"env": { "MCP_SCOPES": "tasks:read,members:read", "MCP_WORKSPACES": "design" }
}
}
}
```
## Going further
Here the access context comes from environment variables to keep the example self-contained. In a real deployment it would come from an OAuth 2.0 access token (authorization code flow with PKCE), validated on every request. The tool code would not change: `createServer(ctx)` takes the same `AccessContext` either way.
## Tests
```bash
npm test
```
The tests connect a real MCP client to the server in memory and check that tools appear and disappear with scopes, that other workspaces stay hidden, and that writes stay inside the allowed workspace.
## Stack
TypeScript · `@modelcontextprotocol/sdk` · Zod · Vitest
## License
MIT
TDQS
Scored across 2 tools
list_tasks and get_task target clearly different operations: one is a filtered collection query, the other a single-item lookup by id. An agent can easily choose between them with no overlap.
Both names follow the same snake_case verb_noun convention (list_tasks, get_task) and match the domain vocabulary ('task'). No deviation to flag.
Two read-only tools is far too thin for something called a 'taskboard', which implies creation, editing, and status transitions. The surface feels like a read-only stub rather than a scoped toolset.
There is no create_task, update_task, delete_task, or status-change operation, and no way to discover workspaces despite them being referenced in the description. An agent can read tasks but cannot act on them, causing dead ends for any write workflow.