Developers

MCP server

Let AI assistants such as Claude, ChatGPT, and Cursor talk to your YuAskMe chatbot through the open Model Context Protocol.

Overview

Questions sent through MCP get the same answers a customer gets in the website widget: the same knowledge base, products, bookings, and conversation flow. Once connected, an assistant can:

  • Ask the business a question and carry on a multi-turn conversation
  • List the business's products, menu items, or rooms, with prices and availability
  • Send an announcement to people using the business's chatbot
  • Create a private, time-limited chat link for a specific guest or booking

MCP access is off by default. A business owner turns it on and creates a token in the YuAskMe dashboard.

Endpoint and protocol

All MCP traffic goes to one URL as JSON-RPC 2.0 over HTTPS POST. Each request gets a single JSON response; streaming (SSE) isn't supported.

SettingValue
Server URLhttps://yuask.me/mcp
MethodPOST, Content-Type: application/json
Protocol version2024-11-05
Server name / versionyuaskme / 1.0.0
Capabilitiestools

initialize, notifications/initialized, and ping work without a token. tools/list and tools/call need one. Check that the server is reachable:

bash
curl -X POST https://yuask.me/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"my-client","version":"1.0"}}}'
json
{"jsonrpc": "2.0", "id": 1, "result": {"protocolVersion": "2024-11-05", "capabilities": {"tools": {}}, "serverInfo": {"name": "yuaskme", "version": "1.0.0"}}}

Authentication

Every authenticated request carries a YuAskMe MCP token as a Bearer token: Authorization: Bearer <token>. There are two kinds:

TokenPrefixScopebusinessSlug needed?
Business tokenmcp_One business (workspace)No, the business comes from the token
Platform tokenmcpp_Every business on your accountYes, on each ask_business and get_business_entities call

Getting a token

  1. Sign in to the YuAskMe dashboard and open Settings → MCP Server.
  2. Under MCP Token, generate a token and switch MCP Access on. For a platform token, use the Platform Token (Multi-Business) card.
  3. Copy the token and store it like a password.
Tokens don't expire. Generating a new token immediately invalidates the old one, so reconnect any clients that used it. Turning MCP Access off blocks the business token.

OAuth 2.0

Some clients, such as ChatGPT and Claude, connect with OAuth instead of a pasted token. The client opens a YuAskMe page where you paste your MCP token, and then receives that token as its access token.

SettingValue
Authorization URLhttps://yuask.me/mcp/oauth/authorize
Token URLhttps://yuask.me/mcp/oauth/token
Client IDyuaskme-mcp
Client secretAny non-empty value
Scopemcp
Grant typesauthorization_code (PKCE S256 supported), client_credentials

Discovery documents are published at /.well-known/oauth-authorization-server, /.well-known/oauth-protected-resource, and /.well-known/openid-configuration. The same three paths also work under /mcp/. For server-to-server use, the client-credentials grant takes the MCP token as client_secret:

bash
curl -X POST https://yuask.me/mcp/oauth/token \
  -d "grant_type=client_credentials&client_id=yuaskme-mcp&client_secret=mcp_YOUR_TOKEN"

Authorization codes are single-use and expire after 10 minutes.

Connecting a client

Any client that supports remote MCP servers over HTTP can connect. Clients that support OAuth need only the server URL; others need the URL plus an Authorization header.

Claude and ChatGPT (OAuth)

  1. Add a custom connector (Claude) or app (ChatGPT) and enter https://yuask.me/mcp as the server URL.
  2. When the YuAskMe authorization page opens, paste your MCP token and click Authorize.
  3. The tools appear in the client. Try asking: “Ask the business what rooms are available this weekend.”

Claude Code

bash
claude mcp add --transport http yuaskme https://yuask.me/mcp \
  --header "Authorization: Bearer mcp_YOUR_TOKEN"

Cursor and other JSON-configured clients

json
{
  "mcpServers": {
    "yuaskme": {
      "url": "https://yuask.me/mcp",
      "headers": { "Authorization": "Bearer mcp_YOUR_TOKEN" }
    }
  }
}

Your own code

Send JSON-RPC requests directly. List the available tools:

bash
curl -X POST https://yuask.me/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer mcp_YOUR_TOKEN" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

To name your client in the business's reports (for example, broadcast sources), send an X-Mcp-Client: <name> header. Otherwise YuAskMe guesses the client from the User-Agent.

Tools

The server exposes five tools. Call each with tools/call, passing name and arguments.

ToolWhat it does
ask_businessSends a message to the business's chatbot and returns its reply
end_conversationEnds a conversation started with conversationId
get_business_entitiesLists the business's products, menu items, or rooms
broadcast_messageSends an announcement to the business's chatbot users
generate_guest_session_linkCreates a private, expiring chat link for one guest

ask_business

The chatbot answers exactly as it would in the website widget, including bookings and follow-up questions.

ArgumentTypeRequiredDefaultDescription
messagestringYes—The customer's message or question
businessSlugstringWith a platform token—Which business to ask, e.g. la-hacienda
conversationIdstringNo—Any stable ID; reuse it to continue a conversation
languagestringNoEnglishReply language, e.g. Filipino, Spanish
formattext | htmlNotexttext is plain text; html keeps the chatbot's markup
combineMessagesbooleanNofalseJoin multi-part replies into one content block

