[{"data":1,"prerenderedAt":397},["ShallowReactive",2],{"navigation":3,"page:\u002Fbolt":45},{"title":4,"links":5},"API reference",[6,9,12,15,18,21,24,27,30,33,36,39,42],{"title":7,"href":8},"Accounts","\u002Freference\u002Faccounts",{"title":10,"href":11},"Connect","\u002Freference\u002Fconnect",{"title":13,"href":14},"Calendars","\u002Freference\u002Fcalendars",{"title":16,"href":17},"Events","\u002Freference\u002Fevents",{"title":19,"href":20},"Availability","\u002Freference\u002Favailability",{"title":22,"href":23},"Meetings","\u002Freference\u002Fmeetings",{"title":25,"href":26},"Invitations","\u002Freference\u002Finvitations",{"title":28,"href":29},"Webhooks","\u002Freference\u002Fwebhooks",{"title":31,"href":32},"Metadata","\u002Freference\u002Fmetadata",{"title":34,"href":35},"Keys","\u002Freference\u002Fkeys",{"title":37,"href":38},"Sandbox","\u002Freference\u002Fsandbox",{"title":40,"href":41},"Usage","\u002Freference\u002Fusage",{"title":43,"href":44},"Logs","\u002Freference\u002Flogs",{"kind":46,"title":47,"description":48,"sections":49,"doc":68},"guide","Build with Bolt","Add Google Calendar and Microsoft Outlook to a Bolt app. Connect the Pyas MCP server to Bolt, and its agent adds the server code, the secret and the connect button.",[50,53,56,59,62,65],{"id":51,"title":52},"add-pyas-to-bolt","Add Pyas to Bolt",{"id":54,"title":55},"ask-for-what-you-want","Ask for what you want",{"id":57,"title":58},"store-the-key","Store the key",{"id":60,"title":61},"what-bolt-adds","What Bolt adds",{"id":63,"title":64},"receive-webhooks","Receive webhooks",{"id":66,"title":67},"go-live","Go live",{"id":69,"title":47,"body":70,"description":48,"extension":387,"hero":388,"meta":389,"navigation":390,"path":391,"rawbody":392,"sections":49,"seo":393,"stem":394,"v1":395,"__hash__":396},"docs\u002Fbolt.md",{"type":71,"value":72,"toc":378},"minimark",[73,77,84,87,175,187,189,192,198,217,219,226,253,264,266,269,279,285,288,290,301,322,343,345,374],[74,75,47],"h1",{"id":76},"build-with-bolt",[78,79,80],"lead",{},[81,82,83],"p",{},"Bolt's agent can add Google Calendar and Microsoft Outlook to your app with Pyas. You connect the Pyas MCP server to Bolt once. The agent then gets the code for each task from Pyas, and you store a key as a secret. The key stays on the server, and the code works with the sandbox's sample people before anyone connects a real calendar.",[85,86,52],"h2",{"id":51},[88,89,90,107,113,146,161],"ol",{},[91,92,93,94,98,99,102,103,106],"li",{},"On the Bolt home page, select the ",[95,96,97],"strong",{},"+"," icon in the chat box, then ",[95,100,101],{},"Connectors",", then ",[95,104,105],{},"Manage connectors",".",[91,108,109,110,106],{},"Select ",[95,111,112],{},"Custom MCP server",[91,114,115,116,119,120,124,125,119,128,131,132,135,136,139,140,135,143,106],{},"For ",[95,117,118],{},"Name",", enter ",[121,122,123],"code",{},"Pyas",". For ",[95,126,127],{},"URL",[121,129,130],{},"https:\u002F\u002Fmcp.pyas.io\u002Fsandbox",". Set ",[95,133,134],{},"Transport type"," to ",[95,137,138],{},"HTTP"," and ",[95,141,142],{},"Authentication",[95,144,145],{},"MCP OAuth",[91,147,109,148,150,151,154,155,160],{},[95,149,10],{},". Sign in to Pyas, choose your app, and select ",[95,152,153],{},"Allow",". See ",[156,157,159],"a",{"href":158},"\u002Fai-tools#sign-in","Sign in"," for what each permission allows.",[91,162,163,164,102,166,168,169,171,172,106],{},"Turn the connector on for your project: select ",[95,165,97],{},[95,167,101],{},", and turn on ",[95,170,123],{},". To turn it on for every new project, use ",[95,173,174],{},"Auto-enable for all projects",[81,176,177,178,180,181,183,184,106],{},"Only a project's owner can connect MCP servers to it. To remove Pyas, open ",[95,179,105],{},", select ",[95,182,123],{},", then the three dots, then ",[95,185,186],{},"Delete",[85,188,55],{"id":54},[81,190,191],{},"Ask in plain words, for example:",[193,194,195],"blockquote",{},[81,196,197],{},"Add a button that lets people connect their Google or Outlook calendar, and show their events for the next week.",[81,199,200,201,204,205,208,209,212,213,216],{},"The agent checks your setup with ",[121,202,203],{},"setup_status"," and gets the code for each task with ",[121,206,207],{},"get_recipe",". It adds your app's preview address to the allowed origins with ",[121,210,211],{},"update_app",", and creates a test key with ",[121,214,215],{},"get_test_key",". You confirm the address in Pyas, from the link it gives you. Every response from Pyas ends with the next step, so the agent knows what to do next.",[85,218,58],{"id":57},[81,220,221,222,225],{},"Store the test key as a secret named ",[121,223,224],{},"PYAS_API_KEY",":",[227,228,229,243],"ul",{},[91,230,231,234,235,238,239,242],{},[95,232,233],{},"In Bolt:"," select the database icon, then ",[95,236,237],{},"Secrets",". Enter the name and the key, and select ",[95,240,241],{},"Save",". The project needs a database first, and only its owner can add secrets.",[91,244,245,248,249,252],{},[95,246,247],{},"In a project that uses your own Supabase project:"," add it in the Supabase dashboard, under your project's ",[95,250,251],{},"Edge Functions"," secrets.",[81,254,255,256,259,260,106],{},"Don't put the key in the chat or in a ",[121,257,258],{},"VITE_"," variable: those reach the browser. A test key works only in your app's ",[156,261,263],{"href":262},"\u002Fsandbox","sandbox",[85,265,61],{"id":60},[81,267,268],{},"The code is written as Supabase Edge Functions, for projects that use Supabase:",[270,271,277],"pre",{"className":272,"code":274,"language":275,"meta":276},[273],"language-text","supabase\u002Ffunctions\u002F_shared\u002Fpyas.ts                the Pyas client, shared by the functions\nsupabase\u002Ffunctions\u002Fpyas-connect-session\u002Findex.ts  creates a connect session for the button\nsupabase\u002Ffunctions\u002Fpyas-events\u002Findex.ts           the person's events for the next 7 days\nsupabase\u002Ffunctions\u002Fpyas-book\u002Findex.ts             books the first free 30 minutes tomorrow\nsrc\u002Fcomponents\u002FConnectCalendar.tsx                the \"Connect an account\" button\n","text","",[121,278,274],{"__ignoreMap":276},[81,280,281,282,106],{},"The button imports the project's Supabase client, so the agent points that import at the file where your project creates it. Your pages call the functions with that client, for example ",[121,283,284],{},"supabase.functions.invoke('pyas-events')",[81,286,287],{},"With a test key, the functions use the sandbox's sample person, so the events and booking work right away. The connect button shows a message from Pyas that connecting a real calendar requires a live key. This is expected.",[85,289,64],{"id":63},[81,291,292,293,296,297,300],{},"Ask the agent to receive Pyas webhooks. It adds ",[121,294,295],{},"pyas-webhooks\u002Findex.ts"," to your functions, and turns off the Supabase sign-in check for that function in ",[121,298,299],{},"supabase\u002Fconfig.toml",", because the function verifies the signature of each delivery instead:",[270,302,306],{"className":303,"code":304,"language":305,"meta":276,"style":276},"language-toml shiki shiki-themes css-variables","[functions.pyas-webhooks]\nverify_jwt = false\n","toml",[121,307,308,316],{"__ignoreMap":276},[309,310,313],"span",{"class":311,"line":312},"line",1,[309,314,315],{},"[functions.pyas-webhooks]\n",[309,317,319],{"class":311,"line":318},2,[309,320,321],{},"verify_jwt = false\n",[81,323,324,325,328,329,332,333,335,336,154,339,342],{},"The agent adds the endpoint to your sandbox with ",[121,326,327],{},"create_webhook",", at the function's public address. In Bolt, the address is listed under the database icon, in ",[95,330,331],{},"Server Functions",". Store the signing secret that ",[121,334,327],{}," returns as a secret named ",[121,337,338],{},"PYAS_WEBHOOK_SECRET",[156,340,28],{"href":341},"\u002Fwebhooks"," for the events Pyas sends.",[85,344,67],{"id":66},[88,346,347,350,356,367],{},[91,348,349],{},"In the Pyas dashboard, choose a plan and create a live key. Plans, payment and live keys are always done by you, in the dashboard.",[91,351,352,353,355],{},"Replace the ",[121,354,224],{}," secret with the live key.",[91,357,358,359,362,363,366],{},"The functions now use the signed-in Supabase user. People who aren't signed in get a ",[121,360,361],{},"401"," response with the code ",[121,364,365],{},"SIGN_IN_REQUIRED",", so your app needs sign-in before people connect a calendar.",[91,368,369,370,373],{},"Add your published address, such as ",[121,371,372],{},"https:\u002F\u002Fyour-app.bolt.host",", to the app's allowed origins, and add a live webhook endpoint in the dashboard.",[375,376,377],"style",{},"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":276,"searchDepth":379,"depth":379,"links":380},3,[381,382,383,384,385,386],{"id":51,"depth":318,"text":52},{"id":54,"depth":318,"text":55},{"id":57,"depth":318,"text":58},{"id":60,"depth":318,"text":61},{"id":63,"depth":318,"text":64},{"id":66,"depth":318,"text":67},"md",false,{},true,"\u002Fbolt","---\ntitle: Build with Bolt\ndescription: Add Google Calendar and Microsoft Outlook to a Bolt app. Connect the Pyas MCP server to Bolt, and its agent adds the server code, the secret and the connect button.\nsections:\n  - { id: add-pyas-to-bolt, title: Add Pyas to Bolt }\n  - { id: ask-for-what-you-want, title: Ask for what you want }\n  - { id: store-the-key, title: Store the key }\n  - { id: what-bolt-adds, title: What Bolt adds }\n  - { id: receive-webhooks, title: Receive webhooks }\n  - { id: go-live, title: Go live }\n---\n\n# Build with Bolt\n\n::lead\nBolt's agent can add Google Calendar and Microsoft Outlook to your app with Pyas. You connect the Pyas MCP server to Bolt once. The agent then gets the code for each task from Pyas, and you store a key as a secret. The key stays on the server, and the code works with the sandbox's sample people before anyone connects a real calendar.\n::\n\n## Add Pyas to Bolt\n\n1. On the Bolt home page, select the **+** icon in the chat box, then **Connectors**, then **Manage connectors**.\n2. Select **Custom MCP server**.\n3. For **Name**, enter `Pyas`. For **URL**, enter `https:\u002F\u002Fmcp.pyas.io\u002Fsandbox`. Set **Transport type** to **HTTP** and **Authentication** to **MCP OAuth**.\n4. Select **Connect**. Sign in to Pyas, choose your app, and select **Allow**. See [Sign in](\u002Fai-tools#sign-in) for what each permission allows.\n5. Turn the connector on for your project: select **+**, then **Connectors**, and turn on **Pyas**. To turn it on for every new project, use **Auto-enable for all projects**.\n\nOnly a project's owner can connect MCP servers to it. To remove Pyas, open **Manage connectors**, select **Pyas**, then the three dots, then **Delete**.\n\n## Ask for what you want\n\nAsk in plain words, for example:\n\n> Add a button that lets people connect their Google or Outlook calendar, and show their events for the next week.\n\nThe agent checks your setup with `setup_status` and gets the code for each task with `get_recipe`. It adds your app's preview address to the allowed origins with `update_app`, and creates a test key with `get_test_key`. You confirm the address in Pyas, from the link it gives you. Every response from Pyas ends with the next step, so the agent knows what to do next.\n\n## Store the key\n\nStore the test key as a secret named `PYAS_API_KEY`:\n\n- **In Bolt:** select the database icon, then **Secrets**. Enter the name and the key, and select **Save**. The project needs a database first, and only its owner can add secrets.\n- **In a project that uses your own Supabase project:** add it in the Supabase dashboard, under your project's **Edge Functions** secrets.\n\nDon't put the key in the chat or in a `VITE_` variable: those reach the browser. A test key works only in your app's [sandbox](\u002Fsandbox).\n\n## What Bolt adds\n\nThe code is written as Supabase Edge Functions, for projects that use Supabase:\n\n```text\nsupabase\u002Ffunctions\u002F_shared\u002Fpyas.ts                the Pyas client, shared by the functions\nsupabase\u002Ffunctions\u002Fpyas-connect-session\u002Findex.ts  creates a connect session for the button\nsupabase\u002Ffunctions\u002Fpyas-events\u002Findex.ts           the person's events for the next 7 days\nsupabase\u002Ffunctions\u002Fpyas-book\u002Findex.ts             books the first free 30 minutes tomorrow\nsrc\u002Fcomponents\u002FConnectCalendar.tsx                the \"Connect an account\" button\n```\n\nThe button imports the project's Supabase client, so the agent points that import at the file where your project creates it. Your pages call the functions with that client, for example `supabase.functions.invoke('pyas-events')`.\n\nWith a test key, the functions use the sandbox's sample person, so the events and booking work right away. The connect button shows a message from Pyas that connecting a real calendar requires a live key. This is expected.\n\n## Receive webhooks\n\nAsk the agent to receive Pyas webhooks. It adds `pyas-webhooks\u002Findex.ts` to your functions, and turns off the Supabase sign-in check for that function in `supabase\u002Fconfig.toml`, because the function verifies the signature of each delivery instead:\n\n```toml\n[functions.pyas-webhooks]\nverify_jwt = false\n```\n\nThe agent adds the endpoint to your sandbox with `create_webhook`, at the function's public address. In Bolt, the address is listed under the database icon, in **Server Functions**. Store the signing secret that `create_webhook` returns as a secret named `PYAS_WEBHOOK_SECRET`. See [Webhooks](\u002Fwebhooks) for the events Pyas sends.\n\n## Go live\n\n1. In the Pyas dashboard, choose a plan and create a live key. Plans, payment and live keys are always done by you, in the dashboard.\n2. Replace the `PYAS_API_KEY` secret with the live key.\n3. The functions now use the signed-in Supabase user. People who aren't signed in get a `401` response with the code `SIGN_IN_REQUIRED`, so your app needs sign-in before people connect a calendar.\n4. Add your published address, such as `https:\u002F\u002Fyour-app.bolt.host`, to the app's allowed origins, and add a live webhook endpoint in the dashboard.\n",{"title":47,"description":48},"bolt",null,"o41yxrm9mGVWPteYNYao7mgqCKKR5SbxtEScQEMNZL0",1794697270375]