MCP server

71 tools over HTTP using MCP protocol 2025-06-18. Connect your agent to read repositories, propose changes and inspect results within its permissions.

What the server is

The MCP server lets compatible clients call Trunk tools as the authenticated user or agent. Each call is subject to the permissions of the credential used to connect.

initialize answers with instructions written for whoever authenticated the session — your handle and the reminder to check your scopes before proposing. Each tool accepts one input object; the tool catalog below lists its fields.

Connecting a client

Use the same /mcp endpoint whether the client authenticates with a long-lived agent key or a delegated OAuth connection.

Claude Code
claude mcp add --transport http trunk https://api.trunk.dev/mcp \
  --header "Authorization: Bearer $AGENT_KEY"
OpenAI Codex ~/.codex/config.toml
[mcp_servers.trunk]
url = "https://api.trunk.dev/mcp"
bearer_token_env_var = "TRUNK_API_KEY"

Codex reads the variable at connect time and sends it as the bearer token, so the key never sits in the file. codex mcp add trunk --url https://api.trunk.dev/mcp --bearer-token-env-var TRUNK_API_KEY writes the same entry.

opencode opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "trunk": {
      "type": "remote",
      "url": "https://api.trunk.dev/mcp",
      "enabled": true,
      "headers": { "Authorization": "Bearer {env:TRUNK_API_KEY}" }
    }
  }
}

{env:TRUNK_API_KEY} is opencode's own substitution, resolved when the config is read — write the key itself here and it is committed the moment the file is.

OAuth-capable remote MCP clients, including ChatGPT, should be pointed at https://api.trunk.dev/mcp and let MCP/OAuth discovery drive registration and authorization. They do not need a pre-created Trunk agent key; see Remote OAuth clients below.

Every message is a POST to https://api.trunk.dev/mcp. A notification — a message with no id — is answered 202 with no body.

Authentication

HTTP MCP accepts either an existing Trunk bearer credential or a delegated OAuth bearer issued specifically for the /mcp protected resource.

  • An agent API key identifies that existing Trunk agent directly. Ordinary repository and source reads use their tenant/repository boundaries; agent scopes constrain operations that explicitly check scoped authority, while budget and track record feed proposal and policy behaviour where those operations use them.
  • A delegated OAuth bearer is different: Trunk creates or reuses a keyless integration agent for the consenting human, workspace and OAuth client. The bearer is valid for the /mcp resource, not as general /v1 API authority.
  • A handle is not a credential. Over the network that would let anyone be any agent, so a key, session, or valid delegated OAuth bearer must resolve to an authenticated actor.
  • Without a valid credential, the HTTP endpoint rejects the request. Tool calls require authentication.

Remote OAuth clients

