Every MCP call is a decision

How a viff task uses someone else’s MCP server, each call decided before it is made: the mcp system.

Written in November 2026, and true as of then; the published docs (systems) are kept true as the tree moves.

A viff task works in a sandbox. It can use the tools its runner implements (git, github, slack, linear-issue, viff) and the programs the runner’s image carries. It still can’t call a tool that someone else’s server offers, such as an MCP server.

This article covers that. The answer is one more system in viff’s systems model: a spawn’s environment says which servers and tools a task gets, the runner’s ceiling bounds it, and the autonomy decides each call.

This is one of three articles on what a task lacks, and how the runner gives it:


The rule it follows

A task never holds a credential, and never chooses which credential goes where.

The runner acts for the task. Before each act it checks three things again, from its own copy of each: the environment, which whoever spawned the task wrote, and which says what this task is given; the autonomy, also the spawner’s, which says allow, deny or ask a person for each act; and the ceiling, which the runner’s operator wrote, and which is the most any task of this doer may be given. The first article has the rule in full, and the secret store the runner reads its credentials from.


A server the operator names

The runner is the MCP client. The operator names remote servers and how the runner authenticates to each one; the credential comes from the store. A spawn names the server and the tools it may use:

tony
# the runner's configuration
secrets: {dir: /secrets}
mcp:
  servers:
    linear: {url: "https://mcp.example.com/mcp", auth: {secret: linear-mcp}, timeout: 60s}
    search: {url: "https://search.example.com/mcp", auth: {secret: search-key, header: X-Api-Key}}
agents:
  claude:
    systems:
      mcp: {ceiling: [{server: linear, call: {tool: !glob "get_*"}}]}

# a spawn's environment
environment:
  systems:
    mcp: [{server: linear, call: {tool: !or [get_issue, list_issues]}}]
sequenceDiagram
  autonumber
  participant D as doer (Claude, Codex, viff agent, script)
  participant T as task process (sandbox)
  participant R as runner
  participant S as secret store
  participant M as MCP server (linear)
  Note over T,R: when the task is built
  T->>R: mcp.list {server: linear}
  R->>S: read linear-mcp
  R->>M: tools/list, with the credential
  M-->>R: tools
  R-->>T: the tools the environment and the ceiling admit
  T-->>D: mcp-linear-get_issue, mcp-linear-list_issues
  Note over D,M: each call
  D->>T: mcp-linear-get_issue {id: ENG-12}
  T->>R: mcp.call {server: linear, tool: get_issue}, the arguments
  R->>R: environment, autonomy, ceiling
  R->>S: read linear-mcp, now
  R->>M: tools/call, no redirect followed
  M-->>R: result
  R-->>D: the result's text, marked as the server's data
  • When the task is built, the runner lists each server’s tools and offers each one as mcp-<server>-<tool>, such as mcp-linear-get_issue. Each use is one step, mcp.call, with server and tool.
  • Every kind of doer gets them through the same path: Claude through the runner’s own MCP server (Claude’s own MCP configuration stays shut, under --strict-mcp-config), Codex as dynamic tools, the viff agent, and a script through viff-call-tool.
  • Each call is decided again by the runner and performed apart, so a slow server doesn’t hold up a push. The runner reads the credential at each request and follows no redirect, so a server can’t choose where the credential goes.
  • What is sent is the step. The call’s arguments are read into the step as structure, and what goes to the server is that structure written back as JSON: nothing reaches the server that the step didn’t say, and a null argument stays a null (Linear reads assignee: null as unassign and no assignee as unchanged, so the two are two different steps). A shape or a row matches the arguments open, as tony matches an object: {team: ENG} admits a call with any other argument beside it. A ceiling that has to pin an argument names it.
  • One session per task and server, opened at the first call and closed with the task. A server that ended an idle session (mcp.signadot.com does, after 30 minutes) gets a new one, and the call is sent again only when the server’s answer was to that call’s own request; otherwise the task hears that whether the call was performed isn’t known. A call is never sent twice.
  • What a server says is the server’s. A result the server marks as an error is what the model reads, not an error of the runner’s. A tool the server hasn’t got, arguments its schema refuses, or a tool that asks the client for input (the runner gives none) come back as a refusal in the server’s words, which the task re-plans on. Results, descriptions and instructions are cut at bounds, and say so.

What a runner’s description shows. With Linear’s MCP server named, a doer’s description carries the hand-built linear-issue system and mcp side by side, over one and the same credential (viff-linear’s key, the store’s linear):

tony
    linear-issue:
      ceiling:
        close:
          issue: !glob ENG-*
        comment:
          issue: !glob ENG-*
        create:
          team: ENG
    mcp:
      builds:
        server: linear
        call: {}
      ceiling:
        server: linear

