[{"data":1,"prerenderedAt":506},["ShallowReactive",2],{"navigation":3,"page:\u002Fclaude-code":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","Claude Code","Add the Pyas MCP server to Claude Code with one command, sign in to Pyas, and let Claude set up your app, write the integration and check your sandbox while you code.",[50,53,56,59,62,65],{"id":51,"title":52},"add-pyas-to-claude-code","Add Pyas to Claude Code",{"id":54,"title":55},"sign-in","Sign in",{"id":57,"title":58},"use-it-while-you-code","Use it while you code",{"id":60,"title":61},"choose-what-needs-your-approval","Choose what needs your approval",{"id":63,"title":64},"live-calendars","Live calendars",{"id":66,"title":67},"disconnect","Disconnect",{"id":69,"title":47,"body":70,"description":48,"extension":497,"hero":498,"meta":499,"navigation":500,"path":501,"rawbody":502,"sections":49,"seo":503,"stem":76,"v1":504,"__hash__":505},"docs\u002Fclaude-code.md",{"type":71,"value":72,"toc":489},"minimark",[73,77,84,98,101,179,182,188,190,193,207,220,222,225,231,254,259,264,275,281,283,294,305,361,364,366,369,413,420,430,432,435,463,473,485],[74,75,47],"h1",{"id":76},"claude-code",[78,79,80],"lead",{},[81,82,83],"p",{},"Add Pyas to Claude Code, and Claude can set up your Pyas app, write the code that connects calendars, and check your sandbox while you code. You add Pyas with one command and sign in. There is nothing to install and no key to copy.",[81,85,86,87,91,92,97],{},"Start with the sandbox address, ",[88,89,90],"code",{},"https:\u002F\u002Fmcp.pyas.io\u002Fsandbox",". It works in your app's ",[93,94,96],"a",{"href":95},"\u002Fsandbox","sandbox",", on sample people, calendars and events, so nothing you try reaches a real calendar.",[99,100,52],"h2",{"id":51},[102,103,104,158],"ol",{},[105,106,107,108,151,154,157],"li",{},"In a terminal, run:",[109,110,115],"pre",{"className":111,"code":112,"language":113,"meta":114,"style":114},"language-bash shiki shiki-themes css-variables","claude mcp add --transport http --scope user pyas-sandbox https:\u002F\u002Fmcp.pyas.io\u002Fsandbox\n","bash","",[88,116,117],{"__ignoreMap":114},[118,119,122,126,130,133,136,139,142,145,148],"span",{"class":120,"line":121},"line",1,[118,123,125],{"class":124},"s1IGz","claude",[118,127,129],{"class":128},"sTB4W"," mcp",[118,131,132],{"class":128}," add",[118,134,135],{"class":128}," --transport",[118,137,138],{"class":128}," http",[118,140,141],{"class":128}," --scope",[118,143,144],{"class":128}," user",[118,146,147],{"class":128}," pyas-sandbox",[118,149,150],{"class":128}," https:\u002F\u002Fmcp.pyas.io\u002Fsandbox\n",[152,153],"br",{},[88,155,156],{},"--scope user"," adds Pyas to every project on your computer. Leave it out to add Pyas to the current project only.",[105,159,160,161,164,165,169,170,173,174,178],{},"Start Claude Code, run ",[88,162,163],{},"\u002Fmcp",", select ",[166,167,168],"strong",{},"pyas-sandbox",", then select ",[166,171,172],{},"Authenticate",". Your browser opens to ",[93,175,177],{"href":176},"#sign-in","sign in",".",[81,180,181],{},"If your browser doesn't open, copy the address that Claude Code shows and open it yourself.",[81,183,184,185,187],{},"In the Claude Code extension for VS Code, type ",[88,186,163],{}," in the chat panel to add the server and sign in from there.",[99,189,55],{"id":54},[81,191,192],{},"When you authenticate, your browser opens the Pyas dashboard:",[102,194,195,198,201],{},[105,196,197],{},"Sign in, or create an account.",[105,199,200],{},"Choose the app that Claude Code works with.",[105,202,203,204,178],{},"Check what Claude Code asks for, and select ",[166,205,206],{},"Allow",[81,208,209,210,212,213,215,216,219],{},"Go back to the terminal. ",[88,211,163],{}," now shows ",[166,214,168],{}," as connected, with its tools. See ",[93,217,55],{"href":218},"\u002Fai-tools#sign-in"," for what each permission allows.",[99,221,58],{"id":57},[81,223,224],{},"Ask in plain words, in the project you're working on:",[226,227,228],"blockquote",{},[81,229,230],{},"Set up Pyas in this app so people can connect their Google or Outlook calendar.",[81,232,233,234,237,238,241,242,245,246,249,250,253],{},"Claude checks your app's setup with ",[88,235,236],{},"setup_status",", gets the code for your stack with ",[88,239,240],{},"get_recipe",", and creates a test key with ",[88,243,244],{},"get_test_key",". It tells you where to store the key, such as ",[88,247,248],{},"PYAS_API_KEY"," in your ",[88,251,252],{},".env"," file. Recipes cover Next.js and Express, and the AI app builders.",[226,255,256],{},[81,257,258],{},"What's on Avery's calendar tomorrow?",[226,260,261],{},[81,262,263],{},"My last request to Pyas failed. Why?",[81,265,266,267,270,271,274],{},"The sandbox's sample people, such as Avery Brooks and Riley Chen, have calendars with a week of events. For a failed request, Claude looks it up with ",[88,268,269],{},"get_request"," and ",[88,272,273],{},"explain_error",", from its trace ID.",[81,276,277,278,280],{},"Every request Claude Code makes is on the ",[166,279,43],{}," page in the dashboard, marked with the tool that made it.",[99,282,61],{"id":60},[81,284,285,286,289,290,293],{},"The first time Claude uses a Pyas tool, Claude Code asks you. Select ",[166,287,288],{},"Yes"," to allow it once, or ",[166,291,292],{},"Yes, and don't ask again"," to allow that tool from then on.",[81,295,296,297,300,301,304],{},"To allow every Pyas tool in the sandbox without being asked, add a rule to ",[88,298,299],{},".claude\u002Fsettings.json"," in your project, or to ",[88,302,303],{},"~\u002F.claude\u002Fsettings.json",":",[109,306,310],{"className":307,"code":308,"language":309,"meta":114,"style":114},"language-json shiki shiki-themes css-variables","{\n  \"permissions\": {\n    \"allow\": [\"mcp__pyas-sandbox__*\"]\n  }\n}\n","json",[88,311,312,318,331,349,355],{"__ignoreMap":114},[118,313,314],{"class":120,"line":121},[118,315,317],{"class":316},"sqSWz","{\n",[118,319,321,325,328],{"class":120,"line":320},2,[118,322,324],{"class":323},"sag7P","  \"permissions\"",[118,326,304],{"class":327},"sEEt9",[118,329,330],{"class":316}," {\n",[118,332,334,337,339,342,346],{"class":120,"line":333},3,[118,335,336],{"class":323},"    \"allow\"",[118,338,304],{"class":327},[118,340,341],{"class":316}," [",[118,343,345],{"class":344},"sk1Au","\"mcp__pyas-sandbox__*\"",[118,347,348],{"class":316},"]\n",[118,350,352],{"class":120,"line":351},4,[118,353,354],{"class":316},"  }\n",[118,356,358],{"class":120,"line":357},5,[118,359,360],{"class":316},"}\n",[81,362,363],{},"Don't add a rule like this for the live server. Keep being asked before Claude changes a live calendar.",[99,365,64],{"id":63},[81,367,368],{},"To work on the real calendars that people connected to your app, add a second server:",[102,370,371,401],{},[105,372,373,374],{},"Run:",[109,375,377],{"className":111,"code":376,"language":113,"meta":114,"style":114},"claude mcp add --transport http --scope user pyas-live https:\u002F\u002Fmcp.pyas.io\n",[88,378,379],{"__ignoreMap":114},[118,380,381,383,385,387,389,391,393,395,398],{"class":120,"line":121},[118,382,125],{"class":124},[118,384,129],{"class":128},[118,386,132],{"class":128},[118,388,135],{"class":128},[118,390,138],{"class":128},[118,392,141],{"class":128},[118,394,144],{"class":128},[118,396,397],{"class":128}," pyas-live",[118,399,400],{"class":128}," https:\u002F\u002Fmcp.pyas.io\n",[105,402,403,404,164,406,409,410,412],{},"In ",[88,405,163],{},[166,407,408],{},"pyas-live",", then ",[166,411,172],{},". When you sign in, choose whether Claude may only read live calendars, or change them too.",[81,414,415,416,419],{},"Before Claude changes a live calendar, you confirm the change in Pyas, from a link that Claude gives you. See ",[93,417,64],{"href":418},"\u002Fai-tools#live-calendars"," for how that works and who can confirm.",[81,421,422,423,164,425,409,427,178],{},"While you work in the sandbox, turn the live server off: run ",[88,424,163],{},[166,426,408],{},[166,428,429],{},"Disable",[99,431,67],{"id":66},[81,433,434],{},"To sign Claude Code out of Pyas, run:",[109,436,438],{"className":111,"code":437,"language":113,"meta":114,"style":114},"claude mcp logout pyas-sandbox\nclaude mcp remove pyas-sandbox\n",[88,439,440,452],{"__ignoreMap":114},[118,441,442,444,446,449],{"class":120,"line":121},[118,443,125],{"class":124},[118,445,129],{"class":128},[118,447,448],{"class":128}," logout",[118,450,451],{"class":128}," pyas-sandbox\n",[118,453,454,456,458,461],{"class":120,"line":320},[118,455,125],{"class":124},[118,457,129],{"class":128},[118,459,460],{"class":128}," remove",[118,462,451],{"class":128},[81,464,465,468,469,472],{},[88,466,467],{},"logout"," signs out, and ",[88,470,471],{},"remove"," deletes the server from Claude Code.",[81,474,475,476,479,480,482,483,178],{},"To stop Claude Code from Pyas's side, open your profile in the Pyas dashboard. ",[166,477,478],{},"Connected tools"," lists Claude Code with when it was last used, and ",[166,481,67],{}," stops it immediately. To use it again, authenticate again in ",[88,484,163],{},[486,487,488],"style",{},"html pre.shiki code .s1IGz, html code.shiki .s1IGz{--shiki-default:var(--shiki-token-function)}html pre.shiki code .sTB4W, html code.shiki .sTB4W{--shiki-default:var(--shiki-token-string)}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 pre.shiki code .sqSWz, html code.shiki .sqSWz{--shiki-default:var(--shiki-foreground)}html pre.shiki code .sag7P, html code.shiki .sag7P{--shiki-default:var(--shiki-token-keyword)}html pre.shiki code .sEEt9, html code.shiki .sEEt9{--shiki-default:var(--shiki-token-punctuation)}html pre.shiki code .sk1Au, html code.shiki .sk1Au{--shiki-default:var(--shiki-token-string-expression)}",{"title":114,"searchDepth":333,"depth":333,"links":490},[491,492,493,494,495,496],{"id":51,"depth":320,"text":52},{"id":54,"depth":320,"text":55},{"id":57,"depth":320,"text":58},{"id":60,"depth":320,"text":61},{"id":63,"depth":320,"text":64},{"id":66,"depth":320,"text":67},"md",false,{},true,"\u002Fclaude-code","---\ntitle: Claude Code\ndescription: Add the Pyas MCP server to Claude Code with one command, sign in to Pyas, and let Claude set up your app, write the integration and check your sandbox while you code.\nsections:\n  - { id: add-pyas-to-claude-code, title: Add Pyas to Claude Code }\n  - { id: sign-in, title: Sign in }\n  - { id: use-it-while-you-code, title: Use it while you code }\n  - { id: choose-what-needs-your-approval, title: Choose what needs your approval }\n  - { id: live-calendars, title: Live calendars }\n  - { id: disconnect, title: Disconnect }\n---\n\n# Claude Code\n\n::lead\nAdd Pyas to Claude Code, and Claude can set up your Pyas app, write the code that connects calendars, and check your sandbox while you code. You add Pyas with one command and sign in. There is nothing to install and no key to copy.\n::\n\nStart with the sandbox address, `https:\u002F\u002Fmcp.pyas.io\u002Fsandbox`. It works in your app's [sandbox](\u002Fsandbox), on sample people, calendars and events, so nothing you try reaches a real calendar.\n\n## Add Pyas to Claude Code\n\n1. In a terminal, run:\n\n   ```bash\n   claude mcp add --transport http --scope user pyas-sandbox https:\u002F\u002Fmcp.pyas.io\u002Fsandbox\n   ```\n\n   `--scope user` adds Pyas to every project on your computer. Leave it out to add Pyas to the current project only.\n\n2. Start Claude Code, run `\u002Fmcp`, select **pyas-sandbox**, then select **Authenticate**. Your browser opens to [sign in](#sign-in).\n\nIf your browser doesn't open, copy the address that Claude Code shows and open it yourself.\n\nIn the Claude Code extension for VS Code, type `\u002Fmcp` in the chat panel to add the server and sign in from there.\n\n## Sign in\n\nWhen you authenticate, your browser opens the Pyas dashboard:\n\n1. Sign in, or create an account.\n2. Choose the app that Claude Code works with.\n3. Check what Claude Code asks for, and select **Allow**.\n\nGo back to the terminal. `\u002Fmcp` now shows **pyas-sandbox** as connected, with its tools. See [Sign in](\u002Fai-tools#sign-in) for what each permission allows.\n\n## Use it while you code\n\nAsk in plain words, in the project you're working on:\n\n> Set up Pyas in this app so people can connect their Google or Outlook calendar.\n\nClaude checks your app's setup with `setup_status`, gets the code for your stack with `get_recipe`, and creates a test key with `get_test_key`. It tells you where to store the key, such as `PYAS_API_KEY` in your `.env` file. Recipes cover Next.js and Express, and the AI app builders.\n\n> What's on Avery's calendar tomorrow?\n\n> My last request to Pyas failed. Why?\n\nThe sandbox's sample people, such as Avery Brooks and Riley Chen, have calendars with a week of events. For a failed request, Claude looks it up with `get_request` and `explain_error`, from its trace ID.\n\nEvery request Claude Code makes is on the **Logs** page in the dashboard, marked with the tool that made it.\n\n## Choose what needs your approval\n\nThe first time Claude uses a Pyas tool, Claude Code asks you. Select **Yes** to allow it once, or **Yes, and don't ask again** to allow that tool from then on.\n\nTo allow every Pyas tool in the sandbox without being asked, add a rule to `.claude\u002Fsettings.json` in your project, or to `~\u002F.claude\u002Fsettings.json`:\n\n```json\n{\n  \"permissions\": {\n    \"allow\": [\"mcp__pyas-sandbox__*\"]\n  }\n}\n```\n\nDon't add a rule like this for the live server. Keep being asked before Claude changes a live calendar.\n\n## Live calendars\n\nTo work on the real calendars that people connected to your app, add a second server:\n\n1. Run:\n\n   ```bash\n   claude mcp add --transport http --scope user pyas-live https:\u002F\u002Fmcp.pyas.io\n   ```\n\n2. In `\u002Fmcp`, select **pyas-live**, then **Authenticate**. When you sign in, choose whether Claude may only read live calendars, or change them too.\n\nBefore Claude changes a live calendar, you confirm the change in Pyas, from a link that Claude gives you. See [Live calendars](\u002Fai-tools#live-calendars) for how that works and who can confirm.\n\nWhile you work in the sandbox, turn the live server off: run `\u002Fmcp`, select **pyas-live**, then **Disable**.\n\n## Disconnect\n\nTo sign Claude Code out of Pyas, run:\n\n```bash\nclaude mcp logout pyas-sandbox\nclaude mcp remove pyas-sandbox\n```\n\n`logout` signs out, and `remove` deletes the server from Claude Code.\n\nTo stop Claude Code from Pyas's side, open your profile in the Pyas dashboard. **Connected tools** lists Claude Code with when it was last used, and **Disconnect** stops it immediately. To use it again, authenticate again in `\u002Fmcp`.\n",{"title":47,"description":48},null,"QL2ELvHvdYHO0KiMr1ltfyBzwmeW938ElzwbZRXq1-s",1794697271062]