Skip to main content
Glama

workorder-mcp

Repository-local workorder tracking for coding agents over the Model Context Protocol.

Each project stores its workorders in:

<project-root>/.agents/workorders.sqlite

The project root is found by walking upward from the server process's current working directory to the nearest directory containing .git or an .agents/workorders.sqlite database. If neither marker exists, the current working directory is used.

A fresh project without Git starts from the current directory on first run. After the database exists, launches from nested directories resolve back to that project root. The search stops before the user's home directory, so a global ~/.agents directory or a dotfiles Git repository cannot capture unrelated projects.

Features

  • Named workorder groups with generated shorthands: A, B, ... Z, AA, AB, ...

  • Per-group workorder IDs such as A-1, A-2, and B-1

  • Workorder kinds: feature, bug, task, chore

  • Workorder statuses: open, in_progress, blocked, done, cancelled

  • Compact list responses with separately retrievable long descriptions

  • Append-only workorder history enforced by SQLite triggers

  • Editable observations with optional cross-workorder links

  • Project-local isolation; no global database

  • SQLite WAL mode, foreign keys, schema versioning, and transactional numbering

Related MCP server: vibecheck

Installation

Using a virtual environment:

git clone https://github.com/jlitewski/workorder-mcp.git
cd workorder-mcp
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .

On Windows, activate with .venv\Scripts\activate.

After activation, run the server with:

workorder-mcp

You can also run the package directly:

python -m workorder_mcp

Install once for all projects

For normal use, the server only needs to be installed once. Each OpenCode workspace starts its own server process in that workspace, which gives each project a separate database.

Option 1: install it on PATH and use the workorder-mcp command directly.

Option 2: install the built wheel into a stable per-user environment:

python -m venv ~/.local/share/workorder-mcp/venv
~/.local/share/workorder-mcp/venv/bin/python -m pip install \
  /path/to/workorder-mcp/dist/workorder_mcp-*.whl
mkdir -p ~/.local/bin
ln -sf ~/.local/share/workorder-mcp/venv/bin/workorder-mcp \
  ~/.local/bin/workorder-mcp

Then use workorder-mcp in OpenCode if ~/.local/bin is on PATH; otherwise use the absolute path to the executable. On Windows, use a normal per-user virtual environment and add its Scripts directory to PATH.

Build distributions

python -m build

This creates a wheel and source distribution under dist/.

OpenCode configuration

Add the MCP server to the project or global OpenCode configuration. Leave the working directory at its default so each workspace gets its own database.

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "workorder": {
        "type": "local",
        "command": ["workorder-mcp"]
      }
    }
  }
}

If workorder-mcp is not on PATH, replace the command with the absolute path to the executable installed in your environment.

You can also add it with the OpenCode CLI:

opencode mcp add workorder --global -- "$(command -v workorder-mcp)"

Do not set pool: true for this server. A shared connection would prevent each workspace from resolving its own project-local database. OpenCode starts local MCP servers in the workspace directory by default, which is the intended behavior. Do not set cwd to the server repository or another fixed directory.

Database override

WORKORDER_DB_PATH overrides the automatically discovered location:

WORKORDER_DB_PATH=/path/to/workorders.sqlite workorder-mcp

The CLI also supports an explicit path:

workorder-mcp --db /path/to/workorders.sqlite

Tools

Tool

Purpose

createGroup

Create a group and return its generated shorthand

getGroupBrief

Return only a group's brief

getGroupDesc

Return a group's long description, or ""

listGroups

List compact group summaries

createWorkorder

Create a workorder with a group-number ID

getWorkorder

Return full workorder details

listWorkorders

List compact summaries, filterable by group, status, and kind

updateWorkorder

Update fields and append history

getWorkorderHistory

Return immutable history, newest first

addObservation

Attach durable context to a workorder

updateObservation

Edit observation text or its related-workorder link

listObservations

List observations chronologically

Group shorthands

Shorthands use bijective base-26 numbering:

A ... Z, AA ... AZ, BA ... ZZ, AAA ...

Group names are case-insensitive. Existing shorthands are reserved as group names, and a generated shorthand skips names already used by other groups. A group may share its own shorthand.

Workorder IDs

Workorders use a stable, immutable public ID composed of the group shorthand and a per-group sequence:

A-1
A-2
B-1

History

History is append-only and enforced with SQLite triggers. Updates record only the fields that changed. Observation events record the observation ID and changed field names without duplicating observation text.

Observations

Observations are editable but cannot be deleted. Each observation can optionally link to a related workorder:

addObservation(
  workorder_id="C-4",
  observation="A-1 implemented the shared parser API that this task should reuse.",
  related_workorder_id="A-1"
)

Set clear_related_workorder=true on updateObservation to remove an existing link.

Limits

Field

Limit

Group name

100 characters

Group brief

500 characters

Group description

100,000 characters

Workorder title

200 characters

Workorder brief

500 characters

Workorder description

100,000 characters

Observation

20,000 characters

Page size

100 items maximum

Text fields reject NUL characters. IDs and pagination offsets are bounded to safe SQLite ranges.

Agent workflow

See docs/agent-usage.md for a recommended workflow. A project instruction template is available at docs/project-AGENTS.md.

