Skip to content

AgentMcpServer ​

Type, in @jr2/orchestrator/src/agent.ts. It is an export of @jr2/orchestrator, in the Agents group of the Authoring surface page.

ts
type AgentMcpServer = {
  server: string;
  tools?: readonly string[] | "*";
};

One MCP server that an Agent uses, and the tools that it may call there.

  • server is a name of the mcp block of jr2.config.ts. jr2 up refuses a name that the block does not declare, and prints the customize() line that binds the Agent to one it does.
  • tools is the allowlist. A remote server needs it: a list of tool names, or "*" for every tool. The Harness offers and runs only those tools. When Workspace code in the Agent's Sandbox can spend the server's secret, jr2 up takes only "*", because a list would then not be a limit. A stdio server takes no tools: the Agent gets every tool of the server.

The model reads each tool as mcp__<server>__<tool>. A tool name in the list must keep that name within [A-Za-z0-9_-] and 128 characters.

Fields

  • server: string

    A server name of the mcp block of jr2.config.ts.

  • tools (optional): readonly string[] | "*"

    The allowlist: tool names of the server, or "*" for every tool. Required for a remote server; absent for a stdio server.

Example

ts
import { agent } from "@jr2/orchestrator";

export const triage = agent({
  model: "anthropic/claude-haiku-5-5",
  instructions: "You read the ticket and post a summary to the channel.",
  workspace: "none",
  mcp: [{ server: "slack-acme", tools: ["post_message", "read_channel"] }],
});

See also

The docs of Kit version 0.8.0. Each page is also at its .md URL.