[{"data":1,"prerenderedAt":534},["ShallowReactive",2],{"docs-page:\u002Fdocs\u002Fmcp-and-environment":3,"docs-navigation-links":502},{"id":4,"title":5,"body":6,"description":494,"extension":495,"meta":496,"navigation":497,"path":498,"seo":499,"stem":500,"__hash__":501},"docs\u002Fdocs\u002Fmcp-and-environment.md","MCP and environment",{"type":7,"value":8,"toc":488},"minimark",[9,14,23,90,93,109,112,164,167,175,185,189,203,311,315,326,413,427,431,462,484],[10,11,13],"h2",{"id":12},"environment-variables","Environment variables",[15,16,17,18,22],"p",{},"Use ",[19,20,21],"code",{},"env"," to bake variables into a newly created sandbox:",[24,25,30],"pre",{"className":26,"code":27,"language":28,"meta":29,"style":29},"language-json shiki shiki-themes github-dark","{\n  \"env\": {\n    \"API_HOST\": \"https:\u002F\u002Fapi.example.com\",\n    \"FEATURE_FLAG\": \"enabled\"\n  }\n}\n","json","",[19,31,32,41,51,67,78,84],{"__ignoreMap":29},[33,34,37],"span",{"class":35,"line":36},"line",1,[33,38,40],{"class":39},"s95oV","{\n",[33,42,44,48],{"class":35,"line":43},2,[33,45,47],{"class":46},"sDLfK","  \"env\"",[33,49,50],{"class":39},": {\n",[33,52,54,57,60,64],{"class":35,"line":53},3,[33,55,56],{"class":46},"    \"API_HOST\"",[33,58,59],{"class":39},": ",[33,61,63],{"class":62},"sU2Wk","\"https:\u002F\u002Fapi.example.com\"",[33,65,66],{"class":39},",\n",[33,68,70,73,75],{"class":35,"line":69},4,[33,71,72],{"class":46},"    \"FEATURE_FLAG\"",[33,74,59],{"class":39},[33,76,77],{"class":62},"\"enabled\"\n",[33,79,81],{"class":35,"line":80},5,[33,82,83],{"class":39},"  }\n",[33,85,87],{"class":35,"line":86},6,[33,88,89],{"class":39},"}\n",[15,91,92],{},"Environment variables:",[94,95,96,100,103,106],"ul",{},[97,98,99],"li",{},"are accepted only when creating a chat;",[97,101,102],{},"are passed through the queued run and baked into sandbox creation;",[97,104,105],{},"are not persisted on the chat or turn;",[97,107,108],{},"remain available while that chat uses the sandbox.",[15,110,111],{},"Limits:",[113,114,115,128],"table",{},[116,117,118],"thead",{},[119,120,121,125],"tr",{},[122,123,124],"th",{},"Limit",[122,126,127],{},"Value",[129,130,131,140,148,156],"tbody",{},[119,132,133,137],{},[134,135,136],"td",{},"Variables",[134,138,139],{},"64",[119,141,142,145],{},[134,143,144],{},"Key length",[134,146,147],{},"256 bytes",[119,149,150,153],{},[134,151,152],{},"Value length",[134,154,155],{},"32 KiB",[119,157,158,161],{},[134,159,160],{},"Total keys and values",[134,162,163],{},"128 KiB",[15,165,166],{},"Names must match:",[24,168,173],{"className":169,"code":171,"language":172,"meta":29},[170],"language-text","[A-Za-z_][A-Za-z0-9_]*\n","text",[19,174,171],{"__ignoreMap":29},[15,176,177,178,180,181,184],{},"Sending non-empty ",[19,179,21],{}," while resuming a chat returns ",[19,182,183],{},"422",".",[10,186,188],{"id":187},"stdio-mcp-servers","Stdio MCP servers",[15,190,191,192,195,196,199,200,202],{},"Define a local MCP process with ",[19,193,194],{},"command",", optional ",[19,197,198],{},"args",", and optional ",[19,201,21],{},":",[24,204,206],{"className":26,"code":205,"language":28,"meta":29,"style":29},"{\n  \"mcp_servers\": [\n    {\n      \"name\": \"linear\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@tacticlaunch\u002Fmcp-linear\"],\n      \"env\": {\n        \"LINEAR_API_TOKEN\": \"lin_...\"\n      }\n    }\n  ]\n}\n",[19,207,208,212,220,225,237,249,269,277,288,294,300,306],{"__ignoreMap":29},[33,209,210],{"class":35,"line":36},[33,211,40],{"class":39},[33,213,214,217],{"class":35,"line":43},[33,215,216],{"class":46},"  \"mcp_servers\"",[33,218,219],{"class":39},": [\n",[33,221,222],{"class":35,"line":53},[33,223,224],{"class":39},"    {\n",[33,226,227,230,232,235],{"class":35,"line":69},[33,228,229],{"class":46},"      \"name\"",[33,231,59],{"class":39},[33,233,234],{"class":62},"\"linear\"",[33,236,66],{"class":39},[33,238,239,242,244,247],{"class":35,"line":80},[33,240,241],{"class":46},"      \"command\"",[33,243,59],{"class":39},[33,245,246],{"class":62},"\"npx\"",[33,248,66],{"class":39},[33,250,251,254,257,260,263,266],{"class":35,"line":86},[33,252,253],{"class":46},"      \"args\"",[33,255,256],{"class":39},": [",[33,258,259],{"class":62},"\"-y\"",[33,261,262],{"class":39},", ",[33,264,265],{"class":62},"\"@tacticlaunch\u002Fmcp-linear\"",[33,267,268],{"class":39},"],\n",[33,270,272,275],{"class":35,"line":271},7,[33,273,274],{"class":46},"      \"env\"",[33,276,50],{"class":39},[33,278,280,283,285],{"class":35,"line":279},8,[33,281,282],{"class":46},"        \"LINEAR_API_TOKEN\"",[33,284,59],{"class":39},[33,286,287],{"class":62},"\"lin_...\"\n",[33,289,291],{"class":35,"line":290},9,[33,292,293],{"class":39},"      }\n",[33,295,297],{"class":35,"line":296},10,[33,298,299],{"class":39},"    }\n",[33,301,303],{"class":35,"line":302},11,[33,304,305],{"class":39},"  ]\n",[33,307,309],{"class":35,"line":308},12,[33,310,89],{"class":39},[10,312,314],{"id":313},"remote-mcp-servers","Remote MCP servers",[15,316,317,318,321,322,325],{},"Define a remote server with ",[19,319,320],{},"url",", optional transport ",[19,323,324],{},"type",", and optional\nheaders:",[24,327,329],{"className":26,"code":328,"language":28,"meta":29,"style":29},"{\n  \"mcp_servers\": [\n    {\n      \"name\": \"figma\",\n      \"url\": \"https:\u002F\u002Fmcp.figma.com\u002Fmcp\",\n      \"type\": \"http\",\n      \"headers\": {\n        \"Authorization\": \"Bearer ...\"\n      }\n    }\n  ]\n}\n",[19,330,331,335,341,345,356,368,380,387,397,401,405,409],{"__ignoreMap":29},[33,332,333],{"class":35,"line":36},[33,334,40],{"class":39},[33,336,337,339],{"class":35,"line":43},[33,338,216],{"class":46},[33,340,219],{"class":39},[33,342,343],{"class":35,"line":53},[33,344,224],{"class":39},[33,346,347,349,351,354],{"class":35,"line":69},[33,348,229],{"class":46},[33,350,59],{"class":39},[33,352,353],{"class":62},"\"figma\"",[33,355,66],{"class":39},[33,357,358,361,363,366],{"class":35,"line":80},[33,359,360],{"class":46},"      \"url\"",[33,362,59],{"class":39},[33,364,365],{"class":62},"\"https:\u002F\u002Fmcp.figma.com\u002Fmcp\"",[33,367,66],{"class":39},[33,369,370,373,375,378],{"class":35,"line":86},[33,371,372],{"class":46},"      \"type\"",[33,374,59],{"class":39},[33,376,377],{"class":62},"\"http\"",[33,379,66],{"class":39},[33,381,382,385],{"class":35,"line":271},[33,383,384],{"class":46},"      \"headers\"",[33,386,50],{"class":39},[33,388,389,392,394],{"class":35,"line":279},[33,390,391],{"class":46},"        \"Authorization\"",[33,393,59],{"class":39},[33,395,396],{"class":62},"\"Bearer ...\"\n",[33,398,399],{"class":35,"line":290},[33,400,293],{"class":39},[33,402,403],{"class":35,"line":296},[33,404,299],{"class":39},[33,406,407],{"class":35,"line":302},[33,408,305],{"class":39},[33,410,411],{"class":35,"line":308},[33,412,89],{"class":39},[15,414,415,416,418,419,422,423,426],{},"Remote ",[19,417,324],{}," may be ",[19,420,421],{},"http"," or ",[19,424,425],{},"sse",". Omitting it defaults to HTTP behavior in\nthe runner.",[10,428,430],{"id":429},"mcp-rules","MCP rules",[94,432,433,439,446,456,459],{},[97,434,435,436,184],{},"Every server needs a unique ",[19,437,438],{},"name",[97,440,441,442,422,444,184],{},"Each server must set exactly one of ",[19,443,194],{},[19,445,320],{},[97,447,448,451,452,455],{},[19,449,450],{},"bruin"," and ",[19,453,454],{},"agent-runner"," are reserved names.",[97,457,458],{},"Stdio arguments and environment values must be strings.",[97,460,461],{},"Remote header values must be strings.",[15,463,464,465,467,468,451,470,473,474,477,478,481,482,184],{},"MCP configuration is stored on the chat and inherited by every later turn.\nUnlike top-level ",[19,466,21],{},", MCP ",[19,469,21],{},[19,471,472],{},"headers"," are therefore durable chat\nconfiguration. Do not resend ",[19,475,476],{},"mcp_servers"," with ",[19,479,480],{},"chat_id","; the API returns\n",[19,483,183],{},[485,486,487],"style",{},"html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":29,"searchDepth":43,"depth":43,"links":489},[490,491,492,493],{"id":12,"depth":43,"text":13},{"id":187,"depth":43,"text":188},{"id":313,"depth":43,"text":314},{"id":429,"depth":43,"text":430},"Configure external tools and sandbox environment variables for a new chat.","md",{},true,"\u002Fdocs\u002Fmcp-and-environment",{"title":5,"description":494},"docs\u002Fmcp-and-environment","WS6R7udOssWsgl8qwV_1wUgua33eFvVvK_9CrBqEv0U",[503,506,509,512,515,518,521,522,525,528,531],{"path":504,"title":505},"\u002Fdocs","Overview",{"path":507,"title":508},"\u002Fdocs\u002Fauthentication","Authentication",{"path":510,"title":511},"\u002Fdocs\u002Fchats-and-turns","Chats and turns",{"path":513,"title":514},"\u002Fdocs\u002Ferrors","Errors and statuses",{"path":516,"title":517},"\u002Fdocs\u002Ffiles-and-repositories","Files and repositories",{"path":519,"title":520},"\u002Fdocs\u002Fharnesses-and-models","Harnesses and models",{"path":498,"title":5},{"path":523,"title":524},"\u002Fdocs\u002Fquickstart","Quickstart",{"path":526,"title":527},"\u002Fdocs\u002Fresources-and-billing","Resources and billing",{"path":529,"title":530},"\u002Fdocs\u002Fresuming-chats","Resuming chats",{"path":532,"title":533},"\u002Fdocs\u002Frunning-agents","Running agents",1785310516454]