Skip to content

dotime-mcp: the queue as MCP tools

An MCP server on standard input and output that offers the queue to agents as tools. It has no dependencies, and the npm install puts it on your path next to dotime-queue.

On this page

Add it to your client

Claude Code

Shell
claude mcp add --transport stdio dotime-queue -- dotime-mcp

dotime-queue setup --mcp prints this line and the entries below.

Any MCP client

Add one entry to your client's MCP server settings. Clients differ in where that file lives and in how its top level is named; see your client's documentation.

JSON
{  "mcpServers": {    "dotime-queue": { "command": "dotime-mcp" }  }}

Without installing first

npx fetches the package and starts the server:

JSON
"command": "npx", "args": ["-y", "-p", "deployontime", "dotime-mcp"]

From a clone that was not linked

JSON
"command": "node", "args": ["<path to the clone>/mcp/server.mjs"]

To use another state folder, add "env": { "DOTIME_HOME": "<absolute path of the folder>" }. A relative path is taken from the folder the server starts in, and its jobs are handed the absolute path.

The five tools

Tools of dotime-mcp
ToolArgumentsWhat it gives
queue_statusnoneThe lines of dotime-queue status, with the slot and line counts as fields
queue_passedmatch, cwdThe stamp or no-stamp line of dotime-queue passed, with stamp as true or false
queue_historydays (1 to 365, default 7)The lines of dotime-queue history
queue_runlabel, command (a list of words), cwd, kind, maxRunMin, noSkip, afterFixStarts dotime-queue run in the background and returns a job id at once
queue_jobjobId, tailLines (0 to 500, default 40)starting, waiting, running, finished or lost; for a finished job its exit code, outcome, flaky note On main, next release and the last lines of its output

Every tool result has the readable lines as text, then the same fields as JSON text, and the fields in structuredContent.

How its jobs run

  • cwd is an absolute path to an existing folder; without it, the folder the server was started in is used. The label is "<project>: <task>".
  • The command is a list of words and never goes through a shell.
  • A job waits and runs under the same rules as one started from the shell, in a process group of its own, and keeps running when the server exits.
  • Output and pid files are kept in mcp-jobs/ in the state folder for 7 days, and at most 200 finished jobs are kept.
  • --priority and --max-wait are not offered: such a job waits at most the usual 60 minutes.
  • Each waiting job costs two Node processes, so queue_run refuses a new job while 20 it started still wait or run (mcpMaxJobs).

The shell commands keep working as before; both share the same state folder, slots and journal.

Getting the result

Clients with the MCP tasks extension: no polling On main, next release

A client with the tasks extension (io.modelcontextprotocol/tasks, on the newest MCP revision), such as Claude Code, asks for it in its request, and queue_run then answers with a task whose id is the job id. The client polls tasks/get itself and hands the agent the result once the job has finished: the same text and fields as queue_job, marked as an error unless the job passed or was skipped. tasks/cancel takes a waiting job out of the line or stops a running one.

On main, in the next release. Tasks support is newer than npm 0.1.1. Until the next release, install from a clone to use it.

Every other client: queue_job

Every other client gets the job id at once and polls queue_job until the job is finished. The older tasks API of the previous MCP revision is not offered.

Protocol versions

The server speaks the newest MCP revision (no handshake: each request names its version in _meta, and server/discover lists the versions) and the earlier revisions that open with initialize.

Listings