Timon tools for a remote agent
An agent running on another machine — behind a gateway your provider plugin drives, for example — does not get Timon's local MCP server, so it cannot see the Kanban, message other agents or write memory rules. Timon serves the same tools over MCP Streamable HTTP, and your plugin hands the remote agent a restricted token for it. Requires apiVersion: 7 and the mcp:issue permission.
"timon": { "id": "acme-gateway", "apiVersion": 7, "permissions": ["mcp:issue"] }
const { id, token, path, expiresAt } = await ctx.mcp.issueToken({
missionId, // a running mission
scopes: ['kanban_*', 'agent_send_message', 'memory_rule_add'],
ttl: 30 * 60_000, // milliseconds, 1 minute to 24 hours, default 1 hour
});
// Give the remote agent: the address where it reaches Timon + `path`,
// and the header `Authorization: Bearer <token>`.
await ctx.mcp.revokeToken(id); // optional: the token dies with the mission anyway
What the token allows
- The tools you list, nothing else.
scopesnames tools (kanban_add) or families (kanban_*). A bare*is refused, and so is a scope that matches no tool.tools/listonly shows what is in scope; calling another tool returns a JSON-RPC error without running anything. - Acting as the mission. A tool runs with the mission's identity and the same rights a local agent of that mission has. Messages, tasks and memory rules are attributed to that mission's agent.
- One mission, for a short time. The token is bound to one running mission and its agent. It expires after
ttl, and is deleted when the mission ends. Your plugin can revoke the tokens it issued, and only those. It is checked again before every tool call, batches included: once it has expired, been revoked or lost its mission, the next call returns the JSON-RPC error-32001without running.
Which missions
A mission your caller can see (in a request, the user's own missions; in a background job, the missions your plugin started), or a mission running on a backend your plugin registered with ctx.backends. Any other mission is answered as if it did not exist.
What the token does not allow
- It is not an API key: every other Timon endpoint answers
401to it. - It cannot read files on the machine where Timon runs: give
agent_set_avataradata_url, give the browser tools aslug. - Treat it as a secret: send it in the
Authorizationheader only, never in a URL, never in a log.
Reaching Timon from another machine
The endpoint listens where Timon's daemon listens, which is the local machine only by default. Do not open Timon to every network interface for this. Instead, use one of:
- Tailscale (recommended):
tailscale servepointing at the daemon port. - An SSH tunnel from the remote machine:
ssh -L 8765:127.0.0.1:<daemon port> you@timon-host, thenhttp://127.0.0.1:8765+path. - A reverse proxy with TLS in front of the daemon, forwarding the
Authorizationheader.
The web app's own address does not serve this endpoint: point the remote agent at the daemon.
Protocol notes
POSTonly,application/jsonin and out, no session id;GETandDELETEanswer405.- Protocol versions
2025-06-18and2025-03-26. - A request carrying an
Originheader from another site is refused.