Using API v1? See what changes in v2, or the v1 docs
Claude Code
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.
Start with the sandbox address, https://mcp.pyas.io/sandbox. It works in your app's sandbox, on sample people, calendars and events, so nothing you try reaches a real calendar.
Add Pyas to Claude Code
- In a terminal, run:
claude mcp add --transport http --scope user pyas-sandbox https://mcp.pyas.io/sandbox--scope useradds Pyas to every project on your computer. Leave it out to add Pyas to the current project only. - Start Claude Code, run
/mcp, select pyas-sandbox, then select Authenticate. Your browser opens to sign in.
If your browser doesn't open, copy the address that Claude Code shows and open it yourself.
In the Claude Code extension for VS Code, type /mcp in the chat panel to add the server and sign in from there.
Sign in
When you authenticate, your browser opens the Pyas dashboard:
- Sign in, or create an account.
- Choose the app that Claude Code works with.
- Check what Claude Code asks for, and select Allow.
Go back to the terminal. /mcp now shows pyas-sandbox as connected, with its tools. See Sign in for what each permission allows.
Use it while you code
Ask in plain words, in the project you're working on:
Set up Pyas in this app so people can connect their Google or Outlook calendar.
Claude 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.
What's on Avery's calendar tomorrow?
My last request to Pyas failed. Why?
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 get_request and explain_error, from its trace ID.
Every request Claude Code makes is on the Logs page in the dashboard, marked with the tool that made it.
Choose what needs your approval
The 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.
To allow every Pyas tool in the sandbox without being asked, add a rule to .claude/settings.json in your project, or to ~/.claude/settings.json:
{
"permissions": {
"allow": ["mcp__pyas-sandbox__*"]
}
}
Don't add a rule like this for the live server. Keep being asked before Claude changes a live calendar.
Live calendars
To work on the real calendars that people connected to your app, add a second server:
- Run:
claude mcp add --transport http --scope user pyas-live https://mcp.pyas.io - In
/mcp, select pyas-live, then Authenticate. When you sign in, choose whether Claude may only read live calendars, or change them too.
Before Claude changes a live calendar, you confirm the change in Pyas, from a link that Claude gives you. See Live calendars for how that works and who can confirm.
While you work in the sandbox, turn the live server off: run /mcp, select pyas-live, then Disable.
Disconnect
To sign Claude Code out of Pyas, run:
claude mcp logout pyas-sandbox
claude mcp remove pyas-sandbox
logout signs out, and remove deletes the server from Claude Code.
To 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 /mcp.