Skip to content

cal_com addition#204

Merged
Mayank-MSJ-Singh merged 12 commits into
Klavis-AI:mainfrom
Mayank-MSJ-Singh:CAL-COM
Aug 17, 2025
Merged

cal_com addition#204
Mayank-MSJ-Singh merged 12 commits into
Klavis-AI:mainfrom
Mayank-MSJ-Singh:CAL-COM

Conversation

@Mayank-MSJ-Singh
Copy link
Copy Markdown
Collaborator

@Mayank-MSJ-Singh Mayank-MSJ-Singh commented Jul 28, 2025

Description

Cal.Com addition

Related issue

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New MCP feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please specify)

How has this been tested?

Cal.com API (v2) MCP Server – Notes

Docs:
https://cal.com/docs/api-reference/v2/introduction


Testing videos


Important

  • Didn’t test Stripe — had local Stripe issues.
  • cal_request_phone_verification_code and cal_verify_phone_code not tested.
    They also don’t work on Cal.com site itself, probably due to Indian numbers.
  • These tools are added in tools/ but commented out in server.py.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes

Comment thread mcp_servers/cal_com/MoreInfo.md Outdated
@@ -0,0 +1,20 @@
## Cal.com API (v2) MCP Server – Notes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this doc


## Available Tools

### Schedule Tools
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's only keep these tools which are more useful

Comment thread mcp_servers/cal_com/README.md Outdated
Comment on lines +49 to +62
### Verified Resources Tools
- `cal_request_email_verification_code`: Request email verification code
- `cal_verify_email_code`: Verify email with received code
- `cal_get_verified_emails`: List all verified emails
- `cal_get_verified_email_by_id`: Get specific verified email by ID
- `cal_get_verified_phones`: List verified phone numbers (paginated)
- `cal_get_verified_phone_by_id`: Get specific verified phone by ID

### Webhook Tools
- `cal_get_all_webhooks`: List all webhooks (paginated)
- `cal_create_webhook`: Create new webhook
- `cal_get_webhook`: Get specific webhook by ID
- `cal_update_webhook`: Update existing webhook
- `cal_delete_webhook`: Delete webhook by ID
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove these

Comment thread mcp_servers/cal_com/README.md Outdated
Comment on lines +64 to +68
## Installation