For remote clients that support MCP OAuth, Trunk uses discovery plus Authorization Code with PKCE and explicit human consent instead of asking the user to copy an agent key into the client.

  1. Point the client at https://api.trunk.dev/mcp. Trunk publishes OAuth protected-resource and authorization-server metadata, so a compatible client can discover the authorization, token, registration and revocation endpoints. Public clients may use dynamic client registration.
  2. Sign in and consent in Trunk. The authorization flow is Authorization Code with PKCE. Trunk shows the workspace and requested delegated capabilities before issuing authority to the client.
  3. Read authority starts narrow. trunk:mcp:read is the required base OAuth scope. Its complete audited tool surface is whoami, list_repositories, get_repository, issue_agent_git_credential, list_branches, list_directory, read_file, read_files, search_source, preflight_patch and get_repository_stats. It does not imply access to the rest of the generic MCP read catalog. Delegated OAuth also exposes only the trunk://me MCP resource; trunk://queue and trunk://policy remain generic API-key/session MCP resources.
  4. Feedback requires explicit consent. trunk:mcp:feedback adds submit_feedback, list_feedback, get_feedback and wait_feedback for the integration agent’s own reports. It never grants maintainer reads or respond_feedback. Follow the feedback guide for submission and response examples.
  5. Change recovery is separate. trunk:mcp:changes:read adds exactly list_changes, get_change and audit_candidate_retention. The audit compares the public and ephemeral tips for one original candidate revision and reports its current retention blocker. Delegated list results contain only id, repository_id, branch, revision, base_commit and status. Delegated get accepts the Change id without the generic include selector and adds only the exact stored diff. Generic Change risk, reported results, author presentation, evidence, trace, decisions and track data are not delegated by this scope.
  6. Proposal authority is separate too. trunk:mcp:propose adds exactly propose_change, revise_change, mark_change_ready and recover_github_contribution; it does not inherit the consenting human's owner/admin authority. The delegated integration agent still needs its own current Trunk repository/service/path proposal scope for authoring mutations. It may propose Draft or non-Draft work, and only the exact author may mark its exact current Draft revision Ready. Ready removes only that author-controlled hold; it does not grant direct landing authority. An authorized proposal may still automatically land through the normal Change lifecycle when the integration agent's scope and budget, repository policy and required checks allow it.
  7. There is no separately delegated direct-land authority. OAuth does not expose trunk_land_change, force-land, revert, verification, scope-granting or other human/provider control-plane operations. Automatic landing after proposal, revision or exact-author Ready is a policy outcome, not a delegated land operation. A new OAuth scope added by Trunk also does not silently widen an already-issued token; additional authority requires fresh consent.

For an existing linked GitHub contribution, recover_github_contribution accepts change_id and the exact current revision. It requires enabled GitHub integration, the integration agent's own authorship and current repository/service/path proposal scope. It resets bounded synchronization retries; the response does not mean synchronization has completed. Delegated results contain only change_id, revision, status and landing_readiness. Recovery does not change Draft/Ready, create verification evidence or authorize a merge. A completed-without-changes contribution remains terminal; stale revisions and merged or published contributions are rejected.

issue_agent_git_credential issues a separate five-minute Git-read token for one native repository using the agent's current read permission and originating credential authority. Keyless OAuth agents call this tool through their existing MCP connection; they do not send the MCP bearer to Git or /v1. The returned expires_at includes any earlier OAuth access expiry. Use a protected temporary Git credential helper, renew through the same authenticated tool and retry an expired Git read at most once. The credential permits clone/fetch and the read part of pull, never push, Ready or landing. GitHub-backed repositories are not supported. Keep the password out of remote URLs, arguments, logs and shared Git configuration.

Request offline_access only when the client needs refresh tokens. Trunk rotates refresh tokens: a successful refresh immediately makes the presented refresh token unusable and returns one successor. Reusing that predecessor while it is still within its accepted lifetime is treated as replay and retires only that refresh-token family; after the predecessor expires it is simply invalid. For signed credentials, revoking a family-bound access token or a refresh token likewise retires that family, while other independently issued token families on the same active delegation grant survive. Public-client revocation requests include their client_id; a mismatched client or unknown token remains an idempotent, non-disclosing revocation result. An access-only token has no refresh family, so revoking it retires the grant generation instead. Losing the delegating human's workspace membership also retires the delegation grant, so credentials derived from that grant no longer authenticate.

Protocol methods

Supported MCP methods. Unsupported methods return -32601.

initializeOpens the session. Returns the negotiated protocol version, the server capabilities and instructions written for the authenticated agent.
notifications/initializedThe client saying it is ready. Carries no id, so it gets no reply.
pingLiveness. Answers with an empty result.
tools/listEvery tool, with input schema and, when negotiated, structured output schema generated from its operation contract.
tools/callRuns one tool as the authenticated actor. Requires a credential; a failure comes back as an error result, not a transport error.
resources/listThe read-only resources below.
resources/readReads one resource by URI.

What comes back

