AstroCal
Guides

MCP Integration

Connect AI agents to AstroCal using the Model Context Protocol.

AstroCal provides a Model Context Protocol (MCP) server that lets AI agents manage scheduling — check availability, book meetings, cancel, reschedule, and list bookings. The MCP server is a thin wrapper around the REST API — it uses the same endpoints and business logic.

What is MCP?

The Model Context Protocol is an open standard for connecting AI agents to external tools and data sources. It lets language models call functions (tools) in a structured way.

Available Tools

The AstroCal MCP server exposes these tools:

ToolDescription
list_event_typesList available event types that can be booked
check_availabilityGet available booking slots for a date range
create_bookingBook a meeting at a specific time
cancel_bookingCancel an existing booking
reschedule_bookingReschedule a booking to a new time
list_bookingsList bookings with optional status and event type filters

Setup

Install the MCP Server

npm install -g @astrocal/mcp-server

Or use npx to run without installing (recommended for Claude Desktop):

npx @astrocal/mcp-server

Configure Claude Desktop

Add AstroCal to your claude_desktop_config.json:

{
  "mcpServers": {
    "astrocal": {
      "command": "npx",
      "args": ["-y", "@astrocal/mcp-server"],
      "env": {
        "ASTROCAL_API_KEY": "ac_live_xxxxxxxxxxxxx"
      }
    }
  }
}

Restart Claude Desktop and the tools will be available.

Environment Variables

VariableRequiredDescription
ASTROCAL_API_KEYYesYour AstroCal API key (get from the dashboard)
ASTROCAL_API_URLNoAPI base URL (default: https://api.astrocal.dev)
ASTROCAL_DEFAULT_EVENT_TYPE_IDNoDefault event type — skips needing to pass it to every tool

Tool Reference

list_event_types

List available event types that can be booked. No input required.

Returns each event type's ID, title, duration, and price (if paid).

check_availability

Check available time slots for a date range.

ParameterTypeRequiredDescription
event_type_idstringNoEvent type to check (uses default if not set)
start_datestringYesStart date (ISO 8601, e.g., 2026-03-15)
end_datestringYesEnd date (ISO 8601, e.g., 2026-03-22)
timezonestringNoIANA timezone (default: UTC)

create_booking

Book a meeting at a specific time. Always check availability first.

ParameterTypeRequiredDescription
event_type_idstringNoEvent type to book
start_timestringYesISO 8601 datetime
invitee_namestringYesFull name of the invitee
invitee_emailstringYesEmail for calendar invitation
invitee_timezonestringNoIANA timezone (default: UTC)
notesstringNoMeeting notes (max 1000 chars)

cancel_booking

Cancel an existing booking. The invitee is notified via email. Idempotent — cancelling an already-cancelled booking returns success.

ParameterTypeRequiredDescription
booking_idstringYesID of the booking to cancel
reasonstringNoCancellation reason (max 500 chars)

reschedule_booking

Reschedule a booking to a new time. Check availability first using check_availability.

ParameterTypeRequiredDescription
booking_idstringYesID of the booking to reschedule
new_start_timestringYesNew time in ISO 8601 format
reasonstringNoReason for rescheduling (max 500)

list_bookings

List bookings with optional filters.

ParameterTypeRequiredDescription
statusstringNoFilter: confirmed, cancelled, pending_payment
limitnumberNoMax results (default: 10, max: 100)
event_type_idstringNoFilter by event type

Example Conversation

Once configured, an AI agent can manage scheduling naturally:

User: "What meetings can I book?"

Agent: calls list_event_types — "You have two event types: a 30-minute consultation (free) and a 1-hour strategy session ($50)."

User: "Schedule a 30-minute consultation with Jane for next Tuesday at 2pm"

Agent:

  1. Calls check_availability to verify Tuesday 2pm is open
  2. Calls create_booking with the invitee details
  3. "Meeting confirmed for Tuesday at 2:00 PM UTC with Jane. A calendar invitation has been sent."

User: "Actually, move it to 3pm"

Agent: calls reschedule_booking — "Rescheduled to 3:00 PM. Jane has been notified."

User: "What bookings do I have this week?"

Agent: calls list_bookings — "You have 3 upcoming bookings..."

Next Steps

On this page