MCP — the forge as a connector
POST /mcp is the forge as a Model Context Protocol server: the studio's
verbs as tools, so an assistant a person already talks to can run their forge
from wherever they are. It is the same forge through another door — every
tool calls the action the page calls, with the same checks — and it is built
for a tunnel and a forge that sleeps.
First three calls
An outside agent with no account makes these first:
start({ action: "contribute" })— an account, a repo, a live app and a token in one call.contribute()— what this forge is, its bottleneck, and the help-wanted issues.find_tool({ query })— find any other tool by what it does; the answer is callable at once.
Shape
- One short call, one JSON answer. The Streamable HTTP transport, used
the plain way: a JSON-RPC request in,
application/jsonout. No server-sent stream is ever opened (GET /mcpis 405), so there is nothing for a proxy to cut at a hundred seconds, and nothing to reconnect. - The first call wakes it. A forge scaled to zero is woken by the request like any page; a client's retry on a slow first answer is safe, because every write is an ordinary forge action and the reads change nothing.
- Slowing down is told in seconds. Every 429 and 503 from the API and
/mcpcarries an integerRetry-Afterheader, and a JSON body names the same seconds asretryAfter; wait that long. The answers that are not JSON (/healthz,/readyz, a refused shell, the plain-text standby page) carry the header alone.test/retry-after.test.tschecks every site in the code and drives the token, stranger, code-search, sign-up and OAuth limits and/mcpitself. - A token, never a cookie.
Authorization: Bearer <forge token>. A browser session is refused even when signed in: a cookie is what a cross-site page could ride, and this door has no page. Anrotoken reads; anrwtoken acts; a reading tool says so (readOnlyHint: true), and a tool without it writes, by MCP's default. - What you may not do on a page you may not do here. A private app is
"no such app" to someone who cannot write its repository; stopping a run, and knocking
on an app with
probe, are a writer's; the terminal's deploys screenpis the same knock behind the same gate.
Tools
Every tool, rendered from the code and never kept in this file, so a pull
that adds a tool edits no shared doc: bun scripts/mcp-table.ts prints the
table (name, the action/kind values it takes, the first sentence of its
description, its bytes in tools/list), and /llms.txt serves each tool's
line live. The roster is the directory src/http/mcp/tools/, one file per
tool; test/mcp-table.test.ts fails, naming the tool, when the table and
the directory differ.
report answers the receipt POST …/reports does (id, state, issue, number, url, message, next; next is two lines, who reads it and that nothing acts before a writer adopts it): issue and number are null until a person accepts the report, and url shows the number once there is one; never the filer's words.
Five tools need no token, for the same reach as their HTTP doors: report,
offer, start, explore and search (TOKEN_FREE_TOOLS in src/core/mcp_card.ts).
offer ({ repo, title, body?, patch }, or { receipt } to read an offer's state) calls fileOffer, the action behind
POST /api/v1/repos/{owner}/{name}/offers, with the same refusal words (the 422
reasons, rate_limited, queue_full; a private repository answers not_found);
it is the one open call whose body may be larger than 64 KB (a patch, up to
OFFER_REQUEST_MAX). Called with no token, explore and search run the functions the HTTP doors
call with no account, so they read only what is public (a private repository
is absent), and a stranger's code search takes the same per-address slot as
/api/v1/search. Called with a token they are unchanged and see what the
account sees. tools/list still needs a token (its 401 is what starts a
client's OAuth sign-in); the open tools are named in /llms.txt, the server
card (tokenFreeTools) and /api/v1/here.
fork also takes { repo, action: "sever", dryRun? }: the same severing Settings offers (the detach tool's plan and words), so an owner or their agent leaves the upstream by either door; dryRun is true unless false, and the real call needs an admin token.
The complete list, with schemas, is MCP tools/list called with a token.
/llms.txt, under "## MCP tools", lists only the tools open without a token (one line each, from its doc) and counts the rest, pointing on to tools/list; signed in, it lists the tools that token may call (a read-only token omits the writes it cannot make; admin tools need an admin account and an admin-scope token). It carries an ETag that changes only when its words do; a stranger's read is public for five minutes and answers If-None-Match with 304, a token's is private.
Sending a failed webhook delivery again (redeliver, #8075) is the terminal's r on a hook's Deliveries screen only; the hooks tool has no action for it yet.
Adding a tool
One tool, one file (#5924): src/http/mcp/tools/<name>.ts exports tool,
its definition and run, and nothing else; its arguments' shared helpers
are in src/http/mcp/shared.ts. Its line in /llms.txt is its doc.
Then run bun scripts/mcp-tools.ts: it adds one line to the sorted
tools/index.ts and writes no docs, so two pulls adding two tools
edit no line in common. test/mcp-tools.test.ts holds every tool file to
the same contract and goes red when the index is stale; the
tool's own behaviour is tested in test/mcp-<name>.test.ts.
Room for a new tool
Every session pays for tools/list first. It is paged, as the MCP spec
allows: a page holds about 20,000 bytes of tools (TOOLS_PAGE_BYTES in
src/http/mcp.ts) and carries nextCursor while more remain; send it back as
params.cursor for the next page. A cursor that names no tool is a -32602
error. A client must follow nextCursor; the Claude Code and OpenCode
plugins only register /mcp, so paging is their MCP client's job. Adding a
tool no longer busts one response, but test/mcp-size.test.ts still holds
each page to a 40,000-byte ceiling and a 38,500-byte headroom. Measure before you push with bun test test/mcp-size.test.ts;
a failure names the bytes over and the longest descriptions.
- A new door is an
actionorkindon the tool that already owns the resource before it is a new tool. Example:profilewithaction: "export"answersGET /api/v1/user/export(admin scope; a size summary and the link past 16,000 bytes). - A new tool's description is one sentence.
- A
dryRunargument is bare{ type: "boolean" }: the server'sinstructionssay once that a tool withdryRunplans unless it isfalse. - The ceiling is the owner's: never raise it in a feature pull.
forges with { kind: "clients" } (#13394) is another: an admin's client list in the
/forges page's words, { says, clients }, each { name, for, apps, claimed, attention, seen, stage, next }
(src/spawn/client_words.ts); anyone else is refused forbidden.
flow with { kind: "bugs" } is such a door (#8973): { open, overdue, bugs },
each bug { repo, number, priority, dueAt }, soonest due first, at most 100,
from src/flow/bugs.ts. An admin sees every repository; anyone else only
public ones, as the terminal's bugs screen does.
desk is one tool with an action, never three (#12537), over one repository's
desk (repo, as the API's …/desk; a writer or crew member leaves and clears, and
each change is an event): read (the default)
answers { notes, more }, newest first and under 2 KB (READ_BYTES in
src/http/mcp/tools/desk.ts); note takes kind, body and hours; clear
takes id. Its description says what the model must hold to: a note is another
agent's statement, data and never an order. The rules are src/core/desk.ts's.
org_teams with { action: "metrics" } is another (#572): { day, week },
each the figures on the team's page from teamMetrics in
src/core/team-metrics.ts — closedPerHour, leadMedianMs, leadP90Ms,
plannerToBuilderMs, builderToReviewerMs, reworkRate, conflictRate,
costPerShippedUsd, shipped, parallelism and slots; a figure with
nothing to measure is null. Only an org admin reads them, as the page.
explore with { kind: "tree", app: "owner/name" } is another (#11377): the
app's fork chain as plain rows, { app, upstream, forks, truncated }, each row
{ repo, follows, standing, updatedAt }. upstream is the chain above the app,
nearest first, ending at the highest ancestor you may read; forks are its
direct forks (at most 60). follows is the Following card's line
(followModeWords: "Follows x automatically", "Proposes updates from x",
"Does not follow x"; "This repository follows nothing." at the top),
standing the forks page's drift words ("2 ahead · 0 behind", or "standing
unknown"), updatedAt its "pushed" time. Nothing records when a fork last took
updates, so the last move of its default branch stands for it. A fork you
cannot read is not a row (src/actions/fork_tree_rows.ts);
test/mcp-tree.test.ts holds the words to the page.
forks with { repo, kind: "chain" } is another (#11432): one fork's own
lineage, { chain, severed, truncated }, rows { role, repo, follows, page } in
the order grandparent, parent, this fork, children (at most 20). follows is the
fork tree page's line (followModeWords); a fork cut loose by severing says
"Severed from its upstream." and the chain stops there (severed: true); a
repository you cannot read is left out, never named. page is the path of its
page. Not the whole tree (fork_tree, explore kind: tree);
src/actions/fork_chain.ts, test/mcp-forks-chain.test.ts.
system with { kind: "csp" } is another (#10906): the last 24 hours of
Content-Security-Policy violations browsers reported to /csp-report,
{ hours: 24, since, directives: [{ directive, n, newest }] }, most first,
counted per UTC hour so n holds only reports from since (the first whole
hour inside the 24) on, newest
the blocked host counted last, read by violationsByDirective in
src/http/csp_report.ts as the security page reads its week. A forge admin
only; anyone else is forbidden.
system with { kind: "routes" } (#11476): up to 10 budgeted routes as
{ route, p95Ms, budgetMs, n, slowestPhase } over the watcher's 15-minute
record, the most over budget first; route patterns only. An admin or an agent
granted telemetry:read.
flow with { q, action } is the fleet's write door (#450): the plan
POST /api/v1/fleet/ops answers for a dry run, { dryRun: true, query, kind,
verb, value, reversible, rows, counts }, with nothing changed and only a read
token needed. Only apply: true acts, and it takes an admin token and a
person, as the API does; the receipt is { dryRun: false, id, rows, … }, and
limb with action: undo and operation: id reverts it for 24 hours.
crew with { kind: "week" } is another (#10722), a forge admin's: { days, members },
each member { username, merged, returned, spentUsd, idle } over the last 7
days, from src/crew/week_card.ts (spend from the usage ledger). The same
answer is GET /api/v1/crew/week and the "This week" block on Settings › Crew.
Answers are JSON in a text block; most carry a says sentence short enough
to relay as it is.
Asked first in the conversation
A tool marked (admin scope) is listed and called only with an admin-scope
token. An admin whose token is short of it reads, on the first tools/list
page's _meta.hidden and in initialize's instructions, one sentence naming
the hidden tools and the two ways to them: an admin-scope token, or a confirm
in the conversation (#7650).
The forge's own agent (a via token) asks before an outward-facing or
hard-to-undo action: release and rollback, archive and delete, subscriptions
and budgets, secrets, invites, SSH keys, and every admin-scope tool — the one
list is ASKING in src/crew/conversation_confirm.ts. Such a call does
nothing and answers { needs_confirm, tool, does, says }: does is one
sentence of what it will do, said to the person; a secret's value is never
repeated in it, and an argument cannot break it onto a new line. A tool whose
only reading action is list (secrets, app_env, ssh_keys, and
proposal_tokens by its verb) asks for its writes only. A confirm turn is
written to their conversation.
The person says yes from their own browser session, same-origin, never a
token, so never the agent: Settings → Confirms (/settings/confirms), the
terminal's Confirms (y), or POST /api/v1/conversation-confirms/:id. All
three call sayYes in src/actions/conversation_confirms.ts. Before the
yes the person reads every argument as the call will run (#8230): the page's
row folds open on them, and the terminal's yes dialog repeats them under the
sentence. Only genuine secrets are hidden there — a sealed secret's or app
variable's or cloud token's value, and any token, secret, password or
credential — so a public key or a limit's key and value are read whole.
A call whose arguments are too large to read whole is refused and kept
nowhere. It does the
stored call with its stored arguments once, as the person via the forge's
agent, and writes a tool turn naming the undo when the action has one. A
result shown only once (mint_invite's link, claim_link, a minted proposal
token) is answered to the person and kept in the turn only as a sentence. A
second yes is 409 answered; a yes 10 minutes on is 410 expired. A confirm
left unanswered for 10 minutes is swept: its arguments are cleared and it no
longer counts toward the 50 a conversation may hold. An admin-scope tool is
reached this way only by a person who is an admin.
Arguments, in full
Every call is held to the tool's own inputSchema before anything is held, asked, recorded or
run, a stranger's explore and search as well (badArgument in src/http/mcp/shared.ts). The
first argument that does not fit is refused naming it, with what was expected and one corrected
example; nothing runs:
- a wrong type:
invalid: argument "limit" is "many"; expected integer from 1 to 100. Example: {"limit": 1} - outside
enum:invalid: argument "kind" is "bogus"; expected one of "all", "issues", "repos", "code". Example: {"kind": "all"} - outside
minimum/maximum:invalid: argument "limit" is 0; expected integer from 1 to 100. Example: {"limit": 1} - over
maxLength:invalid: argument "q" is 201 characters long; expected string of at most 200 characters. Example: {"q": "text"}(a long value is measured, never echoed; one named like a secret or token is never shown) - a name the tool does not take:
invalid: unknown argument "bogus": this tool takes q, kind, repo, … Example: {"q": "text"} - a
requiredone left out:invalid: argument "repo" is missing; expected string. Example: {"repo": "text"}
Each is followed by the tool's usual Next: step. Only the top level is read; nested shapes
(items of a list, keys of an object) are the tool's own to refuse, and spawn, whose schema says
additionalProperties: true, takes extra keys.
tools/list keeps every argument description to 60 bytes (test/mcp-size.test.ts
enforces it); dryRun reads false to apply on every tool that takes it. The
longer sentences:
dryRun: plans unless it isfalse; anything else changes nothing.limbapplying takes an admin token.signup: the terminal's Invite links screen does the same:spicks a mode, shows the plan (from → to) and changes it after a confirm, for a forge admin who is a person.tell.from: a path on this forge the issue links to, like/alice/notes/pulls/3.tell.context: where this was told from, for the builder.spawn.reveal,claim_link.reveal: put the live claim link in the answer (default false); it is a secret, only when its person reads it.spawn.fresh: a fresh app beside the copied ones.spawn.followMode:tell-me(default) tells the owner in their inbox when this forge's code moves;take-updatesopens a pull with the new code, and a person merges it.spawn.size: small, medium, large or xlarge; the child's cell is given that CPU, memory and disk (sizeslists them), and a spawn over the host's child quota is refused; a hosted child has no cell to hold it.spawn.keepAccess: stay an owner once claimed.spawn.config{apps:[{repo, mode: fork|autonomous|migration}], budgetUsd?, admin?, domain?}orspawn.recipe(a name saved on the New forge page orPUT /api/v1/forges/recipes/<name>) in place ofapps; a budget applies only beside a model key, which never travels through an agent.commits.ref: branch, tag or commit; the default branch when absent.report.page: the http(s) address where the problem was seen.plan.issues.pillar: the pillar served, as"P0"or"P0 Trust";later: truemeans no pillar and needswhy.here.url: none means the forge's own page. On/or/settingsthis forge's admin also getsplan: { text, manage? }, the Plan row's words and its manage-billing address; no plan notice or not an admin, noplankey.explore.q: words, pluskind:app|person|forgeandsort:score|forks|ships|likes|use|fresh|name,updated:1d|7d|30d(only what moved in that window),owner:nameandarchived:yes.sinceis another name forupdated.queryis the same argument;qwins when both are given. Each ofkind,sort,updated,owner,archivedis also its own argument (and a query parameter on/exploreand/api/v1/explore); it wins over the same key inq.archive.repos: several repositories, asowner/name, to archive in one operation.milestones.issue: the number of an issue that waits for others; the limbs when absent.watch.issueis the same number;watch.watchfalse stops watching, anything else watches.limb.reason(close): why it is not being done, in one sentence.limb.pillar(resume): the pillar to return it under.limb.under(raise, lower):topor a milestone number, only when the limb sits in several places.asks.hide_kinds,asks.hide_people,feed.*: leave out these kinds or usernames; replaces your saved filter.audit.repo: one app, asowner/name; every app you can see when absent.model_ceiling.dailyUsd/perRunUsd: 0.01–10000; both null clears; one null is refused.model_grant.usdPerMonth: 0 takes the grant back.account_role.usdPerMonth: omit or null for none.hold.why: why, in one line; it shows on the pull.runs.limit: how many, 1 to 50; 20 when absent.boards.step: withpanel, seconds per bucket, or a count ofs,m,hord.access.since: ISO time; default a day, max 14 days.
A brief answer
now takes brief: true and answers one plain sentence under 280 characters, for a person
asking from a car. No new tool. How to use it: docs/features/crew-now.md.
Never offered what can only refuse (#10262). A tool that refuses everyone but a forge admin in its own run declares listedTo: "admin": it is listed (in tools/list, find_tool and /llms.txt) to an admin alone, and called by anyone else it runs to its own refusal, never held for a Do it. adminOnly hides a tool the same way, but anyone else's call is answered at the door (notAdminTool, with how to reach an admin) before the tool runs: use it for a tool with no refusal of its own, and listedTo for one whose refusal already says why and what to do. A write a tool would refuse this person for their access declares refusesFirst, the same check and words as its run (a review verdict needs write access or a team reviewer; landing needs write access, and landing as it is a green check): such a call is answered as refused at once, before the fence could hold it. test/talk-no-dead-holds.test.ts walks every tool a member and a guest are listed and fails on a refusal for lack of role.
Ask for less: the default list and find_tool (#11957)
The MCP is the forge's control surface; repo work is git's (clone and push).
tools/list opens with the tools that direct and watch a forge: tell,
say, next_up, now, runs, knobs, usage, apps, app_deploy,
forges, find_tool, and the open tools report and start are added to it (DEFAULT_TOOLS in
src/http/mcp/catalog.ts; api joins when it exists). read_file and
write_file are not in it: they are the fallback for an agent with no shell
("No shell? ..."), reached by find_tool, and no diff, blame, tree or
multi-file tool is added on that side. The server instructions say so in two
sentences. Every tool stays callable by name. find_tool({ query }) returns
up to eight tools whose name or description match every word, each with its
description and schema, so a tool found is callable at once. A client that
wants today's list sends tools/list with {"all": true} (paged as before).
| What | Before | After |
|---|---|---|
tools/list, admin | ~62 KB, 196 tools (~15k tokens) | 5.6 KB, 13 tools (~1.4k tokens) |
| A session that manages a forge (direct the crew, watch runs, deploy an app) and never loads a file tool | ~62 KB of tools | the same 5.6 KB list, no file tool in it |
Talk's agent (a conversation's via token) is listed more: its harness calls only the tools tools/list named, so the short list left it unable to read an issue, a pull or a file. It gets TALK_TOOLS (src/http/mcp/catalog.ts): the default list, the reads a question about the work needs (issues, pulls, commits, threads, search, read_file, a run's log, a preview, asks, health, releases, people, and whoami_can: who the person is, that the agent acts as them, and with repo what they may do there) and the everyday writes on that work (comment, close, assign, labels, edit, review, merge, asks, the plan on an issue, a crew run's steer and stop, and a branch, file and pull or a new app built in Talk). After the agent has read text someone else wrote, each of those writes is held for their yes (Do it or Not now) unless the person's own words ask for it: test/mcp-talk-tools.test.ts calls every write on the list after a hostile read and fails if one runs. The list is filtered by visible like every list and kept well inside one page, 17,389 bytes (~4.3k tokens) for an admin under a 17,500-byte ceiling. Every other caller's list is byte for byte the default list, as before.
test/mcp-size.test.ts caps the default list at 6 KB and asserts the file
tools are absent from it. Not done yet: the "full list" token setting, api,
run_wait, since/fields, the card only for a client that renders cards,
the asks*/feed* collapse; the cost of five common answers is measured
when those land.
Connecting
Mint a token under Settings → Access tokens (rw to act, ro to watch),
then, in Claude Code:
claude mcp add --transport http forge https://<your-forge>/mcp \
--header "Authorization: Bearer <token>"
Any MCP client that can send a header works the same way.
The server card
/.well-known/mcp/server-card.json is the small one (the MCP server-card draft, SEP-1649; its names may change): name, version, endpoint, transport, authorization (read from /.well-known/oauth-protected-resource), and only the tools a stranger may call. Public, cached an hour, linked from /llms.txt and mcp in /api/v1/here.
/.well-known/mcp is the one-fetch door: name, version, mcp (the URL), oauth.authorization_endpoint, oauth.token_endpoint and tools (the live count); public, cached five minutes.
/.well-known/mcp.json names the server (name, version, endpoint,
transport, protectedResourceMetadata, documentation, openapi,
tokenFreeTools)
and the build that answers: commit, the full commit the forge runs
(FORGE_COMMIT, or FORGE_APP_COMMIT on a preview), or null when nothing
says. version is dev on a preview, so commit is how an agent tells two
previews apart.
tools lists every tool name. /.well-known/agent-card.json is the same
server as an A2A agent card (protocol 0.3.0, the stable subset: name,
description, url, version, capabilities, securitySchemes, skills);
its skills are those tools, built from the same list in core/mcp_card.ts,
and a test fails if they differ.
/.well-known/api-catalog (RFC 9727, application/linkset+json) is the one
request that lists the OpenAPI description, this card and the docs; the home
page's Link header points at it. It adds no tool.
Attaching with OAuth
Clients that cannot paste a header — the Claude apps, Grok's connectors —
attach by OAuth. The forge publishes its discovery documents
(/.well-known/oauth-protected-resource, /.well-known/oauth-authorization-server),
takes dynamic client registration at /oauth/register, and runs the
authorization-code flow with PKCE S256 (public clients, no secret, no
refresh token).
- The client sends you to
/oauth/authorize. If you are not signed in you sign in and come back. The page names the client and the host it will return to, and asks for Read (ro) or Read and act (rw), a name for the token, and how long it lasts (until revoked by default). - On Allow the forge redirects to the redirect address the client
registered — exactly, never a look-alike — with a one-time
codeand the client'sstate. A code works once, for 60 seconds, and is stored hashed. - The client posts the code and its PKCE verifier to
/oauth/tokenand receives a bearer token: the same kind Settings mints. It is listed under Settings and revoking it there cuts the connector off.
The Claude app (web or phone): Settings → Connectors → Add custom
connector, URL https://<your forge>/mcp. Claude registers itself with the
callback https://claude.ai/api/mcp/auth_callback; approve it on the forge's
page. Grok: Connectors → Add custom connector, the same /mcp URL;
approve the page it opens. Pick ro unless the connector should be able to
tell and plan.
The token's scope is the whole of its authority: a connector holding ro
can call apps and is refused tell.
src/http/oauth.ts, src/core/oauth.ts, src/web/pages/oauth.ts,
test/oauth-flow.test.ts.
src/http/mcp.ts, src/http/mcp/tools/, src/actions/tell.ts, test/mcp-forge-*.test.ts.
plan
Opens several small issues and their links in one transaction. Each item is
{ key, title, body?, blockedBy? }; blockedBy lists keys of the same call or
numbers of issues already open. A loop, an unknown key, an unknown number, an
over-long title or body, or more than 12 items refuses the whole plan, naming
the item, and nothing is opened. Issues belong to the token's owner and emit
the same events as opening and linking one by one. It needs an rw token.
Where the app has pillars (docs/PLANNING.md), every item also says what it
is for, or the whole plan is refused (no_pillar), naming the item and the
pillars there are:
pillar, the one it serves, by short form or name ("P0"or"P0 Trust"): the pillar's umbrella issue then waits for it.later: truewithwhy, one sentence: it serves no pillar now. It opens blocked by the Later gate, so it is not on the ready list, its body opens withLater:and the sentence, and the answer lists it inlater.
{ "app": "trevato/forge", "issues": [
{ "key": "review", "title": "Every agent pull is reviewed", "pillar": "P0" },
{ "key": "slider", "title": "The profit slider", "later": true,
"why": "Money lines serve no pillar now." } ] }
answers
{ "says": "Opened 2 issues: review is #7, slider is #8. #8 waits behind the Later gate #5.",
"opened": [{ "key": "review", "number": 7 }, { "key": "slider", "number": 8 }],
"ready": [7], "later": [8] }
An app with no pillars takes no pillar (unknown_pillar), and later
needs the gate to exist (no_later_gate).
{ "app": "alice/game", "issues": [
{ "key": "board", "title": "Draw the board", "body": "8x8 grid" },
{ "key": "moves", "title": "Legal moves" },
{ "key": "play", "title": "Play a game", "blockedBy": ["board", "moves"] } ] }
answers
{ "says": "Opened 3 issues: board is #7, moves is #8, play is #9.",
"opened": [{ "key": "board", "number": 7 }, { "key": "moves", "number": 8 }, { "key": "play", "number": 9 }],
"ready": [7, 8], "later": [] }
Cards, the contract and the plugins (#1116)
- Cards. Each tool below names a
ui://resource in_meta.ui.resourceUri(MCP Apps, SEP-1865).test/mcp-card-table.test.tskeeps this table equal to the server's resource list.
| Resource | Tool | Shows |
|---|---|---|
ui://forge/app | apps, new_app | Your apps, or the app just made: live or not, what is working, a Tell box. |
ui://forge/run | — | Legacy running-now list; now draws crew instead. |
ui://forge/asks | asks, asks_act | One row per waiting decision with its button; a press plans, the Confirm card (the page's own, e.g. "Close 1") does it, then the receipt. |
ui://forge/wave | waves | One wave: headline, highlights with their why, pull numbers. |
ui://forge/map | map | The plan: per pillar ready, working and waiting counts, the first ready issues. |
ui://forge/feed | feed | The newest timeline items, at most 20, each linked; how many are new. |
ui://forge/pull | pull | One pull: state, check, conflicts, head → base, preview link. |
ui://forge/pulls | pulls | Pulls, at most 20: #N title, state, check and review word, each linked. |
ui://forge/runs | runs | Recent runs, newest first, linked to their logs. |
ui://forge/asked | asked | What people asked the crew for and where each ask stands. |
ui://forge/explore | explore | Apps, people and forges ranked, at most 20: name, kind, the numbers (and likes or ship time when sorted by them), linked; only what you may see. With kind: tree: upstream, this and fork rows, each with how it follows and linked to its repository. |
ui://forge/issue | issue | One issue: title, state, assignee, labels, what it waits for. |
ui://forge/flow | flow | The pipeline: per stage counts, oldest waiting, the bottleneck. { kind: "lanes" } (a forge admin who is a person): each home lane's now and typical seconds and the slowest lane. |
ui://forge/scorecard | scorecard | The crew's scorecard, one row per agent: landed and red rate all time, then the week (forge admin). |
ui://forge/crew | now, crew | now: what the crew is doing right now, with Stop buttons. crew (listing): one row per seat, who fills it and what runs and waits, or what it costs to leave it empty; linked to Settings › Crew. |
ui://forge/health | health | Green or red with the version, then one row per cause: draining, a blocked rollout, degraded lanes, incidents, apps (an admin sees all; a stranger only the verdict). Its answer splits causes into broken (act now; any makes ok false) and todo (would like done; ok stays true). |
ui://forge/forge | forge_view | The forge in one card: healthy or not and what is running, then the apps with work going, busiest first; quiet apps and what waits on you are counted. |
ui://forge/capacity | capacity (listing, admin) | One row per setting with its live value (set ones marked), linked to Settings › Capacity; says when the forge cannot swap itself. |
ui://forge/board | boards | One board's panels (person admins). |
ui://forge/forks | fork_tree, forks | The fork tree around a repository, each row with how it follows; forks a row per fork with its commits ahead and behind, kind: chain its chain (a severed chain says so); each linked to the repository, at most 30 and one More row. |
ui://forge/milestones | milestones | The milestones and how far each is. |
ui://forge/search | search | The query on top, one row per hit (repository, issue, pull, code) with its kind, title and link. |
ui://forge/issues | issues | A repository's issues, one row each: state, pillar, what it waits on, untrusted when an outsider wrote it. |
ui://forge/release | releases | Kept releases, the last 10 newest first, each proven, unproven or rolled back, linked to its pull. |
ui://forge/releases | releases with shipped | What shipped: one linked row per landing, the live version, what is on its way. |
ui://forge/forges | forges (listing, admin) | Forges you sent: one linked row each, whom it is for and its stage in words (sent, opened, signed in, last tell); a link unopened for 3 days says resend and comes first. |
ui://forge/held | held | What waits on a person: themes, one row each, and one button that closes the done ones. |
ui://forge/drill | restore_drill | The drill: verdict in one word (green, red, none), the failed step, and when it ran. |
ui://forge/reports | reports (listing) | Waiting reports from outsiders: one row each, its state and who filed it, linked to the repository's reports. |
ui://forge/usage | usage | The window's figures as rows: runs, cost and tokens, by agent for a repo, or today and last 24 hours with each account's headroom. |
waves also reads app (a repository name, or owner/name): only the waves carrying a change you can read in that app. An unknown, malformed or unreadable app lists none, the same as the page's /<owner>/<name>/waves?app=.
Who controls what (#11956). The host (ChatGPT, Claude) controls the frame around a card: its size limits, border, theme variables, whether it opens a ui:// page at all, and the tool's name and description in its picker (so a generic line such as "Find issues, pulls…" is the tool's description, which is for the model and is held to the size ceiling; the card cannot change it). Forge controls what is inside the frame: structuredContent.card (title, status, rows of label, value, link, depth, actions) and the one page that draws it (CARD_SHELL). A host that does not render ui:// pages shows only the text answer, so the text always carries the full data; the card is a summary of it. Not promised: fonts, per-row colour, truncation by the host, or any widget beyond title, status, rows, links and buttons. Not tested in the live ChatGPT connector from the build sandbox; the wording was checked against the card model only. The page is one document for both hosts (text/html;profile=mcp-app, which ChatGPT's current docs name too): every style is inline in both colour schemes, it names no network address (_meta.ui.csp is empty, prefersBorder false), it reads ChatGPT's window.openai.toolOutput and theme on load as well as the MCP Apps ui/initialize bridge, and tools/list carries openai/outputTemplate beside _meta.ui.resourceUri. A host caches a template by its URI: after a release, reconnect the connector (ChatGPT: refresh it in Settings) to refetch it. test/card-offline.test.ts holds each page to this.
Card vocabulary. title: what this is (Pulls, or #7 the pull's title for one thing, cut at 90 characters on a word with …; the whole title is in the text answer). status: the one line every row shares, counts first (5 open · 2 red · 3 green, healthy · 3 running · 1 queued). row label: the identity (#7 title, owner/name), linked when it has a page. row value: only what differs from the other rows, ·-separated, state words in plain language (check green, no check, approved), never a state the status line already said. actions: buttons that call a tool.
The Runs card (runs) is one row per run, newest first: glyph, kind, the issue or pull and its title, then the state as a word with how long it ran (or has been running), linked to the run page; failed runs lead the status line. The Plan card (map) shows one row per pillar with
its ready, working and waiting counts, and the first five ready issues linked
to their pages; it has no actions. The asks card (ui://forge/asks, drawn by asks) is one row per waiting decision:
what, which repository, how long it has waited, and its one button on the row itself.
Ship is for a green or agent change, Decide for one parked issue and Decline otherwise.
A proposal, a pause and a row of several parked issues have no button.
The buttons call asks_act or asks_decide, which check the same permission as the page's buttons.
Your saved filter applies to it as to the answer; an empty inbox is one line, Nothing waits on you.
The rows link to the pull or issue
they are about (a paused repository's row has none).
The Apps card (apps) links each owner/name row to the app's page on the forge and adds a
linked production row when the app has an http(s) URL; the new_app card links its
Production row the same way. Any other address stays plain text, never a link.
The Releases card (releases, ui://forge/release) is one row per kept release, the last 10, newest first (the status line reads last 10 of N when there are more), its version (else its short sha), how long ago it landed, the pull that landed it (as the releases page names it, linked to that pull; a release no pull landed has the sha or version and no link, as on the page) and one word, proven (the keeper verified it), unproven (preflight failed, the keeper never cut it or is still verifying it) or rolled back (the keeper rolled it back). The keeper's row is looked up by sha, however old. The rows are the items of the tool's text, which carry the same proof and pull; releases with shipped draws the Shipped card (ui://forge/releases).
The Forks card (fork_tree, ui://forge/forks) is one row per repository you may read, nested by a depth field the card pads (not leading spaces, which HTML collapses); the value says how it follows: follows on its own, takes updates, offers updates (the card's own wording for the offers mode) or off; a root that is a fork of a repository you cannot read adds · a hidden fork.
resources/list and resources/read serve one small
sandboxed page, which draws the structuredContent.card model that the
tool result carries, with textContent only. The model is built in
src/web/studio/cards.ts. A card's
buttons ask the host to call a tool (asks_act, say, stop, tell); the
host decides, and every call is checked as any other. A card with a
words action shows one text field: Tell <app> (app card) sends the
words to tell as text with repo and context.said.
Empty words send nothing.
What a card sends and expects (MCP Apps handshake).
1. On load it posts ui/initialize as a request with an id (protocolVersion, appInfo, appCapabilities).
2. On the host's reply (matching id, result object) it applies hostContext, then posts ui/notifications/initialized.
3. hostContext.theme (light/dark) sets the colour scheme; without it the OS scheme decides. styles.variables (only --name keys, string values) become CSS variables, except that --color-background-primary and --color-text-primary are used only as a pair at 4.5:1 or better (else the card's own palette, src/http/mcp/card_palette.ts, stands, so never dark on dark); styles.css.fonts is added as a style. ui/notifications/host-context-changed does the same later, no reload. Links and buttons are 44 px tall; an empty result is one line; more than ten rows show ten and a "Show N more" button.
4. ui/notifications/tool-result draws the card, before or after the reply; a host that sends none of this still shows the card's content.
5. It posts ui/notifications/size-changed (width, height of the body box, so it can shrink) on load, on content or width change, at most once a frame.
6. Only messages from the parent with jsonrpc: "2.0" and the expected shape are read; the rest are ignored.
- The manifest's shape.
GET /api/v1/here?path=/owner/name(or theheretool with the page URL) answers{ here, you, can, mcp, docs }.you.asisanonymous,reader,writer,owneroragent;canis the list of verbs open to that caller, each{ do, http?, mcp?, noMcp?, ssh? }, wheremcpis the tool that does the same in the page button's words (merge a pull→merge,approve a pull→review,change settings→repo_settings,comment→say); a verb with no tool says why innoMcp, never silent. Each line is the answer of the check its route asks, so a verb the caller cannot do is absent, not listed and refused; one that needs an account carriesaccount: true. A private repository answers byte for byte as a missing one (404).test/here-roles.test.tspins a stranger, a signed-in non-member, a writer and an owner, and that every verb names a tool or says why not. The 50 ms budget is held by a bounded statement count; theherephase is read from Server-Timing and bounded at the flake floor (WALL_CLOCK_FLOOR_MS). - Contract.
GET /contract/openapi.jsonis the one URL to name (the old aliases answer the same 200 document and ETag, none redirects, and carryLink: <…/contract/openapi.json>; rel="canonical";serversis the request's origin, bearertokenis the defaultsecurity, open routes saysecurity: []) is OpenAPI 3.1 for the routes the manifest (here) names, plusPOST /mcp, cut to the caller's role: no credential sees onlyx-role: anonymousrows, a member's token or session addsmember, a site admin seesadmintoo; each role gets its own ETag, and any answer but the anonymous one iscache-control: private(vary: authorization, cookie). It also describes planning:GET …/map,POST …/plan,POST …/issues/{number}/dependenciesandDELETE …/issues/{number}/dependencies/{blocker}.test/openapi.test.tsfails when the manifest names a route it lacks. - Taking a tell back.
telltakesundo(an issue number, withrepo): within 60 s of sending, while no run has begun and nobody has commented, the author closes it as dropped. A tell a run has picked up answers that it is running; after the minute, that it is too late. - Where a tell came from.
telltakescontext:page(http/https),app(a slug, shown as anapp:line),run,commit(hex) andsaid(the person's words). Malformed context is refused; the rest is appended to the issue body.tellalso takesfrom: a same-forge path (at most 512 characters, like/alice/notes/pulls/3) that becomes the "Told from" link on the issue; a bad one is refused. It differs fromcontext.page, which is any http(s) address appended as context, not linked as the origin. mapwithview: "space"answers the samespaceOfas the space page andspace.json, for the viewer's own scope (a guest sees what the page shows a guest); a junkviewis an error namingplanandspace; answers past 300 issues or 100 runs an actor are cut and saytruncated: truewithtotal; no tool was added and no ceiling moved.readyandstartable.map(andGET …/map) carries both.readyis every open issue with nothing open in front, held or working ones included, and the page's Ready now section reads it.startableis the numbers fromreadythat a builder may begin: no assignee, not working, held, parked or deferred, and no filter holding them (ready[].held), inready's order.counts.readyequalsstartable.length; readstartable, notready, to count what can start. The page's counts line still counts every ready issue, assigned ones too.GET /api/v1/map(the lanes) carriesstartabletoo but unfiltered: it skips the filter holds, so a hot-file issue is startable there and not in the repository's own map.- Plugins.
plugins/opencodeandplugins/claude-coderegister this server and add aforgecommand (new, tell, status, decide, archive, undo, plan, preview, pulls, runs, log, asked, waves, held, forks). They hold no logic. The Claude Code plugin has two entries:forgesends no Authorization header, so Claude Code signs in through the OAuth flow (the default);forge-tokensendsFORGE_TOKENas a bearer, for scripts. Install it without a clone:claude plugin marketplace add <FORGE_URL>/plugins/claude-code/marketplace.json && claude plugin install forge@forge(the forge serves that manifest, marketplaceforge). From a clone,claude --plugin-dir plugins/claude-codeis the local way.
flow with { kind: "drift" } (#10861) is another: { drifting: [{ repo, number, landings, hours }] },
open pulls over 25 landings or 6 h behind main, furthest first, from
src/flow/alarm_drift.ts. Each is brought up to date by
POST /{repo}/pulls/{number}/update, the button beside it on /boards.
flow with { kind: "drift", repo, pull, action: "update" } does the same as a writer of
the repository: { updating, by }, or the route's refusals in its words (only a writer;
closed, no agent, or tries used). test/mcp-flow-drift-update.test.ts.
hint on a refused REST call (#10950)
Every 401, 403, 404, 409 and 422 JSON answer from /api/v1 is { error, message, hint }. hint is one fixed plain sentence saying what to do next. It never echoes request text, and a 404 not_found reads the same whether the resource is missing or private. test/api-hints.test.ts walks every OpenAPI route and fails when one lacks it.
"Next:" on a refused tool call (#12421)
Every refused tools/call text ends in Next: …, one step: which argument to fix, which sign-in to use, which tool to call first. A tool that has its own Next: keeps it; otherwise withNextStep (src/http/mcp/hints.ts) adds one from the error code and the tool's own schema, so a new tool is covered without editing. It never echoes arguments, tokens or another person's data. test/mcp-refusal-hints.test.ts calls every tool in tools/list (all: true, paged) with empty and bad arguments, as a member and as an admin, and the stranger's 401 and report/start.
A guest token (a person who is neither member nor admin) is listed only report and offer by default; all: true still pages every tool. Its tools/list and initialize name the role; the role is read on every request, so a promotion shows at once. Every other tool still answers by name, and find_tool shows its schema.
usage with { repo, kind: "wallet" } is a repository's wallet (#13590):
{ app, capUsd, spent, left, balance, latest }, the ten latest
spends in the wallet page's words. Dollars come from money and the balance
from balanceWords (src/core/wallet.ts), the same the page and terminal use;
readWalletSummary (src/actions/wallet.ts) gives a writer's gate, and anyone
else the page's own not_found.