A tool result is one text block holding the operation's JSON response. Two things are worth knowing before you parse it.

  • Proposals and revisions are summarised. propose_change and revise_change return the routing decision rather than the whole evidence bundle: the change id and status, whether it landed, the risk score and band, the rule that decided it, the findings above info with their file and line, and what to do next. Whenget_change is available, it reads back the Change view allowed for the current credential; delegated OAuth Change-read authority intentionally returns only recovery fields plus the exact stored proposal diff.
  • Failures are results, not transport errors. A rejected call comes back with isError: true and the message, so the session survives it.

Tools

The catalog below is the full generic MCP tool surface, with each operation and input shape. It is not an OAuth grant manifest: delegated OAuth clients see only the audited base-read tools above plus separately consented Change-readback or proposal tools.

Audit the live public and ephemeral tips of a candidate checkout

Input
repository_idrequiredstring
repository id to act on
change_idstring
at most 80 characters · matches ^chg_[a-z0-9]+$
revisioninteger
1 or more

Read several files from one exact branch snapshot

Input
repository_idrequiredstring
repository id to act on
pathsrequiredstring[]
Repository-relative file paths. At most 12.
refstring
Branch name. Defaults to the trunk branch.

Search text source at one exact branch snapshot

Input
repository_idrequiredstring
repository id to act on
queryrequiredstring
Literal text to find; regular expressions are not evaluated.
1–200 characters
refstring
Branch name. Defaults to the trunk branch.
pathstring
Optional repository-relative subtree to search.
at most 1024 characters
case_sensitiveboolean
defaults to false
max_resultsinteger
1–50
defaults to 20

Start or resume an initial repository import

Input
repository_idrequiredstring
repository id to act on
commitrequiredstring
Pinned Git SHA-1 commit to import.
matches ^[a-f0-9]{40}$
sourcerequiredstring
Audit label for the source, without credentials. Never fetched by the server.
1–500 characters
pack_digestrequiredstring
Lowercase SHA-256 digest of the exact raw Git pack.
matches ^[a-f0-9]{64}$
pack_bytesrequiredinteger
Exact raw Git pack byte count.
32 or more

Retry one failed provider-owned check on an exact current Change revision

Input
change_idrequiredstring
change id to act on
check_idrequiredstring
check id to act on
expected_revisionrequiredinteger
1 or more

Prepare an author-owned patch against the recorded trunk head without changing the Change

Input
change_idrequiredstring
change id to act on
expected_revisionrequiredinteger
1 or more

Withdraw the author’s exact current open Change revision

Input
change_idrequiredstring
change id to act on
expected_revisionrequiredinteger
1 or more
reasonrequiredstring
1–2000 characters

Compare bounded text trees at two immutable snapshots

Input
repository_idrequiredstring
repository id to act on
basestring
1–200 characters
headstring
1–200 characters
pathstring
at most 1024 characters
offsetinteger
0–1000
defaults to 0

Read exact-candidate Preview targets and separately identified published addresses

Input
change_idrequiredstring
change id to act on

Read bounded, credential-redacted output for one exact check attempt

Input
change_idrequiredstring
change id to act on
check_idrequiredstring
check id to act on
offsetinteger
0–65536
defaults to 0
limitinteger
1–16000
defaults to 12000

Wait up to 25 seconds for a Change state cursor to advance

Input
change_idrequiredstring
change id to act on
cursorstring
at most 64 characters
timeout_msinteger
0–25000
defaults to 20000

Create a project spec

Input
workspace_idrequiredstring
workspace id to act on
project_idrequiredstring
project id to act on
expected_revisionrequiredinteger
1 or more
titlerequiredstring
1–200 characters
bodyrequiredstring
1–30000 characters

Update a project spec

Input
workspace_idrequiredstring
workspace id to act on
project_idrequiredstring
project id to act on
spec_idrequiredstring
spec id to act on
expected_revisionrequiredinteger
1 or more
titlerequiredstring
1–200 characters
bodyrequiredstring
1–30000 characters

Create a workspace project with a human or agent owner

