Skip to Content
Bonafide MCP is now generally available — read the quickstart
MCPWorked Example

Worked example

Your organization is modelled in Bonafide as one brand (a BusinessEntity) and a set of property entities (the individual hotels). Bonafide IDs follow these shapes:

RoleBonafide ID (shape)Meaning
Brand BusinessEntityHO-XXXXXXXXXXXXYour organization — the brand your key is scoped to.
PropertyHO-NNNNN-CC-RR-XXXXXXXX-NAn individual hotel (carries country/region segments).

Ask a question (bonafide_query)

Request

curl -s "https://mcp.bonafide.ai/v1/sse" \ -H "Authorization: Bearer $TOKEN" \ -H "mcp-session-id: $SID" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{ "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "bonafide_query", "arguments": { "task": "What dining options are available at YOUR_HOTEL_NAME?", "max_documents": 5, "response_format": "text" } } }'

Response — shape (content illustrative)

{ "jsonrpc": "2.0", "id": 3, "result": { "content": [ { "type": "text", "text": "<ranked, human-readable answer assembled from the matching documents, followed by citations referencing the source entities — e.g. YOUR_HOTEL_NAME (HO-NNNNN-CC-RR-XXXXXXXX-N)>" } ] } }

Browse content (bonafide_search_documents)

curl -s "https://mcp.bonafide.ai/v1/sse" \ -H "Authorization: Bearer $TOKEN" \ -H "mcp-session-id: $SID" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -d '{ "jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": { "name": "bonafide_search_documents", "arguments": { "query": "spa", "type": "qa_pair", "category": "Hospitality", "limit": 10, "offset": 0 } } }'

Results are restricted to your organization — increment offset by limit to page through larger result sets.

With the connector from Connect from Claude enabled, you simply ask Claude in natural language — no JSON-RPC. For example:

  • “Using Bonafide, what are the check-in and check-out times at one of our hotels?”
  • “Compare the pet policies at two of our properties.”
  • “List the spa and wellness amenities across all our properties.”

Claude selects the right tool, fills the arguments, and cites the source entities in its answer.

Last updated on