Skip to main content
Glama
README.md
# Cal.com MCP Server

Exposes Cal.com scheduling tools to AI agents via the **Model Context Protocol (MCP)**.

## Tools Available

| Tool | Description |
|------|-------------|
| `list_event_types` | List all available event types (meeting types) |
| `get_availability` | Get free/busy slots for a date range |
| `create_booking` | Create a new booking/appointment |
| `cancel_booking` | Cancel an existing booking |
| `reschedule_booking` | Move a booking to a new time slot |
| `list_bookings` | List bookings with status filters |

## Setup

### 1. Configure environment
```bash
cp .env.example .env
# Edit .env and set your CAL_API_KEY
```

### 2. Install dependencies
```bash
npm install
```

### 3. Run tests
```bash
npm test
```

### 4. Start the server
```bash
npm start
# Server will run at http://localhost:3000
```

## Transport Options

### Streamable HTTP (recommended for production)
```
POST http://localhost:3000/mcp
GET  http://localhost:3000/mcp
```

### SSE (Server-Sent Events)
```
GET  http://localhost:3000/sse          # Open SSE stream
POST http://localhost:3000/sse-messages # Send messages
```

### stdio (local testing)
```bash
TRANSPORT=stdio npm start
```

## Connecting to Claude

Add to your MCP client config:
```json
{
  "mcpServers": {
    "calcom": {
      "url": "http://localhost:3000/mcp",
      "transport": "streamable-http"
    }
  }
}
```

## API Endpoints

- `GET /health` — Health check
- `GET /` — Server manifest (lists tools and capabilities)
- `POST /mcp` — MCP Streamable HTTP endpoint
- `GET /sse` — SSE connection
- `POST /sse-messages` — SSE message endpoint

## Environment Variables

| Variable | Description | Default |
|----------|-------------|---------|
| `CAL_API_KEY` | Cal.com API key (required) | — |
| `CAL_API_BASE` | Cal.com API base URL | `https://api.cal.com/v1` |
| `PORT` | HTTP server port | `3000` |
| `TRANSPORT` | `http` or `stdio` | `http` |
| `LOG_LEVEL` | `debug`, `info`, `warn`, `error` | `info` |