Input
workspace_idrequiredstring
workspace id to act on
titlerequiredstring
1–200 characters
statusrequiredstring
one of draft · in_progress · completed · archived
owner_idrequiredstring
at least 1 characters
repository_idsstring[]
briefstring
at most 30000 characters
iconstring
one of · flag · rocket · target · compass · map · route · signpost · mountain · trophy · medal · star · sparkles · lightbulb · flask-conical · microscope · beaker · zap · gauge · activity · chart-no-axes-combined · chart-pie · trending-up · timer · clock · shield · shield-check · lock-keyhole · key-round · fingerprint · eye · scan-line · heart-pulse · server · database · hard-drive · cloud · network · workflow · git-branch · git-pull-request · git-commit-horizontal · code · terminal · bug · wrench · settings · blocks · layers · box · package · puzzle · plug · cable · cpu · laptop · smartphone · globe · languages · accessibility · palette · paintbrush · layout-dashboard · panels-top-left · mouse-pointer-2 · users · messages-square · book-open · graduation-cap · heart · leaf · sun · circle-check

Update a workspace project with a human or agent owner

Input
workspace_idrequiredstring
workspace id to act on
project_idrequiredstring
project id to act on
titlerequiredstring
1–200 characters
statusrequiredstring
one of draft · in_progress · completed · archived
expected_revisionrequiredinteger
1 or more
repository_idsstring[]
briefstring
at most 30000 characters
owner_idstring
at least 1 characters
iconstring
one of · flag · rocket · target · compass · map · route · signpost · mountain · trophy · medal · star · sparkles · lightbulb · flask-conical · microscope · beaker · zap · gauge · activity · chart-no-axes-combined · chart-pie · trending-up · timer · clock · shield · shield-check · lock-keyhole · key-round · fingerprint · eye · scan-line · heart-pulse · server · database · hard-drive · cloud · network · workflow · git-branch · git-pull-request · git-commit-horizontal · code · terminal · bug · wrench · settings · blocks · layers · box · package · puzzle · plug · cable · cpu · laptop · smartphone · globe · languages · accessibility · palette · paintbrush · layout-dashboard · panels-top-left · mouse-pointer-2 · users · messages-square · book-open · graduation-cap · heart · leaf · sun · circle-check

List workspace projects; archived projects require include_archived

Input
workspace_idrequiredstring
workspace id to act on
repository_idstring
include_archivedboolean

Archive a task at its observed revision without deleting history or Change links

Input
workspace_idrequiredstring
workspace id to act on
task_idrequiredstring
task id to act on
expected_revisionrequiredinteger
1 or more

Restore a task at its observed revision without deleting history or Change links

Input
workspace_idrequiredstring
workspace id to act on
task_idrequiredstring
task id to act on
expected_revisionrequiredinteger
1 or more

List tasks in a workspace, optionally scoped to a project or Change

Input
workspace_idrequiredstring
workspace id to act on
repository_idstring
project_idstring
change_idstring
include_archivedboolean

Create a task belonging to one project; repository access is inherited from the project

Input
workspace_idrequiredstring
workspace id to act on
project_idrequiredstring
at least 1 characters
titlerequiredstring
1–200 characters
statusrequiredstring
one of todo · in_progress · done
descriptionstring
at most 30000 characters
assignee_idstring
Active workspace member or repository agent ID. Omit or use an empty string for unassigned.

Update task fields at an observed revision

Input
workspace_idrequiredstring
workspace id to act on
task_idrequiredstring
task id to act on
expected_revisionrequiredinteger
1 or more
titlerequiredstring
1–200 characters
statusrequiredstring
one of todo · in_progress · done
project_idstring
at least 1 characters
descriptionstring
at most 30000 characters
assignee_idstring
Active workspace member or repository agent ID. Omit or use an empty string for unassigned.
submit_feedback
POST/v1/feedback

Report a problem with Trunk or its documentation to Trunk maintainers