Backup

The database is a normal SQLite file. Use SQLite's backup command while the server is idle:

sqlite3 .agents/workorders.sqlite \
  ".backup '.agents/workorders-backup.sqlite'"

The -wal and -shm files are part of normal WAL operation and should not be copied independently while the server is running.

Development

python -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
pytest
ruff check .

On Windows, activate with .venv\Scripts\activate.

The test suite includes:

  • Shorthand boundary and round-trip tests

  • Project-root and database-isolation tests

  • Schema, migration, and integrity tests

  • Group, workorder, history, and observation behavior

  • In-memory MCP tool tests

  • Real stdio subprocess tests

  • Concurrent group and workorder creation tests

Requirements

  • Python 3.11 or newer

  • SQLite with STRICT table and JSON function support

License

MIT. See LICENSE.

Available Tools

12 tools
addObservationAdd Workorder ObservationB

Attach durable context to a workorder.

Use related_workorder_id to record a structured cross-workorder reference.

Inputs: observation (required), workorder_id (required), related_workorder_id. Returns: created_at, updated_at, observation, workorder_id, +2 more

createGroupCreate Workorder GroupB

Create a workorder group.

Group shorthands are generated automatically and returned with the group.

Inputs: name (required), brief (required), description. Returns: group, success

createWorkorderCreate WorkorderB

Create a workorder in a group.

The returned workorder_id is a stable group-number ID such as A-1.

Inputs: brief (required), group (required), title (required), kind, +2 more. Returns: kind, brief, title, status, +7 more

getGroupBriefGet Group BriefA
Read-onlyIdempotent

Return only a group's short brief.

Use getGroupDesc when the long description is needed.

Inputs: name_or_shorthand (required). Returns: result

getGroupDescGet Group DescriptionA
Read-onlyIdempotent

Return a group's long description, or an empty string if none exists.

Inputs: name_or_shorthand (required). Returns: result

getWorkorderGet WorkorderA
Read-onlyIdempotent

Return full details for one workorder.

Prefer listWorkorders for broad scans because this includes the long description.

Inputs: workorder_id (required). Returns: kind, brief, title, status, +7 more

getWorkorderHistoryGet Workorder HistoryA
Read-onlyIdempotent

Return immutable workorder history, newest first.

Use only when change history is needed; normal retrieval is more compact.

Inputs: workorder_id (required), limit, offset. Returns: count, items, total, offset, +2 more

listGroupsList Workorder GroupsA
Read-onlyIdempotent

List group summaries and shorthands without long descriptions.

Inputs: limit, offset. Returns: count, items, total, offset, +2 more

listObservationsList Workorder ObservationsB
Read-onlyIdempotent

List a workorder's observations chronologically.

Fetch only when cross-workorder context is needed.

Inputs: workorder_id (required), limit, offset. Returns: count, items, total, offset, +2 more

listWorkordersList WorkordersA
Read-onlyIdempotent

List compact workorder summaries, newest activity first.

Long descriptions are omitted. Use getWorkorder for one full record.

Inputs: kind, group, limit, offset, +1 more. Returns: count, items, total, offset, +2 more

updateObservationUpdate Workorder ObservationA
DestructiveIdempotent

Edit an observation's text or related-workorder link.

Set clear_related_workorder=true to remove the link. Omitting related_workorder_id leaves it unchanged.

Inputs: observation_id (required), observation, related_workorder_id, clear_related_workorder. Returns: created_at, updated_at, observation, workorder_id, +2 more

updateWorkorderUpdate WorkorderA
DestructiveIdempotent

Update workorder fields and append a history event.

Omit fields to leave them unchanged. Pass description="" to clear it.

Inputs: workorder_id (required), kind, brief, title, +2 more. Returns: kind, brief, title, status, +7 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 12 tools

    Disambiguation4/5

    Three clear resource families (groups, workorders, observations) each have distinct list/get/create/update operations. The only mild overlap is getGroupBrief vs getGroupDesc, which are separated by an explicit note pointing to each other, and getWorkorder vs getWorkorderHistory is well clarified by the guidance in descriptions.

    Naming Consistency5/5

    All twelve tools follow a consistent camelCase verb_noun pattern (createGroup, getGroupDesc, listGroups, updateObservation, etc.). Plural list vs singular get conventions are applied uniformly across all three resource families.

    Tool Count4/5

    Twelve tools is well within the sensible range for a workorder domain spanning groups, workorders, and observations. The one minor excess is splitting group retrieval into brief/desc/list variants, which could arguably be a single call with a verbosity flag.

    Completeness3/5

    Read and create/update coverage is solid, including history and cross-workorder links, but there is no delete or archive operation for groups, workorders, or observations, and no explicit status/close transition for workorders. Agents can append history and edit fields but cannot remove stale records, creating dead ends for lifecycle management.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      B
      maintenance
      Enables coding agents to track and coordinate project work through a shared SQLite ledger, including task plans, session ancestry, claims, work locations, blockers, and commits via MCP tools.
      9
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables coding agents to persist and resume shared working state—tasks, progress, decisions, commands, tests, checkpoints, and handoffs—backed by SQLite while keeping Git authoritative for files and repository state.
      MIT