Codex

Add Pyas to Codex, and it can set up your Pyas app, write the code that connects calendars, and check your sandbox while you code. You add Pyas by its address 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.

The Codex CLI, the Codex IDE extension and Codex in the ChatGPT desktop app share their settings, so you add Pyas once for all three.

Add Pyas to Codex

In a terminal, run:

codex mcp add pyas-sandbox --url https://mcp.pyas.io/sandbox
codex mcp login pyas-sandbox

login opens your browser to sign in. Codex doesn't ask you to sign in by itself, so run it after you add the server.

Or add it without the terminal:

  • In the IDE extension: open the gear menu, then MCP servers, and select Add server. Choose Streamable HTTP, enter the address, and restart the extension. Then select Authenticate next to the server.
  • In the ChatGPT desktop app: open Settings, then MCP servers, and select Add server. Enter the address, restart the app, then select Authenticate next to the server.
  • In ~/.codex/config.toml:
    [mcp_servers.pyas-sandbox]
    url = "https://mcp.pyas.io/sandbox"
    

Sign in

When you sign in, your browser opens the Pyas dashboard:

  1. Sign in, or create an account.
  2. Choose the app that Codex works with.
  3. Check what Codex asks for, and select Allow.

Go back to Codex. In the CLI, /mcp lists Pyas's 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.

Codex 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, Codex looks it up with get_request and explain_error, from its trace ID.

Every request Codex makes is on the Logs page in the dashboard, marked with the tool that made it.

Choose what needs your approval

Each Pyas tool says whether it only reads. To let Codex use the tools that read without asking, and ask you before every change, set writes in ~/.codex/config.toml:

[mcp_servers.pyas-sandbox]
url = "https://mcp.pyas.io/sandbox"
default_tools_approval_mode = "writes"

Use the same setting for the live server.

Live calendars

To work on the real calendars that people connected to your app, add a second server:

codex mcp add pyas-live --url https://mcp.pyas.io
codex mcp login pyas-live

When you sign in, choose whether Codex may only read live calendars, or change them too.

Before Codex changes a live calendar, you confirm the change in Pyas, from a link that Codex gives you. See Live calendars for how that works and who can confirm.

While you work in the sandbox, turn the live server off. Add enabled = false under [mcp_servers.pyas-live] in ~/.codex/config.toml, and remove it when you need live calendars.

Disconnect

To sign Codex out of Pyas, run:

codex mcp logout pyas-sandbox
codex mcp remove pyas-sandbox

logout signs out, and remove deletes the server from Codex.

To stop Codex from Pyas's side, open your profile in the Pyas dashboard. Connected tools lists Codex with when it was last used, and Disconnect stops it immediately. To use it again, run codex mcp login again.