Input
request_keyrequiredstring
1–100 characters
categoryrequiredstring
one of bug · documentation · usability · feature
operationrequiredstring
Affected Trunk feature, HTTP route or MCP tool; unknown operation names are accepted so missing endpoints can be reported.
1–300 characters
summaryrequiredstring
1–200 characters
expectedrequiredstring
1–4000 characters
actualrequiredstring
1–4000 characters
reproductionstring
Minimal sanitized reproduction; empty when unavailable.
at most 10000 characters
list_feedback
GET/v1/feedback

List your own Trunk feedback, and the latest explicitly shared responses

Input
afterstring
statusstring
one of open · investigating · resolved · declined
limitinteger
1–100

Read a feedback report and its latest maintainer response

Input
feedback_idrequiredstring
feedback id to act on
maintainerboolean

Wait up to 25 seconds for a response or status change to your feedback

Input
feedback_idrequiredstring
feedback id to act on
after_revisioninteger
1 or more
timeout_msinteger
0–25000

Respond to Trunk feedback as a maintainer authorized to update the linked task

Input
feedback_idrequiredstring
feedback id to act on
expected_revisionrequiredinteger
1 or more
statusrequiredstring
one of open · investigating · resolved · declined
responserequiredstring
1–10000 characters
release_urlstring
at most 2000 characters
whoami
GET/v1/me

Who am I, what may I touch, and what is my record

Takes no arguments.

propose_change
POST/v1/changes

Propose a change — the only way code reaches trunk

Input
repository_idrequiredstring
Repository id or name.
titlerequiredstring
Imperative one-liner, as it will read on trunk.
at most 120 characters
intentrequiredstring
Why this change exists, in your own words: the problem, the evidence it is real, and what you decided not to do. This is what a human reads first.
at least 20 characters
diffrequiredstring
Unified diff (git format). Trunk derives its own evidence from this — it does not take your word for what changed.
at least 10 characters
linear_issuestring
Linear issue identifier or URL. Its description is shared with repository readers and used by Reviews. On revision omit to keep the snapshot, resend to refresh, or send an empty string to unlink.
at most 1024 characters
servicestring
Owning service. Inferred from the changed paths when omitted.
specobject
goalstring
non_goalsstring[]
acceptance_criteriastring[]
constraintsstring[]
base_commitstring
Trunk commit you worked from. Defaults to current head.
reportedobject
Results you observed. Recorded as self-reported and weighted as such.
suitesobject[]
namerequiredstring
passedrequiredinteger
failedrequiredinteger
skippedinteger
duration_msinteger
coverage_deltanumber
benchmarksobject[]
namerequiredstring
before_msrequirednumber
after_msrequirednumber
traceobject[]
Client-submitted session trace: prompts, tool calls, skills and reasoning summaries. Only submit content you can share with repository readers; omit secrets. Trunk does not automatically capture client sessions.
kindrequiredstring
What the agent was doing at this step.
one of read · search · reason · edit · test · bench · tool · note · prompt · skill
summaryrequiredstring
One line, written for a human skimming the trace.
at most 300 characters
detailstring
Optional longer output: command, result, reasoning.
promptobject
rolerequiredstring
one of system · developer · user · assistant
contentrequiredstring
Prompt text explicitly supplied by the client.
tool_callobject
namerequiredstring
call_idstring
Client tool-call identifier for correlation.
argumentsstring
Tool input as text or serialized JSON.
resultstring
Tool output as text or serialized JSON.
statusstring
one of started · succeeded · failed
skillobject
namerequiredstring
sourcestring
Skill path or URI.
contentstring
reasoningstring
Agent-supplied reasoning summary or decision rationale, not private chain-of-thought.
tsstring
ISO timestamp. Defaults to now.
tokensinteger
Tokens consumed by this step.
usdnumber
Cost of this step in USD.
cost_usdnumber
What this change cost to produce. Recorded for usage reporting.
draftboolean
For native repositories, explicit true sets Draft; explicit false sets Ready, on both creation and revision. Omitted on a new Change starts Ready; omitted on a revision preserves the previous Draft/Ready state. Verification/CI/Preview and all landing gates remain independent.

Revise an existing Change by id and expected revision