That suggests mcp could replace linear-issue: the server offers some ninety tools where the system offers three verbs, a ceiling names tools and pins arguments ({tool: save_issue, arguments: {team: ENG}}) as the system’s shapes do, the approver is asked about the arguments either way, and Linear keeps its own read-only line at /mcp/readonly, a bound the system never had. What the system has that the server’s tools don’t is viff’s own vocabulary: create, comment and close with fields viff named and documented, stable across Linear’s releases, and cheaper to read in a question (linear-issue.create team=ENG against mcp.call server=linear tool=save_issue arguments={…}). The same question stands for slack once a Slack MCP server is named. Worth deciding once a few tasks have run on both; not decided here.

Limitations, as built so far:

Limitation Why What lifts it
Remote servers only (streamable HTTP) the runner would start a stdio server outside any sandbox, as the runner’s user, next to its own tokens secret-exec’s sandbox (below)
The approver is asked about the arguments, but not shown them yet the arguments are now a field of the step (arguments), so rows match on them and an answer performs only the call it was given about (275art3x); a question shows only the tool and the verb today the question showing a step’s fields (q3k89kva)
Very long arguments are refused the step is carried whole, in the task’s events, its snapshot and a question’s record, so arguments past 64 KiB are refused a digest of long values in the step, open
Responses are bounded the runner reads 8 MiB of a response at most, and passes 256 KiB of a result on; a response past the bound fails the call
A cut response is a failed call the current protocol (2026-07-28) dropped resumption by event id; the call fails rather than being sent again, and whether the server did it isn’t known. Only a server still on the older protocol resumes
No sampling, no elicitation, no roots the client declares no capability; a server that asks for input gets a refusal, and the call fails in the server’s words later, if a server needs it
One identity per runner every spawner’s call uses the runner’s secret credentials a gate mints for the task (hfh7km3t)
No interactive OAuth the secret is a token the operator already has later
Tools only no resources, no prompts later
Some schemas are left out viff.Tool carries properties and required names; a $ref, or oneOf at the top level, doesn’t fit, so the tool is left out and logged a whole schema on viff.Tool
The tool list is fixed per task the list is read when the task is built the next task sees changes
A server’s read and write hints aren’t trusted it’s the server’s own claim the ceiling names tools
What a server says is data descriptions and results go into the model’s context; they’re marked as data and truncated
A call in flight when the task dies is unknown the runner gives it up; whether the server performed it isn’t known

stdio servers, through secret-exec’s sandbox

Most MCP servers people actually run are stdio programs: npx @scope/some-mcp-server, a Python package, a binary that reads a token from its environment and speaks JSON-RPC on stdin and stdout. The plan leaves them out because the runner would start one outside any sandbox: as the runner’s user, on the runner’s filesystem, next to the runner’s own tokens.

secret-exec already built the missing piece: a command in a sandbox of its own, over the task’s workspace, under the task’s network, with one secret in its environment and the program held to one the runner keeps. A stdio server is exactly that kind of command — and since a command with a secret may start from the install root (pkg), the program it starts from no longer has to be in the image where the server is a self-contained program its distribution packages. A runtime is not that: nodejs, npm and python3 carry install scripts and trees of their own, which pkg refuses, so npx and uvx still come with the image. It can be reached in two ways:

The runner is the client (the mcp system) The task is the client (secret-exec)
How the operator names a stdio server (command, plus secret and as); the runner starts it in the secret-exec sandbox and speaks MCP to it over its stdio the spawn admits the server’s command in a secret block; the task starts it with secret-exec and speaks MCP over the run’s I/O socket
What’s decided each call: mcp.call with the server, the tool and the arguments the session: one secret.exec that starts the server, after which every call is the task’s
Who holds the secret the server process, in its sandbox; neither the task nor the runner’s own process the server process, in its sandbox; not the task
What it needs a command kind of server in mcp’s configuration, using the Confiner input on the I/O socket — built since (hnp7jgfk): stdin: true on the call, admitted shape by shape, the task writing the command’s stdin and its half-close the command’s EOF
When to use it the server’s tools should be gated one by one, like any performed system the server is trusted as a whole, like an admitted command, and the shapes are the bound

The first is the one still to build: it keeps per-call decisions, and it lifts the “remote only” limitation without a second kind of tool. The second is available now — the socket accepts input (hnp7jgfk): the call says stdin: true, a shape of the environment and the ceiling must admit it, and the step says which kind of run it is — and it is honest about what it is. Approving the command approves everything the server then does. That’s the same promise secret-exec makes for any command, and no more.

flowchart LR
  subgraph tb["task sandbox"]
    T["agent / script"]
  end
  subgraph rn["runner"]
    G{"mcp.call<br/>server, tool, arguments"}
  end
  subgraph cs["the server's own sandbox<br/>(secret-exec's Confiner)"]
    M["stdio MCP server<br/>TOKEN in its environment"]
  end
  T -- "mcp-acme-create_issue {...}" --> G
  G -- "JSON-RPC on stdin" --> M
  M -- "result on stdout" --> G
  G -- "result, marked as the server's data" --> T
Edit on GitHub · viff is a shared runtime for a team's software delivery work.