# Cal.com Integration

Connect one or more **Cal.com** accounts so your AI agents can check availability and book meetings on your behalf. Karmaflow.ai talks to Cal.com through Cal.com's **hosted MCP server**, and handles the OAuth connection and token refresh for you — you authorize once per account and Karmaflow.ai keeps the connection alive.

## How It Works

Cal.com exposes its scheduling tools through a Model Context Protocol (MCP) server at `https://mcp.cal.com/mcp`. Karmaflow.ai connects to it using **OAuth 2.1** (authorization-code flow with PKCE and dynamic client registration), so there are no API keys to copy or rotate.

Once an account is connected and pointed at an agent, that agent can call Cal.com's scheduling tools mid-conversation — for example to look up open slots and create a booking.

## Connecting an Account

1. Navigate to **Settings > Cal.com**.
2. Under **Add a Cal.com account**, give the account a descriptive name (e.g. *Sales team*, *Founder calendar*) and click **Add account**. The account is created in a disconnected state.
3. On the new account card, click **Connect**. You'll be redirected to Cal.com to authorize Karmaflow.ai, then sent back here.
4. When the card shows a green **Connected** badge, the account is ready to use.

To re-authorize later (for example if access was revoked on Cal.com's side), use **Reconnect** on the account card.

## Multiple Accounts per Workspace

You can connect as many Cal.com accounts as you need — one per team, calendar, or brand. Each account is independent, with its own connection, OAuth scopes, and tokens.

- **Default account** — the first account you add is marked **Default**. Use **Set default** on any other connected account to change it. The default is used whenever an agent isn't pinned to a specific account.
- **Scopes** — each account card shows the OAuth scopes it was authorized with. Leave blank to use Cal.com's defaults.
- **Account ID** — each card displays its Account ID. You'll use this (via a dropdown, not by copying it) when wiring an MCP server to a specific account.

## Making an Account Available to an Agent

Connecting an account authorizes it, but you still tell agents which account to use by adding a matching **MCP server**:

1. Go to **Settings > MCP Servers** and click **+ Add Server**.
2. Set the **URL** to `https://mcp.cal.com/mcp`.
3. Set **Application** to **Cal.com**.
4. Choose the **Cal.com Account** the server should use from the dropdown. If you leave it unset, the server falls back to your **default** connected account (or the first connected account if no default is set).
5. Save, then attach the MCP server to the agents that should be able to schedule.

Because the **Application** is set to **Cal.com**, Karmaflow.ai automatically injects the right OAuth credentials for the chosen account on every request — you don't add an API key on the MCP server itself.

## Disconnect vs. Remove

- **Disconnect** revokes the stored tokens but keeps the named account row, so you can **Reconnect** it later without re-creating it.
- **Remove** deletes the account entirely. Any MCP server that was pinned to it falls back to the default account.

## Notes

- Token refresh is automatic; you do not need to reconnect on a schedule.
- For self-hosted or pre-registered OAuth clients, an administrator can supply a `CALCOM_OAUTH_CLIENT_ID` (and optional secret) via environment configuration; otherwise Karmaflow.ai registers a client dynamically.

See the [MCP Servers](/help/integrations/mcp-servers) article for more on how agents use external MCP tools, and the [Cal.com MCP documentation](https://cal.com/docs/mcp-server) for the underlying tool reference.

<!-- SCREENSHOT: calcom-settings.png — Cal.com integration page with connected accounts -->