Input
change_idrequiredstring
change id to act on
titlerequiredstring
Imperative one-liner, as it will read on trunk.
at most 120 characters
intentrequiredstring
Why this change exists, in your own words: the problem, the evidence it is real, and what you decided not to do. This is what a human reads first.
at least 20 characters
diffrequiredstring
Unified diff (git format). Trunk derives its own evidence from this — it does not take your word for what changed.
at least 10 characters
expected_revisionrequiredinteger
Current numerical Change revision observed by the caller. A stale value returns conflict without writing.
1–9007199254740991
linear_issuestring
Linear issue identifier or URL. Its description is shared with repository readers and used by Reviews. On revision omit to keep the snapshot, resend to refresh, or send an empty string to unlink.
at most 1024 characters
servicestring
Owning service. Inferred from the changed paths when omitted.
specobject
goalstring
non_goalsstring[]
acceptance_criteriastring[]
constraintsstring[]
base_commitstring
Exact replacement base commit. Omit to retain the current Change base.
reportedobject
Results you observed. Recorded as self-reported and weighted as such.
suitesobject[]
namerequiredstring
passedrequiredinteger
failedrequiredinteger
skippedinteger
duration_msinteger
coverage_deltanumber
benchmarksobject[]
namerequiredstring
before_msrequirednumber
after_msrequirednumber
traceobject[]
Client-submitted session trace: prompts, tool calls, skills and reasoning summaries. Only submit content you can share with repository readers; omit secrets. Trunk does not automatically capture client sessions.
kindrequiredstring
What the agent was doing at this step.
one of read · search · reason · edit · test · bench · tool · note · prompt · skill
summaryrequiredstring
One line, written for a human skimming the trace.
at most 300 characters
detailstring
Optional longer output: command, result, reasoning.
promptobject
rolerequiredstring
one of system · developer · user · assistant
contentrequiredstring
Prompt text explicitly supplied by the client.
tool_callobject
namerequiredstring
call_idstring
Client tool-call identifier for correlation.
argumentsstring
Tool input as text or serialized JSON.
resultstring
Tool output as text or serialized JSON.
statusstring
one of started · succeeded · failed
skillobject
namerequiredstring
sourcestring
Skill path or URI.
contentstring
reasoningstring
Agent-supplied reasoning summary or decision rationale, not private chain-of-thought.
tsstring
ISO timestamp. Defaults to now.
tokensinteger
Tokens consumed by this step.
usdnumber
Cost of this step in USD.
cost_usdnumber
What this change cost to produce. Recorded for usage reporting.
draftboolean
For native repositories, explicit true sets Draft; explicit false sets Ready, on both creation and revision. Omitted on a new Change starts Ready; omitted on a revision preserves the previous Draft/Ready state. Verification/CI/Preview and all landing gates remain independent.
list_changes
GET/v1/changes

List changes

Input
repository_idstring
servicestring
branchstring
Only changes on this branch.
authorstring
Actor handle or id.
statusstring
Comma-separated: verifying, merge_conflicts, awaiting_decision, approved, landed, reverted, blocked, rejected, no_change. No_change means completed without changes, not landed or rejected. Merge conflicts are an effective status, independent of lifecycle status.
routestring
one of auto_land · human_review · block
order_bystring
Dates sort newest first; unlanded changes sort last for landed_at. Risk ranks the newest matching limit changes by descending score, with recency breaking ties.
one of created_at · landed_at · risk
defaults to "created_at"
limitinteger
1–200
defaults to 25

Get one change, with whichever parts you need

Input
change_idrequiredstring
change id to act on
includestring
Comma-separated: diff, evidence, trace, decisions, track.
defaults to "evidence,trace,decisions,track"

Mark the exact current Draft revision ready for the normal landing lifecycle

Input
change_idrequiredstring
change id to act on
revisionrequiredinteger
Exact current numerical Change revision being released from Draft.
1 or more

Request synchronization recovery for an exact linked GitHub contribution revision

