Model Context Protocol

The Model Context Protocol (MCP) allows you to connect AI assistants (like Claude) directly to your Pynath Booking account. Once connected, the AI can read your availability, query services, and book appointments autonomously on behalf of users.

1. Configure Claude Desktop

To enable MCP in the Claude Desktop app, you need to update your claude_desktop_config.json file. You will need your API key from the developer dashboard.

claude_desktop_config.json
{
  "mcpServers": {
    "pynath-booking": {
      "command": "curl",
      "args": [
        "-N",
        "-H", "Authorization: Bearer pyn_YOUR_API_KEY",
        "https://booking.pynath.com/api/v1/mcp"
      ]
    }
  }
}

2. Configure Cursor IDE

To add the server to Cursor, go to Settings > Features > MCP and click Add New MCP Server. Select command as the type and paste the following into the command field:

curl -N -H "Authorization: Bearer pyn_YOUR_API_KEY" https://booking.pynath.com/api/v1/mcp

3. Custom Node.js Client

You can also interact with the MCP server programmatically using the official @modelcontextprotocol/sdk package.

index.js
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";

const transport = new SSEClientTransport(
  new URL("https://booking.pynath.com/api/v1/mcp"),
  { headers: { "Authorization": "Bearer pyn_YOUR_API_KEY" } }
);

const client = new Client({ name: "my-app", version: "1.0.0" });
await client.connect(transport);

// Call the tool directly
const response = await client.callTool({
  name: "list_services",
  arguments: {}
});

console.log(response);

4. Available Tools

Once connected, the AI agent will have access to the following tools:

list_services

Returns a list of all active services for your account, including their UUIDs, durations, and pricing. The agent uses this to find the correct serviceId before booking.

check_availability

Accepts a date (YYYY-MM-DD) and returns all available time slots. It automatically factors in staff schedules, business hours, and existing bookings.

create_booking

Books an appointment securely. Requires the service ID, start time, end time, and customer details.

5. Supported Clients & IDEs

Because Pynath Booking uses the standard Model Context Protocol, it is instantly compatible with a massive ecosystem of AI tools. You can use your API key to connect to:

  • Desktop Assistants: Claude Desktop (macOS / Windows), LibreChat
  • Code Editors: Cursor, Windsurf, Zed
  • VS Code Extensions: Roo Code, Continue.dev, Sourcegraph Cody
  • Agentic SDKs: LangChain, LangGraph, LlamaIndex, Firebase Genkit
  • CLI Tools: Claude Code

6. Example Use Cases

What can you build with the Pynath Booking MCP Server? Here are a few possibilities:

Internal Chatbots

Connect the server to your company's Slack bot. Staff can type "When is John available for a haircut tomorrow?" and the bot will use MCP tools to check the schedule.

Automated Scheduling

Allow a customized LangChain agent to read incoming emails and automatically draft a reply offering open time slots, seamlessly booking the appointment when the customer replies.

IDE Development

Add the server to Cursor while building your custom booking portal. Ask the AI: "Book a test appointment for tomorrow" and it will do so without you leaving your editor.

Voice Assistants

Hook the MCP server into a voice-enabled AI interface to build an automated answering service that checks availability and books callers over the phone.

Security & Permissions

All actions performed by the MCP server execute exactly as they would via standard API calls. The AI agent acts strictly on behalf of the account tied to the provided API Key, ensuring strict data isolation.