Give the agents of a role extra tools, such as web search, with one definition for every harness.
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.
Harness
What it runs
Executable
By default
claude
claude -p with JSON output, the session id that piloop makes, and --settings of its own (SETTINGS).
claude
yes
codex
codex exec --json, which reports its session id (the thread id) on its first line.
codex
yes
pi
pi in JSON mode, with its extensions, skills and context files off, and the session id that piloop makes.
pi
no
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".
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"piloop","colors":{"primary":"#C8552B","light":"#D98A3F","dark":"#A8431F"},"favicon":"https://mintcdn.com/piloop/SdzzsA21hyuTjjpm/favicon.svg?fit=max\u0026auto=format\u0026n=SdzzsA21hyuTjjpm\u0026q=85\u0026s=1f46856b084a9f1b3b964e81e170c3b4","navbar":{"links":[{"href":"https://github.com/hiloopai/piloop","label":"GitHub"}]},"footer":{"socials":{"github":"https://github.com/hiloopai/piloop"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"piloop","hasAudioNarration":false,"actualSubdomain":"piloop","customDomains":["piloop.autoresearch.inc"],"gitSource":{"type":"github","owner":"hiloopai","repo":"piloop","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6b0e5686261f029092fe5bb9","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"Guides","count":9},{"language":"default","tag":"Concepts","count":7},{"language":"default","tag":"Reference","count":6},{"language":"default","tag":"Plugins","count":5},{"language":"default","tag":"Get started","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"guides/mcp-servers","slug":"/guides/mcp-servers","pageMetadata":{"title":"MCP servers","description":"Give the agents of a role extra tools, such as web search, with one definition for every harness.","href":"/guides/mcp-servers"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Give the agents of a role extra tools, such as web search, with one definition for every harness.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`An MCP server gives an agent extra tools, such as web search. Define each server once in `,_jsx(_components.code,{children:`piloop.toml`}),`, and list it in\nthe roles that need it. piloop gives the servers to each harness in that harness’s own format:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`toml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`toml`,children:_jsxs(_components.code,{language:`toml`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`plugins`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`mcp_server`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`exa`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"http\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://mcp.exa.ai/mcp?tools=web_search_exa,web_fetch_exa\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`headers_env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`x-api-key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"EXA_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`plugins`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`mcp_server`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`firecrawl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"http\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://mcp.firecrawl.dev/v2/mcp\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bearer_token_env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"FIRECRAWL_API_KEY\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`plugins`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`mcp_server`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`search`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`provider`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stdio\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`command`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"python3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"server.py\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SEARCH_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`plugins`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`role`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`implementer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`mcp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` = [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"exa\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"firecrawl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"search\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`http`}),` is a streamable HTTP server, and `,_jsx(_components.code,{children:`stdio`}),` a server that the harness starts. A role gets no servers unless its\n`,_jsx(_components.code,{children:`mcp`}),` key lists them. The `,_jsx(_components.a,{href:`/reference/configuration`,children:`configuration reference`}),` has every key.`]}),`\n`,_jsx(Heading,{level:`2`,id:`keys-stay-out-of-the-file`,children:`Keys stay out of the file`}),`\n`,_jsxs(_components.p,{children:[`A server names the variables that hold its keys, never a key, so `,_jsx(_components.code,{children:`piloop.toml`}),` is safe to commit. Each variable is\nthe name of a `,_jsx(_components.a,{href:`/guides/secrets`,children:`secret`}),`. A secret that is not set makes the launch fail with its name, and\n`,_jsx(_components.code,{children:`piloop doctor`}),` lists the missing ones.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`An agent can read the keys in its environment with its shell tool. Codex agents are the exception: piloop removes\nthe role’s variables from the environment of Codex’s shell tool.`})}),`\n`,_jsx(Heading,{level:`2`,id:`what-each-harness-gets`,children:`What each harness gets`}),`\n`,_jsx(_components.p,{children:`The agents see only the role’s servers, never the servers of your own configuration:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Claude Code`}),`: `,_jsx(_components.code,{children:`--strict-mcp-config`}),` and an inline `,_jsx(_components.code,{children:`--mcp-config`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Codex`}),`: your Codex servers are turned off, and the role’s are added. A piloop server with the name of one of\nyours makes the launch fail.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`pi`}),`: through `,_jsx(_components.code,{children:`pi-mcp-adapter`}),` in exclusive mode.`]}),`\n`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Harness`}),_jsx(_components.th,{children:`What it runs`}),_jsx(_components.th,{children:`Executable`}),_jsx(_components.th,{children:`By default`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`claude`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`claude -p`}),` with JSON output, the session id that piloop makes, and `,_jsx(_components.code,{children:`--settings`}),` of its own (`,_jsx(_components.code,{children:`SETTINGS`}),`).`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`claude`})}),_jsx(_components.td,{children:`yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`codex`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`codex exec --json`}),`, which reports its session id (the thread id) on its first line.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`codex`})}),_jsx(_components.td,{children:`yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`pi`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`pi`}),` in JSON mode, with its extensions, skills and context files off, and the session id that piloop makes.`]}),_jsx(_components.td,{children:_jsx(_components.code,{children:`pi`})}),_jsx(_components.td,{children:`no`})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`piloop init`}),` refuses a role that lists servers when a harness of its rotation cannot take them. Leave that harness\nout of the role’s `,_jsx(_components.code,{children:`harnesses`}),`. A `,_jsx(_components.a,{href:`/plugins/agents#harnesses`,children:`harness of your own`}),` takes servers when its command has an\n`,_jsx(_components.code,{children:`{mcp}`}),` element and it names a provider that takes them, such as `,_jsx(_components.code,{children:`provider = \"claude\"`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"MCP servers","description":"Give the agents of a role extra tools, such as web search, with one definition for every harness.","href":"/guides/mcp-servers"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Keys stay out of the file","slug":"keys-stay-out-of-the-file","depth":2,"children":[]},{"title":"What each harness gets","slug":"what-each-harness-gets","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"piloop","siteName":"piloop","title":"MCP servers - piloop","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T01:54:29.523Z","originalFileLocation":"guides/mcp-servers.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Give the agents of a role extra tools, such as web search, with one definition for every harness.\">\u003cmeta data-mint-head name=\"application-name\" content=\"piloop\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"MCP servers - piloop\">\u003cmeta data-mint-head property=\"og:description\" content=\"Give the agents of a role extra tools, such as web search, with one definition for every harness.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"piloop\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://piloop.autoresearch.inc/guides/mcp-servers\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://piloop.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=MCP+servers\u0026amp;description=Give+the+agents+of+a+role+extra+tools%2C+such+as+web+search%2C+with+one+definition+for+every+harness.\u0026amp;theme=06fa5143f862c441355be9ec\u0026amp;signature=3f5f039bc2ef2a821616918a76bb11e9802e491e43a680c48eeb4bd08fed19e1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"MCP servers - piloop\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Give the agents of a role extra tools, such as web search, with one definition for every harness.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://piloop.mintlify.site/_mintlify/api/og/v2?division=Guides\u0026amp;title=MCP+servers\u0026amp;description=Give+the+agents+of+a+role+extra+tools%2C+such+as+web+search%2C+with+one+definition+for+every+harness.\u0026amp;theme=06fa5143f862c441355be9ec\u0026amp;signature=3f5f039bc2ef2a821616918a76bb11e9802e491e43a680c48eeb4bd08fed19e1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/piloop/jssF9qKLHZWmHMeA/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"piloop\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#C8552B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://piloop.autoresearch.inc/guides/mcp-servers\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/mcp-servers.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://piloop.autoresearch.inc/#organization\",\"name\":\"piloop\",\"url\":\"https://piloop.autoresearch.inc\"},{\"@type\":\"WebSite\",\"@id\":\"https://piloop.autoresearch.inc#website\",\"name\":\"piloop\",\"url\":\"https://piloop.autoresearch.inc\",\"publisher\":{\"@id\":\"https://piloop.autoresearch.inc/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://piloop.autoresearch.inc/guides/mcp-servers#webpage\",\"url\":\"https://piloop.autoresearch.inc/guides/mcp-servers\",\"name\":\"MCP servers\",\"description\":\"Give the agents of a role extra tools, such as web search, with one definition for every harness.\",\"dateModified\":\"2026-11-12T01:54:29.523Z\",\"isPartOf\":{\"@id\":\"https://piloop.autoresearch.inc#website\"},\"breadcrumb\":{\"@id\":\"https://piloop.autoresearch.inc/guides/mcp-servers#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://piloop.autoresearch.inc/guides/mcp-servers#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Guides\",\"item\":\"https://piloop.autoresearch.inc/guides/daemon\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MCP servers\",\"item\":\"https://piloop.autoresearch.inc/guides/mcp-servers\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://piloop.autoresearch.inc/guides/mcp-servers#article\",\"headline\":\"MCP servers\",\"name\":\"MCP servers\",\"description\":\"Give the agents of a role extra tools, such as web search, with one definition for every harness.\",\"url\":\"https://piloop.autoresearch.inc/guides/mcp-servers\",\"mainEntityOfPage\":{\"@id\":\"https://piloop.autoresearch.inc/guides/mcp-servers#webpage\"},\"dateModified\":\"2026-11-12T01:54:29.523Z\",\"publisher\":{\"@id\":\"https://piloop.autoresearch.inc/#organization\"},\"isPartOf\":{\"@id\":\"https://piloop.autoresearch.inc#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"piloop\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"piloop\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/guides/mcp-servers.md","siteName":"piloop","nav":{"global":null,"groups":[{"group":"Get started","pages":[{"title":"Introduction","href":"/index"},{"title":"Quickstart","href":"/quickstart"},{"title":"Choose a setup","sidebarTitle":"Setup","href":"/guides/choose-a-setup"},{"title":"Run a campaign by hand","href":"/by-hand"}]},{"group":"Concepts","pages":[{"title":"Campaigns and the evaluate command","sidebarTitle":"Campaigns","href":"/concepts/campaigns"},{"title":"Ideas and runs","href":"/concepts/ideas-and-runs"},{"title":"The pool and the best","sidebarTitle":"The pool","href":"/concepts/pool"},{"title":"Agents and roles","href":"/concepts/roles"},{"title":"The orchestrator and the inbox","sidebarTitle":"Orchestrator and inbox","href":"/concepts/orchestrator"},{"title":"Stop conditions and cost","sidebarTitle":"Stop conditions and cost","href":"/concepts/cost"},{"title":"The archive and the CAS","sidebarTitle":"Archive and CAS","href":"/concepts/archive"}]},{"group":"Guides","pages":[{"title":"Run the daemon","sidebarTitle":"The daemon","href":"/guides/daemon"},{"title":"Workers and capacity","sidebarTitle":"Workers","href":"/guides/workers"},{"title":"Run agents in containers","sidebarTitle":"Containers","href":"/guides/containers"},{"title":"Secrets","description":"Give agents the API keys that MCP servers and model gateways need, without a key in any file.","href":"/guides/secrets"},{"title":"MCP servers","href":"/guides/mcp-servers"},{"title":"Notifications","description":"Get a Slack message when an escalation waits for you, and answer it from Slack.","href":"/guides/notifications"},{"title":"Watch and review a campaign","sidebarTitle":"Watch and review","href":"/guides/watch"},{"title":"Optimize inference","sidebarTitle":"Inference","href":"/guides/inference-optimization"},{"title":"Upgrading","href":"/guides/upgrading"}]},{"group":"Plugins","pages":[{"title":"Write a plugin","href":"/plugins/overview"},{"title":"Tables, commands, skills, routes and consumers","sidebarTitle":"Tables, commands and routes","href":"/plugins/contributions"},{"title":"Best rules, stop rules and fact sources","sidebarTitle":"Rules and facts","href":"/plugins/rules"},{"title":"Harnesses, MCP servers, runtimes, roles, sections and lineage","sidebarTitle":"Agents and sections","href":"/plugins/agents"},{"title":"Executors, stores and services","sidebarTitle":"Infrastructure","href":"/plugins/infrastructure"}]},{"group":"Reference","pages":[{"title":"CLI","href":"/reference/cli"},{"title":"Configuration","href":"/reference/configuration"},{"title":"Database schema","href":"/reference/schema"},{"title":"Data model","href":"/reference/data-model"},{"title":"Environment variables","href":"/reference/environment"},{"title":"API and event feed","sidebarTitle":"API and event feed","href":"/reference/event-feed"}]}]},"basePath":"","title":"MCP servers - piloop","deploymentId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","buildId":"dpl_Ab6nteg7kvyK8iL73naC2n7fmsWK","dynamics":[],"chunks":[]}