1. Clone this repository
2. Install dependencies:
```bash No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update

Comment thread mcp_servers/cal_com/requirements.txt Outdated
@@ -0,0 +1,29 @@
annotated-types==0.7.0
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update this file

}
}
},
"overrides": {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think this parameter can be removed? let me know your thoughts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for other tools

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is what I Know about Overrides -


Let’s say your normal hours are 9‑5, Mon‑Fri. But on one day, August 10, you wanna open extra from 10‑12.

You add an override:

{
  "date": "2025-08-10",
  "startTime": "10:00",
  "endTime": "12:00"
}

So for that date only, your availability changes to that slot.

It “overrides” your default schedule. That’s all it is.


So, If I look it from my side, it will be useful for me, but if you want I will remove that

@Mayank-MSJ-Singh
Copy link
Copy Markdown
Collaborator Author

@zihaolin96 have done some changes, you can look at it

test -
All Tools are working perfectly

mcp_check> python streamable_http_client.py http://localhost:5000/mcp
INFO:client:Initializing session
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:mcp.client.streamable_http:Negotiated protocol version: 2025-06-18
INFO:client:Initialized

MCP Client Started!
Type your queries, 'clear' to clear history, or 'quit' to exit.

Query: how many tools you have, list them
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 202 Accepted"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"

I have access to the following tools related to Cal.com scheduling management:

1. cal_get_all_schedules - Retrieve all schedules from Cal.com API.
2. cal_create_a_schedule - Create a new schedule in Cal.com.
3. cal_update_a_schedule - Update an existing schedule in Cal.com.
4. cal_get_default_schedule - Get the default schedule from Cal.com.
5. cal_get_schedule - Get a specific schedule by its ID.
6. cal_delete_a_schedule - Delete a schedule by its ID.

These tools allow managing schedules including creating, updating, retrieving, and deleting schedules on Cal.com.

Query: use first tool
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"

[Calling tool cal_get_all_schedules with args {}]
[Tool call result: {
  "status": "success",
  "data": [
    {
      "id": 730663,
      "ownerId": 723876,
      "name": "Catch up hours",
      "timeZone": "Europe/Rome",
      "availability": [
        {
          "days": [
            "Monday",
            "Tuesday"
          ],
          "startTime": "17:00",
          "endTime": "19:00"
        },
        {
          "days": [
            "Wednesday",
            "Thursday"
          ],
          "startTime": "16:00",
          "endTime": "20:00"
        }
      ],
      "isDefault": false,
      "overrides": [
        {
          "date": "2024-05-20",
          "startTime": "18:00",
          "endTime": "21:00"
        }
      ]
    },
    {
      "id": 730658,
      "ownerId": 723876,
      "name": "test",
      "timeZone": "Europe/Rome",
      "availability": [
        {
          "days": [
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday"
          ],
          "startTime": "09:00",
          "endTime": "17:00"
        }
      ],
      "isDefault": false,
      "overrides": []
    },
    {
      "id": 730662,
      "ownerId": 723876,
      "name": "Catch up hours",
      "timeZone": "Europe/Rome",
      "availability": [
        {
          "days": [
            "Monday",
            "Tuesday"
          ],
          "startTime": "17:00",
          "endTime": "19:00"
        },
        {
          "days": [
            "Wednesday",
            "Thursday"
          ],
          "startTime": "16:00",
          "endTime": "20:00"
        }
      ],
      "isDefault": false,
      "overrides": [
        {
          "date": "2024-05-20",
          "startTime": "18:00",
          "endTime": "21:00"
        }
      ]
    },
    {
      "id": 731593,
      "ownerId": 723876,
      "name": "Evening Schedule",
      "timeZone": "Asia/Kolkata",
      "availability": [
        {
          "days": [
            "Monday",
            "Tuesday"
          ],
          "startTime": "17:00",
          "endTime": "19:00"
        },
        {
          "days": [
            "Wednesday",
            "Thursday"
          ],
          "startTime": "16:00",
          "endTime": "20:00"
        }
      ],
      "isDefault": false,
      "overrides": [
        {
          "date": "2024-05-20",
          "startTime": "18:00",
          "endTime": "21:00"
        }
      ]
    },
    {
      "id": 783234,
      "ownerId": 723876,
      "name": "Updated newDefault Schedule",
      "timeZone": "America/Chicago",
      "availability": [
        {
          "days": [
            "Monday",
            "Tuesday",
            "Wednesday"
          ],
          "startTime": "10:00",
          "endTime": "16:00"
        }
      ],
      "isDefault": false,
      "overrides": []
    },
    {
      "id": 783255,
      "ownerId": 723876,
      "name": "My newDefault Schedule",
      "timeZone": "America/New_York",
      "availability": [
        {
          "days": [
            "Monday",
            "Tuesday",
            "Wednesday",
            "Thursday",
            "Friday"
          ],
          "startTime": "09:00",
          "endTime": "17:00"
        }
      ],
      "isDefault": true,
      "overrides": []
    },
    {
      "id": 216339,
      "ownerId": 723876,
      "name": "Working Hours",
      "timeZone": "America/Montreal",
      "availability": [
        {
          "days": [
            "Friday"
          ],
          "startTime": "07:30",
          "endTime": "16:00"
        }
      ],
      "isDefault": false,
      "overrides": []
    }
  ]
}]
Here are the schedules currently available:

1. **Catch up hours**
   - **ID**: 730663
   - **TimeZone**: Europe/Rome
   - **Availability**:
     - Monday, Tuesday: 17:00 - 19:00
     - Wednesday, Thursday: 16:00 - 20:00
   - **Overrides**:
     - May 20, 2024: 18:00 - 21:00

2. **test**
   - **ID**: 730658
   - **TimeZone**: Europe/Rome
   - **Availability**:
     - Monday to Friday: 09:00 - 17:00

3. **Catch up hours** (Duplicate)
   - **ID**: 730662
   - **TimeZone**: Europe/Rome
   - **Availability**:
     - Monday, Tuesday: 17:00 - 19:00
     - Wednesday, Thursday: 16:00 - 20:00
   - **Overrides**:
     - May 20, 2024: 18:00 - 21:00

4. **Evening Schedule**
   - **ID**: 731593
   - **TimeZone**: Asia/Kolkata
   - **Availability**:
     - Monday, Tuesday: 17:00 - 19:00
     - Wednesday, Thursday: 16:00 - 20:00
   - **Overrides**:
     - May 20, 2024: 18:00 - 21:00

5. **Updated newDefault Schedule**
   - **ID**: 783234
   - **TimeZone**: America/Chicago
   - **Availability**:
     - Monday to Wednesday: 10:00 - 16:00

6. **My newDefault Schedule**
   - **ID**: 783255
   - **TimeZone**: America/New_York
   - **Availability**:
     - Monday to Friday: 09:00 - 17:00
   - **Default**: Yes

7. **Working Hours**
   - **ID**: 216339
   - **TimeZone**: America/Montreal
   - **Availability**:
     - Friday: 07:30 - 16:00

If you need further details or wish to make changes, feel free to ask!

Query: create a schedule for 25 sept 2025 by name Birthday
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"

[Calling tool cal_create_a_schedule with args {'name': 'Birthday', 'timeZone': 'UTC', 'isDefault': False, 'availability': [], 'overrides': [{'date': '2025-09-25', 'startTime': '00:00', 'endTime': '23:59'}]}]
[Tool call result: {
  "status": "success",
  "data": {
    "id": 798247,
    "ownerId": 723876,
    "name": "Birthday",
    "timeZone": "UTC",
    "availability": [
      {
        "days": [
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday"
        ],
        "startTime": "09:00",
        "endTime": "17:00"
      }
    ],
    "isDefault": false,
    "overrides": [
      {
        "date": "2025-09-25",
        "startTime": "00:00",
        "endTime": "23:59"
      }
    ]
  }
}]
The schedule named "Birthday" has been created for September 25, 2025, with the following details:

- **ID**: 798247
- **TimeZone**: UTC
- **Overrides**:
  - September 25, 2025: 00:00 - 23:59

If you need any more adjustments or have further questions, feel free to ask!

Query: can you update this for Indian Time 
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"

[Calling tool cal_update_a_schedule with args {'schedule_id': 798247, 'timeZone': 'Asia/Kolkata'}]
[Tool call result: {
  "status": "success",
  "data": {
    "id": 798247,
    "ownerId": 723876,
    "name": "Birthday",
    "timeZone": "Asia/Kolkata",
    "availability": [
      {
        "days": [
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday"
        ],
        "startTime": "09:00",
        "endTime": "17:00"
      }
    ],
    "isDefault": false,
    "overrides": [
      {
        "date": "2025-09-25",
        "startTime": "00:00",
        "endTime": "23:59"
      }
    ]
  }
}]
The "Birthday" schedule has been updated to reflect Indian Standard Time (Asia/Kolkata). Here are the updated details:

- **ID**: 798247
- **TimeZone**: Asia/Kolkata
- **Overrides**:
  - September 25, 2025: 00:00 - 23:59 IST

Let me know if there is anything else you need!

Query: what is my default schedual
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"

[Calling tool cal_get_default_schedule with args {}]
[Tool call result: {
  "status": "success",
  "data": {
    "id": 783255,
    "ownerId": 723876,
    "name": "My newDefault Schedule",
    "timeZone": "America/New_York",
    "availability": [
      {
        "days": [
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday"
        ],
        "startTime": "09:00",
        "endTime": "17:00"
      }
    ],
    "isDefault": true,
    "overrides": []
  }
}]
Your default schedule is "My newDefault Schedule" with the following details:

- **ID**: 783255
- **TimeZone**: America/New_York
- **Availability**:
  - Monday to Friday: 09:00 - 17:00

This schedule doesn't have any specific overrides set. If you need further modifications or have additional questions, feel free to ask!

Query: so, can you give me id of my birthday schedule
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"

The ID of your "Birthday" schedule is 798247. If you need any other information or assistance with this schedule, just let me know!

Query: use id tool and get details of this
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"

[Calling tool cal_get_schedule with args {'schedule_id': 798247}]
[Tool call result: {
  "status": "success",
  "data": {
    "id": 798247,
    "ownerId": 723876,
    "name": "Birthday",
    "timeZone": "Asia/Kolkata",
    "availability": [
      {
        "days": [
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday"
        ],
        "startTime": "09:00",
        "endTime": "17:00"
      }
    ],
    "isDefault": false,
    "overrides": [
      {
        "date": "2025-09-25",
        "startTime": "00:00",
        "endTime": "23:59"
      }
    ]
  }
}]
Here are the details for your "Birthday" schedule:

- **ID**: 798247
- **TimeZone**: Asia/Kolkata
- **Availability**:
  - Monday to Friday: 09:00 - 17:00
- **Overrides**:
  - September 25, 2025: 00:00 - 23:59 IST

If you have any more questions or need further modifications, just let me know!

Query: delete this schedule
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp "HTTP/1.1 307 Temporary Redirect"
INFO:httpx:HTTP Request: POST http://localhost:5000/mcp/ "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"

[Calling tool cal_delete_a_schedule with args {'schedule_id': 798247}]
[Tool call result: {
  "status": "success"
}]
The "Birthday" schedule with ID 798247 has been successfully deleted. If there's anything else you need, feel free to ask!

Query: quit

Copy link
Copy Markdown
Contributor

@zihaolin96 zihaolin96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! feel free to merge after resolve conflicts! Thanks!

@Mayank-MSJ-Singh Mayank-MSJ-Singh merged commit 0ee3ec6 into Klavis-AI:main Aug 17, 2025
1 check passed
@Mayank-MSJ-Singh Mayank-MSJ-Singh deleted the CAL-COM branch August 17, 2025 17:40
udaykakade25 pushed a commit to udaykakade25/klavis that referenced this pull request Sep 10, 2025
LLiuZheng pushed a commit that referenced this pull request Jan 16, 2026
zihaolin96 pushed a commit that referenced this pull request Feb 5, 2026
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants