Skip to main content

What is MCP?

Model Context Protocol (MCP) is Anthropic’s standard for AI agents to use tools. Instead of HTTP requests, AI agents communicate directly via stdio with JSON-RPC 2.0. Syncline supports both REST API (HTTP) and MCP Protocol (stdio). Functionality is identical—choose what fits your architecture.

Why Use MCP?

Zero Latency

No HTTP overhead. Direct process communication.

Native Integration

Works seamlessly with Claude and other MCP-compatible agents.

Stateful

Maintain context across multiple tool calls.

Simpler Auth

No API keys in headers. Auth via environment variables.

Architecture

┌─────────────────┐
│   AI Agent      │
│  (e.g., Claude) │
└────────┬────────┘
         │ stdio (JSON-RPC 2.0)

┌────────▼────────┐
│ Syncline MCP    │
│     Server      │
└────────┬────────┘


┌─────────────────┐
│  Google Calendar│
│    Firestore    │
└─────────────────┘

Available Tools

Find time slots where attendees are available.Input:
  • attendees: Array of emails
  • duration_minutes: Meeting duration (optional)
Output: 5 ranked time slots
Create a calendar event with Google Meet.Input:
  • attendees: Array of emails
  • start_time: ISO 8601 datetime
  • title: Meeting title
  • duration_minutes: Duration (optional)
Output: Meeting details with Google Meet link
Check a single user’s calendar.Input:
  • email: User’s email
  • date_range: Start and end times
Output: Busy and free time slots
Update user scheduling preferences.Input:
  • email: User’s email
  • preferences: New preferences object
Output: Updated preferences

Integration Guides

Quick Example

1. Start MCP Server

# Download Syncline binary
# Set environment variables
export SERVER_MODE=mcp
export GCP_PROJECT_ID=your-project
export GOOGLE_CLIENT_ID=...
export GOOGLE_CLIENT_SECRET=...
export API_ENCRYPTION_KEY=...

# Start in MCP mode
./syncline

2. Send JSON-RPC Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list"
}

3. Receive Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      {
        "name": "find_mutual_availability",
        "description": "Find time slots where all attendees are available",
        "inputSchema": {
          "type": "object",
          "properties": {
            "attendees": {
              "type": "array",
              "items": {"type": "string", "format": "email"}
            }
          },
          "required": ["attendees"]
        }
      }
      // ... 3 more tools
    ]
  }
}

MCP vs REST API

FeatureMCP ProtocolREST API
TransportstdioHTTP
FormatJSON-RPC 2.0REST JSON
AuthEnv varsAPI key header
Latency~1ms~50ms
StreamingYesNo
Best ForAI agentsWeb apps, mobile

Protocol Flow

1

Initialize

Agent sends initialize method. Server responds with capabilities.
2

List Tools

Agent calls tools/list. Server returns available tools with schemas.
3

Call Tool

Agent calls tools/call with tool name and arguments. Server executes and returns result.
4

Repeat

Agent can call tools multiple times in same session.

Example Conversation

// Agent → Server
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {}
}

// Server → Agent
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "protocolVersion": "2024-11-05",
    "serverInfo": {"name": "syncline", "version": "1.0.0"},
    "capabilities": {"tools": {"listChanged": false}}
  }
}

Next Steps