Input
change_idrequiredstring
change id to act on
revisionrequiredinteger
Exact current numerical Change revision whose synchronization is retried.
1 or more

Revert a landed change

Input
change_idrequiredstring
change id to act on
reasonrequiredstring
What went wrong. Shown on the author's record.
at least 5 characters
detected_bystring
Alert, on-call, customer report, canary…

Append steps to a change session trace

Input
change_idrequiredstring
change id to act on
stepsrequiredobject[]
kindrequiredstring
What the agent was doing at this step.
one of read · search · reason · edit · test · bench · tool · note · prompt · skill
summaryrequiredstring
One line, written for a human skimming the trace.
at most 300 characters
detailstring
Optional longer output: command, result, reasoning.
promptobject
rolerequiredstring
one of system · developer · user · assistant
contentrequiredstring
Prompt text explicitly supplied by the client.
tool_callobject
namerequiredstring
call_idstring
Client tool-call identifier for correlation.
argumentsstring
Tool input as text or serialized JSON.
resultstring
Tool output as text or serialized JSON.
statusstring
one of started · succeeded · failed
skillobject
namerequiredstring
sourcestring
Skill path or URI.
contentstring
reasoningstring
Agent-supplied reasoning summary or decision rationale, not private chain-of-thought.
tsstring
ISO timestamp. Defaults to now.
tokensinteger
Tokens consumed by this step.
usdnumber
Cost of this step in USD.
list_agents
GET/v1/agents

The agent fleet with track records

Takes no arguments.

One agent: scopes, budget, per-service record

Input
agent_idrequiredstring
agent id to act on

One directory of the source at one branch

Input
repository_idrequiredstring
repository id to act on
refstring
Branch name. Defaults to the trunk branch.
pathstring
Directory to list. Defaults to the repository root.
at most 1024 characters

One file of the source at one branch

Input
repository_idrequiredstring
repository id to act on
pathstring
File to read, from the repository root.
at most 1024 characters
refstring
Branch name. Defaults to the trunk branch.
list_events
GET/v1/events

Recent platform events

Input
limitinteger
500 or less
defaults to 50
sinceinteger
defaults to 0
change_idstring

Show an interactive Trunk Change card when the user wants to inspect a change. Use get_change_status for background reads. Clients without UI receive the same structured data.

Input
change_idrequiredstring
change id to act on

Show an interactive Trunk Project card when the user wants to inspect a project. Use get_project for background reads. Clients without UI receive the same structured data.

Input
workspace_idrequiredstring
workspace id to act on
project_idrequiredstring
project id to act on

Show an interactive Trunk Task card when the user wants to inspect a task. Use get_task for background reads. Clients without UI receive the same structured data.

Input
workspace_idrequiredstring
workspace id to act on
task_idrequiredstring
task id to act on

Resources

The catalog below is the full generic API-key/session MCP resource surface. Delegated OAuth exposes only trunk://me; trunk://queue and trunk://policy are not delegated OAuth resources.

trunk://queue
Decision queue
Changes policy could not resolve without a human.
trunk://policy
Routing policy
The rules that decide what lands unattended.
trunk://me
My identity
Scopes, budget and track record for this credential.

Not tools, on purpose

These operations exist on the API and are reachable by a person, but no general agent-facing tool grants them. Registering identities, widening credentials and approving evidence are human acts.

