The JSON-RPC methods the Whats91 MCP endpoint implements, protocol negotiation, and transport rules.
Protocol
Summary
The JSON-RPC methods the Whats91 MCP endpoint implements, protocol negotiation, and transport rules.
Prerequisites
- A Whats91 account
- A generated public API token
Related documentation
Whats91 MCP is a single stateless JSON-RPC 2.0 endpoint at https://graph.whats91.com/mcp. Every call is an independent POST; there is no persistent session and no server-initiated stream.
Warning
GET /mcp and DELETE /mcp both return 405 with an Allow: POST header. The endpoint does not expose an SSE listener and does not enable protocol sessions.
Protocol Version
The current protocol version is 2025-11-25. Whats91 negotiates down to a compatible version when the client asks for one it supports, and otherwise answers with the current version.
| Version | Status |
|---|---|
| 2025-11-25 | Current |
| 2025-06-18 | Accepted for compatibility |
| 2025-03-26 | Accepted for compatibility |
- initialize.params.protocolVersion is required; the request fails validation without it.
- Every method other than initialize reads the MCP-Protocol-Version header, defaulting to 2025-03-26 when absent.
- An unsupported MCP-Protocol-Version header is rejected as a validation error.
Methods
| Method | Purpose |
|---|---|
| initialize | Negotiate the protocol version and read server capabilities and instructions. |
| ping | Liveness check. Returns an empty result. |
| tools/list | List the tools the granted scopes expose, with input schemas and Whats91 safety metadata. |
| tools/call | Execute one tool. |
| resources/list | List knowledge resources available to the granted scopes. |
| resources/read | Read one knowledge resource by URI. |
| prompts/list | List prompts available to the granted scopes. |
| prompts/get | Fetch one prompt by name. |
Initialize
curl -X POST "https://graph.whats91.com/mcp" \
-H "Authorization: Bearer <mcp-access-token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": { "protocolVersion": "2025-11-25" }
}'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2025-11-25",
"capabilities": { "tools": { "listChanged": false } },
"serverInfo": { "name": "Whats91 MCP", "version": "1.0.0" },
"instructions": "Whats91 provides tenant-bound tools, resources, and prompts. Read the MCP safety guide before write operations. Report dates use Asia/Kolkata."
}
}Tool Discovery
tools/list returns only tools whose required scope is in the granted scope set. Each entry carries the JSON Schema input contract, MCP annotations, and Whats91 safety metadata under _meta.
{
"name": "whats91_billing_summary_get",
"title": "Get Billing Summary",
"description": "Returns the tenant wallet, active plan, low-balance indicator, and available India message-category rates.",
"inputSchema": { "type": "object", "properties": {}, "additionalProperties": false },
"annotations": {
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"securitySchemes": [{ "type": "oauth2", "scopes": ["mcp:billing:read"] }],
"_meta": {
"whats91/toolVersion": "1.0.0",
"whats91/safetyClass": "READ_ONLY",
"whats91/rateLimitClass": "READ",
"whats91/approvalRequired": false
}
}Calling a Tool
curl -X POST "https://graph.whats91.com/mcp" \
-H "Authorization: Bearer <mcp-access-token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-11-25" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "whats91_whoami",
"arguments": {}
}
}'{
"jsonrpc": "2.0",
"id": 2,
"result": {
"tenant": { "name": "Acme Retail", "uid": "usr_xxx" },
"clientId": "w91_mcp_client_xxx",
"scopes": ["mcp:connect", "mcp:tools:diagnostics", "mcp:reports:read"]
}
}Note
Send X-Request-ID with a value of 8 to 128 characters from [A-Za-z0-9._:-] to control the correlation id. Whats91 generates one otherwise and always echoes it back in the X-Request-ID response header.
Related Documentation
MCP
Connect an AI assistant to Whats91 through the Model Context Protocol and give it safe, scoped access to your WhatsApp workspace.
Connect and Authorize
Register an OAuth 2.1 client, complete the PKCE authorization flow, and obtain a scoped Whats91 MCP access token.
Scopes
Every Whats91 MCP OAuth scope, what it unlocks, and how to choose a minimal set.
Safety and Approvals
The six safety classes, the prepare and confirm pattern, idempotency, approvals, and audit behaviour.