Can I connect Calendly via composio mcp with LiveK...
# ask-ai
b
Can I connect Calendly via composio mcp with LiveKit
✅ 1
t
Thanks for reaching out, Samuel. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I can help with that. When you say "connect Calendly via Composio MCP with LiveKit," which specific outcome do you want? A few examples to pick from or clarify: • Automatically create a LiveKit room when a Calendly event is booked. • Include a LiveKit join link in Calendly confirmation emails or calendar invites. • Start a LiveKit session at the scheduled time using Composio MCP as the orchestrator. • Pass attendee metadata from Calendly into LiveKit (e.g., participant names, roles). • Something else — please describe the end-to-end flow you need. Also please tell me: • Do you control the Composio MCP instance (self-hosted) or is it a managed service? • Do you have developer access to Calendly webhooks and Composio MCP automation (API keys)? • Any constraints (language, platform, security/SAML requirements)? With those details I’ll outline specific integration approaches and next steps. , with interactive elements
b
i want to schedule an appointment with mcp
t
Thanks — I can help schedule an appointment with Composio MCP. Quick clarifying questions so I give the right steps: • Do you want MCP to create the appointment from a Calendly booking, or do you want MCP itself to present a scheduling UI (no Calendly)? • Do you control the Composio MCP instance (self-hosted) and have API/webhook access to it? • Do you have Calendly webhook and API access if Calendly is involved? • What should happen when the appointment is scheduled? (e.g., create a LiveKit room, send join links, add calendar invite, pass attendee metadata) Answering those will let me outline an exact integration flow and the API/webhook calls you’ll need. Sources: Model Context Protocol (MCP) | LiveKit Documentation, with interactive elements
b
Am building an PA agent. So I need to have appointment system in place so calendaly comes in.
t
Thanks — this is clear: you’re building a PA agent and want Calendly bookings to create/schedule appointments via Composio MCP (and ultimately tie into LiveKit). I can help you design that flow and next steps. A few quick clarifying questions so I give an exact implementation plan: • Do you want Calendly to be the booking UI (Calendly webhooks → MCP → agent), or should the PA agent present its own scheduling UI and call Calendly APIs? • Do you control the Composio MCP instance (have admin/API access) and can deploy/tool it to expose scheduling tools to the agent? • Do you have Calendly API/webhook credentials ready? • After scheduling, what must happen automatically? (e.g., create LiveKit room + send join link, add calendar invite, update attendee metadata) If you confirm those, I’ll provide a concrete integration pattern with required webhook/API calls, a sample agent tool layout (MCP tool + function tool), and the order of operations to create a LiveKit meeting when a Calendly event occurs. Sources: The ReAct Pattern for Voice Agents and How AI Agents Think, Act, and Respon... | Model Context Protocol (MCP) | LiveKit Documentation | Agent Builder | LiveKit Documentation, with interactive elements
b
i need methodolgy to integrate to mcp as functoin tool for livekit
t
Thanks — I’ll outline a concise methodology to implement Calendly as a function tool (exposed via Composio MCP) so your LiveKit PA agent can schedule appointments. What I’m responding to: you asked for a methodology to integrate Calendly as a function tool in MCP for use by a LiveKit agent. Core approach (high level) • Expose Calendly operations (check availability, create event, fetch event details) as tools on a Composio MCP server. • Connect that MCP server to your LiveKit agent via an MCPToolset so the agent can call those tools during its reasoning loop. • Handle authentication and secrets securely, return compact tool results, and coordinate post-booking actions (create LiveKit room, send links, update calendars). Step-by-step methodology 1) Define required Calendly operations • Check availability (for a given organizer and time window). • Create event (book a slot, pass invitee info and metadata). • Retrieve event details (to get invitee email, start/end time, join notes). • (Optional) Cancel or modify events. 2) Build a thin MCP server wrapper around Calendly APIs • Implement HTTP endpoints or MCP tool descriptors that map to the operations above. • Each tool should accept a well-defined JSON schema (e.g., organizer_id, duration, preferred_times, invitee:{name,email}, metadata). • Return structured JSON: success flag, event_id, start/end ISO timestamps, join_url, and any error message. 3) Authentication & security • Store Calendly API key as a secret (environment variable or secrets manager). • The MCP server uses
Authorization: Bearer <CALENDLY_API_KEY>
when calling Calendly. • Require JWT or API-key authentication for the MCP server itself if it’s reachable externally. • Limit exposed tools with
allowed_tools
or toolset-level filtering when you connect to the agent. 4) Implement tool behavior & resilience • Use idempotency for create-event calls (prevent double-booking) — include a client-generated idempotency key in metadata when calling Calendly. • Validate and normalize timezones; accept ISO 8601 times and convert to organizer timezone before booking. • Implement retries with exponential backoff for network calls and surface clear errors for rate-limit responses. 5) Connect MCP to your LiveKit agent • Use
MCPServerHTTP
(or
MCPServerStdio
if running locally) to connect the Composio MCP server to your agent. • Pass authentication headers in
headers
when constructing the MCP connection. • Optionally filter tools with
allowed_tools
or
toolset.filter_tools()
to expose only scheduling-related tools. 6) Expose Calendly as a function tool fallback (optional) • In addition to MCP, implement a local
@function_tool
wrapper that can call your MCP endpoints or Calendly directly. This is useful for testing or when MCP is unreachable. • Ensure the same input/output schema so the agent logic stays consistent. 7) Agent orchestration and post-booking actions • Agent calls the availability tool → shows options to user → agent calls create-event tool. • On success, agent should: ◦ Create a LiveKit room (call LiveKit server API) and generate a join link/token. ◦ Add the LiveKit join link and event details to the Calendly event (if Calendly supports custom invitee notes) or send a follow-up email/calendar invite. ◦ Persist mapping: event_id_ ↔️ _LiveKit_room_id for later lookups (e.g., on join or cancellation hooks). • Subscribe to Calendly webhooks (event.created, canceled) and forward webhook payloads to your MCP server or agent session so the agent can react to changes. 8) Webhooks & synchronization • Configure Calendly webhooks to notify your MCP server or an internal webhook endpoint. • On webhook receive: ◦ Verify signature/auth. ◦ Update your internal store and notify the LiveKit agent (via a tool call or event) to update the session state or resend links. Code sketch (conceptual) • Implement MCP tools that wrap Calendly HTTP calls (pseudo):
Copy code
Tool: check_availability
Input: {organizer_id, start_iso, end_iso, duration, timezone}
Output: {available_slots: [{start_iso,end_iso}], errors}

Tool: create_event
Input: {organizer_id, slot_start_iso, invitee:{name,email}, metadata, idempotency_key}
Output: {success, event_id, start_iso, end_iso, join_url}
• Connect to agent: ◦
mcp = MCPServerHTTP(url="https://your-mcp", headers={"Authorization":"Bearer <MCP_KEY>"})
◦
agent = Agent(tools=[MCPToolset(mcp), local_function_tools...])
Testing checklist • Unit test tool wrappers (mock Calendly API). • Integration test flow: availability → create_event → webhook event.created → LiveKit room created. • Test timezone edge cases and idempotency. What I can provide next • A runnable example of a
@function_tool
in Python that calls Calendly and returns the standardized JSON. • A sample MCP tool descriptor and minimal MCP server endpoint for one operation (create_event). • Example agent wiring showing
MCPServerHTTP
+
MCPToolset
usage. Which of the three next items would you like first: runnable function-tool code, MCP endpoint example, or agent wiring sample? , with interactive elements