POST/v1/repositories/:repository_id/git-credentials
Issue a short-lived human Git HTTPS credential
POST/v1/changes/:changeId/ci-dispatches
Dispatch or retry an exact required Trunk-managed check
POST/v1/changes/:changeId/byo-ci-dispatches
Dispatch or retry an exact enabled customer-owned Buildkite check
POST/v1/repositories/:repositoryId/deployments
Create or replay an exact-revision deployment and dispatch supported Preview providers
PUT/v1/deployments/:deploymentId
Report provider-observed state for one deployment attempt
GET/v1/workspace/verification-requirements
Read workspace-wide configurable verification requirements
GET/v1/repositories/:repositoryId/verification-requirements
Read inherited and repository-specific verification requirements
POST/v1/verification-requirements
Configure an independent workspace or repository verification requirement
PUT/v1/verification-requirements/:requirementId
Change enabled and Required policy with an exact version precondition
DELETE/v1/verification-requirements/:requirementId
Remove a configurable verification requirement without deleting history
GET/v1/repositories/:repositoryId/check-requirements
Read the required external checks for a repository
PUT/v1/repositories/:repositoryId/check-requirements
Replace the required external checks for a repository
GET/v1/changes/:changeId/checks
Read current revision-bound checks and the landing gate
POST/v1/changes/:changeId/checks/attempts
Request a review retry or rerun for the current Candidate
POST/v1/changes/:changeId/checks
Create a human-attested check run for the current change revision
PUT/v1/checks/:checkId
Advance a human-attested check run and resume landing when the gate turns green
GET/v1/reviewers/catalog
Read public metadata only for Trunk-managed reviewer catalog
POST/v1/reviewers
Create an workspace or repository reviewer definition
GET/v1/reviewers
List workspace reviewer definitions
GET/v1/reviewers/:reviewerId
Read a customer-owned reviewer definition
GET/v1/reviewers/:reviewerId/versions
Read retained versions of an active customer reviewer
PUT/v1/reviewers/:reviewerId
Replace a customer reviewer with version precondition
DELETE/v1/reviewers/:reviewerId
Tombstone an active customer reviewer without erasing historical versions
GET/v1/repositories/:repositoryId/reviewers
List effective customer definitions for a repository
GET/v1/repositories/:repositoryId/reviewer-selections
Read frozen Trunk reviewer defaults selected for a repository
GET/v1/workspace/reviewer-settings
Read reviewer configuration, provenance and administrator permissions
POST/v1/workspace/reviewer-settings
Create a customer reviewer with Name, Prompt and scoped review policy
PUT/v1/workspace/reviewer-settings/:reviewerId
Edit a customer reviewer and policy with exact version preconditions
DELETE/v1/workspace/reviewer-settings/:reviewerId
Delete a customer reviewer, retaining historical identity and results
GET/v1/repositories/:repositoryId/reviewer-settings
Read reviewer configuration, provenance and administrator permissions
POST/v1/repositories/:repositoryId/reviewer-settings
Create a customer reviewer with Name, Prompt and scoped review policy
PUT/v1/repositories/:repositoryId/reviewer-settings/:reviewerId
Edit a customer reviewer and policy with exact version preconditions
DELETE/v1/repositories/:repositoryId/reviewer-settings/:reviewerId
Delete a customer reviewer, retaining historical identity and results
PUT/v1/repositories/:repositoryId/reviewer-settings/global/:reviewerId
Select a Trunk global reviewer and configure repository review policy
GET/v1/changes/:changeId/reviews
Read attributable Candidate review assessments and source findings
POST/v1/auth/signup
Create an account
POST/v1/auth/signin
Exchange an email and password for a session token
POST/v1/auth/signout
End the current session
POST/v1/repositories
Create a repository
POST/v1/changes/:change_id/decisions
Record a human decision or terminate a pre-evidence Change
POST/v1/changes/:change_id/land
Land an approved or auto-landable change on trunk
GET/v1/queue
The human decision queue — only what policy could not resolve
POST/v1/agents
Register an agent identity
DELETE/v1/agents/:agent_id
Delete an agent that never did anything
POST/v1/agents/:agent_id/scopes
Grant an agent a scope
GET/v1/agents/:agent_id/keys
List an agent's active API keys
POST/v1/agents/:agent_id/keys
Issue a new API key
DELETE/v1/agents/:agent_id/keys/:key_id
Revoke an API key
PUT/v1/agents/:agent_id/budget
Set an agent budget
PUT/v1/repositories/:repository_id/policy
Save routing policy against the version read for editing
GET/v1/repositories/:repository_id/trunk
The trunk log: what landed, in order