[{"data":1,"prerenderedAt":305},["ShallowReactive",2],{"docs:navigation":3,"docs:page:\u002Fdocs\u002Fconnect\u002Fmcp":115},[4],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Introduction","\u002Fdocs","docs\u002F1.index",[9,11,16,21,38,95,110],{"title":5,"path":6,"stem":7,"icon":10},"i-lucide-house",{"title":12,"path":13,"stem":14,"icon":15},"Quickstart","\u002Fdocs\u002Fquickstart","docs\u002F2.quickstart","i-lucide-rocket",{"title":17,"path":18,"stem":19,"icon":20},"Essentials","\u002Fdocs\u002Fconfiguration","docs\u002F3.configuration","i-lucide-book-open",{"title":22,"path":23,"stem":24,"children":25,"icon":27},"Authentication","\u002Fdocs\u002Fauthentication","docs\u002F4.authentication\u002Findex",[26,28,33],{"title":22,"path":23,"stem":24,"icon":27},"i-lucide-shield-check",{"title":29,"path":30,"stem":31,"icon":32},"Protect User Data","\u002Fdocs\u002Fauthentication\u002Fuser-data","docs\u002F4.authentication\u002F1.user-data","i-lucide-user-lock",{"title":34,"path":35,"stem":36,"icon":37},"Two-Factor Verification","\u002Fdocs\u002Fauthentication\u002Ftwo-factor","docs\u002F4.authentication\u002F2.two-factor","i-lucide-key-round",{"title":39,"path":40,"stem":41,"children":42,"icon":44},"Deployment","\u002Fdocs\u002Fdeployment","docs\u002F5.deployment\u002Findex",[43,45,50,55,60,65,70,75,80,85,90],{"title":39,"path":40,"stem":41,"icon":44},"i-lucide-cloud-upload",{"title":46,"path":47,"stem":48,"icon":49},"Deploy to Cloudflare","\u002Fdocs\u002Fdeployment\u002Fcloudflare","docs\u002F5.deployment\u002F1.cloudflare","i-simple-icons-cloudflare",{"title":51,"path":52,"stem":53,"icon":54},"Platform Support","\u002Fdocs\u002Fdeployment\u002Fsupport","docs\u002F5.deployment\u002F10.support","i-lucide-list-checks",{"title":56,"path":57,"stem":58,"icon":59},"Deploy to Vercel","\u002Fdocs\u002Fdeployment\u002Fvercel","docs\u002F5.deployment\u002F2.vercel","i-simple-icons-vercel",{"title":61,"path":62,"stem":63,"icon":64},"Deploy to Azure","\u002Fdocs\u002Fdeployment\u002Fazure","docs\u002F5.deployment\u002F3.azure","i-simple-icons-microsoftazure",{"title":66,"path":67,"stem":68,"icon":69},"Switch Hosts","\u002Fdocs\u002Fdeployment\u002Fswitch-hosts","docs\u002F5.deployment\u002F4.switch-hosts","i-lucide-arrow-right-left",{"title":71,"path":72,"stem":73,"icon":74},"Database and File Storage","\u002Fdocs\u002Fdeployment\u002Fdata-services","docs\u002F5.deployment\u002F5.data-services","i-lucide-database",{"title":76,"path":77,"stem":78,"icon":79},"Domains and Secrets","\u002Fdocs\u002Fdeployment\u002Fsettings","docs\u002F5.deployment\u002F6.settings","i-lucide-settings",{"title":81,"path":82,"stem":83,"icon":84},"Troubleshoot Deployment","\u002Fdocs\u002Fdeployment\u002Ftroubleshooting","docs\u002F5.deployment\u002F7.troubleshooting","i-lucide-wrench",{"title":86,"path":87,"stem":88,"icon":89},"Deploy Agents","\u002Fdocs\u002Fdeployment\u002Fagents","docs\u002F5.deployment\u002F8.agents","i-lucide-bot",{"title":91,"path":92,"stem":93,"icon":94},"Deploy Automations","\u002Fdocs\u002Fdeployment\u002Fautomations","docs\u002F5.deployment\u002F9.automations","i-lucide-workflow",{"title":96,"path":97,"stem":98,"children":99,"icon":101},"Connect Accounts","\u002Fdocs\u002Fconnect","docs\u002F6.connect\u002Findex",[100,102,106],{"title":96,"path":97,"stem":98,"icon":101},"i-lucide-plug",{"title":103,"path":104,"stem":105,"icon":37},"Connection Credentials","\u002Fdocs\u002Fconnect\u002Fcredentials","docs\u002F6.connect\u002F1.credentials",{"title":107,"path":108,"stem":109,"icon":84},"Connect MCP Servers","\u002Fdocs\u002Fconnect\u002Fmcp","docs\u002F6.connect\u002F2.mcp",{"title":111,"path":112,"stem":113,"icon":114},"Project Reference","\u002Fdocs\u002Freference","docs\u002F7.reference","i-lucide-terminal",{"page":116,"surround":300},{"id":117,"title":107,"body":118,"description":293,"extension":294,"links":295,"meta":296,"navigation":297,"path":108,"seo":298,"stem":109,"__hash__":299},"docs\u002Fdocs\u002F6.connect\u002F2.mcp.md",{"type":119,"value":120,"toc":288},"minimark",[121,125,133,138,146,149,153,160,164,171,178,263,274,284],[122,123,124],"p",{},"A hosted Model Context Protocol (MCP) server exposes tools your application can\ncall. Connect manages its account authorization; your app still chooses which\ntools to expose and when to require approval.",[122,126,127,128,132],{},"This guide assumes ",[129,130,131],"a",{"href":97},"Connect is configured",". Choose a server-by-URL\nflow when the server supports registration, or reuse an existing provider grant\nwhen it requires a pre-registered client.",[134,135,137],"h2",{"id":136},"connect-a-server-by-url","Connect a Server by URL",[122,139,140,141,145],{},"With ",[142,143,144],"code",{},"connect.mcp: true",", users can connect a hosted MCP server by URL. Connect\ndiscovers its authorization server, runs authorization with PKCE, and can avoid\nmanual OAuth app registration when the server supports client metadata documents\nor dynamic client registration.",[122,147,148],{},"Client metadata documents require a public HTTPS application origin. Local\ndevelopment needs dynamic registration when its origin cannot be fetched by the\nauthorization server. If neither mechanism is supported, Connect reports that\nthe server needs a pre-registered client. Users still grant account access.",[134,150,152],{"id":151},"store-an-api-key","Store an API Key",[122,154,155,156,159],{},"For pasted API keys, your application verifies the key and saves it through\n",[142,157,158],{},"connect.saveApiKey(...)","; Connect encrypts it and enforces connection access.",[134,161,163],{"id":162},"reuse-an-existing-account-grant","Reuse an Existing Account Grant",[122,165,166,167,170],{},"For a server that requires a pre-registered OAuth client, Connect can reuse a\nprovider's existing account grant. For example, Google's Calendar server uses the\nGoogle client credentials configured by ",[142,168,169],{},"cloudconfig connect add google",".",[122,172,173,174,177],{},"Declare its endpoint in that provider's ",[142,175,176],{},"mcpServers",":",[179,180,185],"pre",{"className":181,"code":182,"language":183,"meta":184,"style":184},"language-ts shiki shiki-themes github-light github-light github-dark","connect: {\n  providers: {\n    google: {\n      scopes: ['https:\u002F\u002Fwww.googleapis.com\u002Fauth\u002Fcalendar.events'],\n      mcpServers: ['https:\u002F\u002Fcalendarmcp.googleapis.com\u002Fmcp\u002Fv1'],\n    },\n  },\n}\n","ts","",[142,186,187,200,208,216,232,245,251,257],{"__ignoreMap":184},[188,189,192,196],"span",{"class":190,"line":191},"line",1,[188,193,195],{"class":194},"snPdu","connect",[188,197,199],{"class":198},"sxrX7",": {\n",[188,201,203,206],{"class":190,"line":202},2,[188,204,205],{"class":194},"  providers",[188,207,199],{"class":198},[188,209,211,214],{"class":190,"line":210},3,[188,212,213],{"class":194},"    google",[188,215,199],{"class":198},[188,217,219,222,225,229],{"class":190,"line":218},4,[188,220,221],{"class":194},"      scopes",[188,223,224],{"class":198},": [",[188,226,228],{"class":227},"sIIMD","'https:\u002F\u002Fwww.googleapis.com\u002Fauth\u002Fcalendar.events'",[188,230,231],{"class":198},"],\n",[188,233,235,238,240,243],{"class":190,"line":234},5,[188,236,237],{"class":194},"      mcpServers",[188,239,224],{"class":198},[188,241,242],{"class":227},"'https:\u002F\u002Fcalendarmcp.googleapis.com\u002Fmcp\u002Fv1'",[188,244,231],{"class":198},[188,246,248],{"class":190,"line":247},6,[188,249,250],{"class":198},"    },\n",[188,252,254],{"class":190,"line":253},7,[188,255,256],{"class":198},"  },\n",[188,258,260],{"class":190,"line":259},8,[188,261,262],{"class":198},"}\n",[122,264,265,266,269,270,273],{},"Connect the account through the Google provider, then call\n",[142,267,268],{},"connect.mcp(actor, googleConnectionId, { server })"," on the server. This reuses\nthe same ownership checks, token storage, and refreshes. Only exact endpoints\ndeclared for that provider can receive its tokens. An optional ",[142,271,272],{},"signal"," cancels\nMCP requests with the enclosing job or request.",[122,275,276,277,283],{},"This avoids a second OAuth flow; it does not remove the vendor's app setup,\nrequired scopes, or service configuration. Follow\n",[129,278,282],{"href":279,"rel":280},"https:\u002F\u002Fdevelopers.google.com\u002Fworkspace\u002Fcalendar\u002Fapi\u002Fguides\u002Fconfigure-mcp-server",[281],"nofollow","Google's MCP setup","\nbefore offering those tools.",[285,286,287],"style",{},"html pre.shiki code .snPdu, html code.shiki .snPdu{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sxrX7, html code.shiki .sxrX7{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sIIMD, html code.shiki .sIIMD{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":184,"searchDepth":202,"depth":202,"links":289},[290,291,292],{"id":136,"depth":202,"text":137},{"id":151,"depth":202,"text":152},{"id":162,"depth":202,"text":163},"Authorize hosted MCP tools or reuse a provider account you already connected.","md",null,{},{"icon":84},{"title":107,"description":293},"xh-6Q9AVNGviCJOWA6JktBGswwyJ6eO9IetRkb_uwrc",[301,303],{"title":103,"path":104,"stem":105,"description":302,"icon":37},"Distinguish vendor app secrets from account tokens, then keep connections working in production.",{"title":111,"path":112,"stem":113,"description":304,"icon":114},"Look up config file conventions and common CLI commands.",1792122403396]