Without a conversationId, each call is a new, one-off conversation. With one, the chatbot remembers earlier turns, such as the guest's name and dates. Use a unique ID per end user, for example conv_<bookingRef>.

bash
curl -X POST https://yuask.me/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer mcp_YOUR_TOKEN" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"ask_business","arguments":{"message":"Do you have a room for 2 tomorrow?","conversationId":"conv_42","combineMessages":true}}}'
json
{
  "jsonrpc": "2.0", "id": 3,
  "result": {
    "content": [{ "type": "text", "text": "Yes, we have a Casita available for May 20 at ₱1,500/night. Shall I book it?" }],
    "isError": false,
    "_meta": { "intent": "reservation", "sessionId": "conv_42" }
  }
}
Some questions produce two messages: an acknowledgement, then the result. By default these come back as two content blocks; set combineMessages: true if your client only reads the first. _meta.intent is the chatbot's reading of what the customer wanted.

end_conversation

Ends a conversation and frees its memory on the server. Call it when the customer is done. Takes one required argument, conversationId.

get_business_entities

Returns the business's catalog: products, menu items, rooms, or services.

ArgumentTypeRequiredDescription
categorystringNoFilter by category, case-insensitive; underscores count as spaces (main_course)
businessSlugstringWith a platform tokenWhich business to read

The result's text is a JSON string, {"result": [...]}, and _meta.count gives the number of items. Each item has:

FieldTypeDescription
entity_idstringYuAskMe item ID
pos_item_idstring | nullID in the business's point-of-sale system, if linked
namestringItem name
descriptionstring | nullItem description
pricenumber | nullPrice in the business's currency
categorystring | nullCategory label
image_urlstring | nullImage URL
availablebooleanWhether the item can be ordered or booked now

broadcast_message

Queues an announcement that appears in the chat widget's announcements panel. The call returns as soon as the broadcast is queued; delivery happens in the background.

ArgumentTypeRequiredDescription
titlestringYesUp to 30 characters
messagestringYesUp to 300 characters
target.typestringYesWho receives it (below)
target.user_idstringWhen target.type is userThe recipient's YuAskMe user ID
metadataobjectNoAny JSON you want stored with the broadcast
target.typeWho receives it
active_sessionsVisitors who have the chat widget open right now
business_chatbot_usersAll signed-in users of the chatbot; offline users see it next time they open the widget
userOne signed-in user; stored for later if they are offline
json
{ "name": "broadcast_message", "arguments": { "title": "Weekend deal", "message": "Book any room this weekend and get 20% off!", "target": { "type": "active_sessions" } } }

Each business can send up to 10 broadcasts per hour. The reply includes _meta.broadcastId and _meta.status: "queued".

Creates a private chat link for one guest, such as a hotel booking or restaurant reservation. The guest chats with the business's AI, which already knows their booking details. The link stops working at expires_at.

ArgumentTypeRequiredDescription
identifierstringYesThe business slug; with a business token it must be that token's business
guest_namestringYesThe guest's full name
guest_identifierstringYesBooking or reservation reference, e.g. BK-2026-00021
session_typestringYese.g. hotel_booking, restaurant_reservation
expires_atstringYesISO-8601 date-time in the future, e.g. 2026-11-08T12:00:00+08:00
contextobjectNoBooking details for the AI, e.g. check_in, check_out, guests, room_type

The reply text contains the link to send to the guest, and _meta.chat_url holds the same link.

Errors and limits

Errors come back as JSON-RPC error objects. Most use HTTP 200; a missing or bad token uses HTTP 401, and malformed JSON uses HTTP 400.

CodeHTTPMeaningWhat to do
-32001401Token missing, invalid, replaced, or MCP Access is offCheck the token and the MCP Access switch in the dashboard
-32600400 / 200Body isn't valid JSON or JSON-RPC 2.0Send "jsonrpc": "2.0" with a method
-32601200Unknown method or tool nameCheck the name against tools/list
-32602200Missing or invalid argument, or unknown businessSlugRead the error message; it names the argument
-32029200Broadcast rate limit reachedWait; the limit is per hour
-32000200Server errorRetry later; contact support if it persists

If ask_business fails inside the chatbot, the call succeeds with isError: true and an apology text instead of an error object.

LimitValue
Broadcasts per business10 per hour
Broadcast title / message30 / 300 characters
OAuth authorization codeSingle use, 10 minutes
Conversation memoryHeld until end_conversation or a server restart

Security

  • Treat MCP tokens like passwords. A business token can read the catalog and send broadcasts for that business; a platform token can do the same for every business on your account.
  • Give a client a business token unless it really needs several businesses.
  • If a token leaks, generate a new one in the dashboard. The old one stops working immediately.
  • Only call the server over HTTPS.

Need help? Email yuaskme-support@xybersoft.org with your business slug, the client you're using, and the JSON-RPC error you got. Never include your token.

This page describes server version 1.0.0, MCP protocol 2024-11-05.

Something unclear or out of date? Report a docs issue.