Skip to main content
An MCP server gives an agent extra tools, such as web search. Define each server once in piloop.toml, and list it in the roles that need it. piloop gives the servers to each harness in that harness’s own format:
http is a streamable HTTP server, and stdio a server that the harness starts. A role gets no servers unless its mcp key lists them. The configuration reference has every key.

Keys stay out of the file

A server names the variables that hold its keys, never a key, so piloop.toml is safe to commit. Each variable is the name of a secret. A secret that is not set makes the launch fail with its name, and piloop doctor lists the missing ones.
An agent can read the keys in its environment with its shell tool. Codex agents are the exception: piloop removes the role’s variables from the environment of Codex’s shell tool.

What each harness gets

The agents see only the role’s servers, never the servers of your own configuration:
  • Claude Code: --strict-mcp-config and an inline --mcp-config.
  • Codex: your Codex servers are turned off, and the role’s are added. A piloop server with the name of one of yours makes the launch fail.
  • pi: through pi-mcp-adapter in exclusive mode.
piloop init refuses a role that lists servers when a harness of its rotation cannot take them. Leave that harness out of the role’s harnesses. A harness of your own takes servers when its command has an {mcp} element and it names a provider that takes them, such as provider = "claude".