Skip to content

MCP Protocol

Fp Switchboard implements the Model Context Protocol (MCP), an open standard for connecting AI assistants to external tools and data sources.

MCP is a JSON-RPC 2.0 based protocol that allows AI models to:

  • Discover tools available in a system
  • Execute tools with specific parameters
  • Receive results in a standardized format

All MCP messages follow JSON-RPC 2.0 format:

{
"jsonrpc": "2.0",
"id": 1,
"method": "method_name",
"params": {}
}

Fp Switchboard uses HTTP transport:

  • Endpoint: https://api.switchboard.fpdigital.ai/mcp/{service}
  • Method: POST
  • Headers: Authorization: Bearer {token}

Returns available tools for the authenticated token:

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

Executes a tool with the provided arguments:

{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "gmail_search",
"arguments": {
"query": "from:boss@company.com",
"max_results": 5
}
}
}

Each tool has an inputSchema following JSON Schema:

{
"name": "calendar_create",
"description": "[Calendar] Create a new calendar event",
"inputSchema": {
"type": "object",
"properties": {
"summary": {
"type": "string",
"description": "Event title"
},
"start": {
"type": "string",
"description": "Start time (ISO 8601)"
},
"end": {
"type": "string",
"description": "End time (ISO 8601)"
},
"attendees": {
"type": "array",
"items": { "type": "string" },
"description": "Email addresses of attendees"
},
"account": {
"type": "string",
"description": "Account alias (required if multiple accounts)"
}
},
"required": ["summary", "start", "end"]
}
}
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Operation completed successfully"
}
]
}
}
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "Service not connected",
"data": {
"service": "google",
"errorCode": "SERVICE_NOT_CONNECTED"
}
}
}
CodeMeaning
-32700Parse error (invalid JSON)
-32600Invalid request
-32601Method not found
-32602Invalid params
-32603Internal error
-32000Service error (see data.errorCode)
errorCodeMeaning
AUTH_FAILEDToken invalid or expired
SERVICE_NOT_CONNECTEDService not connected
RATE_LIMITEDToo many requests
INVALID_INPUTInvalid tool parameters
NOT_FOUNDResource not found
SERVICE_ERRORUpstream service error

MCP supports batch requests:

[
{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "gmail_search", "arguments": { "query": "is:unread" } } },
{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "calendar_list", "arguments": {} } }
]
EndpointLimit
/mcp/unified100 req/min
/mcp/{service}60 req/min
tools/list10 req/min

Rate limit headers are included in responses:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705312800

For users with multiple accounts connected, tools include an account parameter:

{
"name": "gmail_send",
"inputSchema": {
"properties": {
"account": {
"type": "string",
"description": "Account alias: work, personal"
}
}
}
}

See Multi-Account Access for details.