The idea: one connection, many tools
An MCP proxy gives the agent one dispatch interface in front of several servers. It can reduce the number of tool definitions shown to the model. It does not grant permissions that the downstream servers do not have.
Before you start: make each server work independently. Then combine two:
mini-a usetools=true mcpproxy=true \
mcp="[(type: ojob, options: (job: mcps/mcp-time.yaml)), (type: ojob, options: (job: mcps/mcp-math.yaml))]" \
goal="Use tools to report the UTC time and calculate 12 times 7."
A successful result includes both observations. If a tool is missing, inspect the configured allow/deny lists and server catalog before increasing retry limits. Use programmatic calls when generated code needs several tool calls in a loop; the bridge has separate limits and must be explicitly enabled.
Exact options are in Tools and permissions. The MCP catalog covers individual servers and deployment.
MCP Advanced
mini-a’s MCP (Model Context Protocol) support goes well beyond basic server connections. These advanced options give you fine-grained control over how MCP servers are loaded, aggregated, and accessed.
Proxy Mode
When connecting to multiple MCP servers, their tool schemas can add prompt overhead. Enable proxy mode to present one dispatch interface to the model:
mini-a mcpproxy=true mcp="[(cmd: 'ojob mcps/mcp-time.yaml'), (cmd: 'ojob mcps/mcp-web.yaml'), (cmd: 'ojob mcps/mcp-db.yaml jdbc=jdbc:h2:./data user=sa pass=sa')]"
The proxy consolidates tool listings from all servers into a single interface. The downstream connections remain active; the reduction is in the tool definitions presented to the model.
Custom MCP Servers
Point mini-a to custom STDIO-based MCP servers by providing the full path to the server executable:
mini-a mcp="(cmd: '/path/to/my-custom-mcp-server')"
You can also point to multiple custom servers by passing an array of MCP descriptors.
Remote HTTP MCPs
Connect to MCP servers running on remote machines over HTTP or SSE:
mini-a mcp="(type: remote, url: 'http://remote-server:3000/mcp')"
This is useful for centralized tool servers shared across teams, or for connecting to MCP servers running in cloud environments. Multiple remote endpoints can be combined:
mini-a mcp="[(type: remote, url: 'http://tools1:3000/mcp'), (type: remote, url: 'http://tools2:3001/mcp')]"
Dynamic MCPs
Enable dynamic tool selection to narrow the tools exposed from configured MCP connections for the current task:
mini-a usetools=true mcpdynamic=true
The configured connections still initialize and list their tools. Selection reduces the catalog presented to the model; it does not discover arbitrary new servers or defer all networking. Valid empty selections and dispatch fallbacks follow the rules below.
Session preparation and lazy loading
Console and web sessions now prepare resources in the background while you type your first prompt (sessionprewarm=true, the default). Read-only wikis, mounts and skill wikis are opened ahead of time, and up to two configured external stdio/HTTP MCP transports negotiate their connection early. On submission, Mini-A checks that configuration, file-access boundaries and published artifacts are unchanged before adopting the prepared resources. Tool catalogs are always fetched at submission.
Some setup still happens in the foreground: writable wikis, local type: ojob and dummy MCPs, plugin-discovered connections, and interactive OAuth flows.
# Keep all setup at submission time
mini-a sessionprewarm=false
./mini-a-web.sh onport=8888 sessionprewarm=false
mcplazy=true is kept for compatibility only. Direct MCP connections still initialize and list tools before the first model request, so use session preparation to move connection work ahead of submission.
For embedded agents, call agent.prepareSession(options) before the user submits, then agent.start(runOptions) on the same agent. agent.getStartupTimings() (also getMetrics().startup) reports the time from submission to the first provider call and to the first main-model call, plus per-phase timings for memory, wiki, MCP, prompt build, tool selection and skills.
Republishing MCPs with mcp-pass (gateway pattern)
While mcpproxy=true aggregates MCPs inside a running mini-a session, mcp-pass republishes one or more MCP servers as a single standalone MCP endpoint that any client (mini-a, Claude, IDEs, other agents) can consume. The downstream tools are forwarded directly — clients see them as native tools, not behind a dispatcher:
ojob mcps/mcp-pass.yaml onport=9091 uri=/mcp \
mainmcp="(type: remote, url: 'http://internal-mcp:8080/mcp')" \
othermcps="[(cmd: 'ojob mcps/mcp-time.yaml'), (cmd: 'ojob mcps/mcp-random.yaml')]" \
useprefix="core-,time-,rand-" excludeTool="rand-pick"
Use includeTool/excludeTool to curate the exposed surface, useprefix to avoid name collisions, and serverdesc to override the advertised server identity.
TOON tool results
Set the OpenAF runtime flag MCPSERVER.answerInTOON to make built-in MCP servers serialize tool results as TOON (Token-Oriented Object Notation) instead of JSON — a more token-efficient encoding for structured data:
OAF_FLAGS="(MCPSERVER: (answerInTOON: true))" ojob mcps/mcp-time.yaml onport=8888
Combined with mcp-pass, this turns a container into a drop-in gateway that converts existing MCPs’ JSON output to TOON. See Deploying MCP Servers in Docker & Kubernetes for Docker and Kubernetes recipes.
Caching and dispatch safety
Tool results are cached only with an explicit boolean cacheable: true or deterministic: true annotation/metadata. False overrides true, and writable tools are never cached. Read-only/idempotent hints alone do not justify caching live data. toolcachettl supplies the default lifetime; per-tool TTL and cacheKeyFields can refine it.
Cache identity includes root session, client/catalog generation, tool and arguments. Delegated children sharing clients share invalidation. Mutations and shell execution invalidate the session family before and after execution; reads bypass caching while mutations are active.
Automatic transient retries require explicit read-only/idempotent declarations, or initialization failure before dispatch. A potentially mutating call that loses its response reports outcome: "unknown", retryable: false; inspect remote state before repeating it. The proxy applies these rules to the resolved downstream tool, with its outer dispatch uncached and single-attempt.
Dynamic selection (usetools=true mcpdynamic=true) accepts a valid empty model selection as no task-specific tools needed. Invalid/failed selection continues through fallback stages. Configured transport/coordination tools such as proxy-dispatch, execution-task and subtask-status remain available for follow-up work.
Tasks, input requests and skills
Mini-A negotiates features with each external MCP server. The interactive tester’s Show capabilities explains what a connection supports. Tasks and skills need an OpenAF runtime with getTask and listSkills respectively. Interactive input needs onElicitationRequest, and URL requests need protocol revision 2025-11-25 or later.
- Tasks. A long-running call can return a handle. Mini-A shows progress and prints a run ID. Stop requests cancellation. To recover after interruption, use
resumerun=<id>with the original MCP connection and run root so Mini-A can check the existing task. - Input requests. In console, TUI and web sessions, review the form or the destination of a URL request before continuing. Unattended workers omit this capability.
- Skills. Enable
useskills=trueand use/skills remoteto find the server-qualified ID. Put$mcp:<server-id>:<skill-id>in your goal to request it. Review the source and manifest before approving. Browser approvals belong to the current session. Local approvals belong to the operating-system user.
To try all three from the Mini-A checkout, use the bundled report example with an OpenAF and oJob-common that support modern MCP workflows and skills.
mini-a 'mcp=[(id: report, type: stdio, cmd: "ojob examples/mcp-report-preview.yaml")]' useskills=true
Enter $report-preview Generate a preview. Approve the skill and choose a format when the server asks. Each running endpoint needs its own writable copy of the example because it stores task state beside the YAML.
OAuth2 for remote MCP servers
Remote mcp= entries pass their auth map to OpenAF’s $mcp client. Use a runtime containing generic OAuth2 callback/token-store support. For interactive authorization-code login, configure registered client/provider values:
mini-a usetools=true goal="List available remote tools" \
mcp="(type: remote, url: 'https://mcp.example.com/mcp', auth: (type: oauth2, grantType: authorization_code, clientId: 'YOUR_CLIENT_ID', authURL: 'https://identity.example.com/authorize', tokenURL: 'https://identity.example.com/token', redirectURI: 'http://127.0.0.1:12798/', scope: 'mcp:read', callback: true, interactive: true, tokenStore: (type: sec, profile: example-mcp)))"
Run on the machine receiving the exact registered loopback callback. The listener validates state/PKCE. Protected tokenStore persistence is opt-in; without it tokens live only in the client. Subsequent unattended runs can use the same store with interactive: false, which fails if a fresh login is needed. Client credentials use grantType: client_credentials with provider/client credentials supplied securely. Discovery can fill omitted endpoints where provider metadata supports it.
Use mini-a mcptest=true mcp="..." with the same configuration to inspect the connection. Plugin mcp.json imports currently handle bearer headers only; configure generic OAuth2 directly through mcp=. WorkIQ retains its dedicated workflow in the MCP catalog.