Klass for AI agents
Klass exposes a set of tools via the Model Context Protocol so any AI agent can search institutes and request trial classes on behalf of a parent. The same data that powers the Klass marketplace is available to your agent in a structured, audited way.
Endpoint
All MCP calls go to a single HTTP endpoint. The protocol is JSON-RPC 2.0.
POST https://klass.ae/api/mcp Content-Type: application/json
List available tools with method: "tools/list". Call a tool with method: "tools/call".
Authentication
Read tools (klass_search_institutes, klass_list_programmes) are public — no key needed.
Write tools require a Bearer API key in the Authorization header. Get a key from your institute dashboard under Settings → API keys. Choose the trial:create scope to allow trial booking requests.
Authorization: Bearer kls_live_<your-key>
Tools
Discover the full catalog at runtime by calling tools/list. The three tools available in v1 are documented below.
klass_search_institutes
Auth: NoneSearch UAE training institutes by subject, city, and student age range. Returns up to 10 public institutes. No authentication required.
Input schema
{
"type": "object",
"properties": {
"subject": { "type": "string", "description": "e.g. "robotics", "maths", "swimming"" },
"city": { "type": "string", "description": "e.g. "Dubai", "Abu Dhabi", "Sharjah"" },
"ageRange": {
"type": "object",
"properties": {
"min": { "type": "number" },
"max": { "type": "number" }
}
}
}
}Example call
curl -s -X POST https://klass.ae/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "klass_search_institutes",
"arguments": {
"subject": "robotics",
"city": "Dubai",
"ageRange": { "min": 8, "max": 14 }
}
}
}'klass_list_programmes
Auth: NoneList active programmes (classes and courses) offered by a specific institute. No authentication required.
Input schema
{
"type": "object",
"required": ["instituteId"],
"properties": {
"instituteId": { "type": "string", "description": "ID from klass_search_institutes" }
}
}Example call
curl -s -X POST https://klass.ae/api/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "klass_list_programmes",
"arguments": {
"instituteId": "<institute-id>"
}
}
}'klass_request_trial
Auth: Bearer API key with trial:create scopeSubmit a free trial class request at an institute on behalf of a parent. Requires a Bearer API key with the trial:create scope. The institute will contact the parent within 24 hours to confirm the date and time.
Input schema
{
"type": "object",
"required": ["instituteId", "parentFullName", "parentEmail", "studentFullName"],
"properties": {
"instituteId": { "type": "string" },
"parentFullName": { "type": "string" },
"parentEmail": { "type": "string", "format": "email" },
"parentPhone": { "type": "string" },
"studentFullName": { "type": "string" },
"studentAge": { "type": "number" },
"programmeId": { "type": "string", "description": "ID from klass_list_programmes" },
"notes": { "type": "string" }
}
}Example call
curl -s -X POST https://klass.ae/api/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer kls_live_<your-key>" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "klass_request_trial",
"arguments": {
"instituteId": "<institute-id>",
"parentFullName": "Fatima Al Mansoori",
"parentEmail": "fatima@example.com",
"parentPhone": "+971501234567",
"studentFullName": "Yousef Al Mansoori",
"studentAge": 10,
"programmeId": "<programme-id>",
"notes": "Prefers Saturday mornings"
}
}
}'Rate limits
Each API key is limited to 60 calls per minute. Requests that exceed this return a JSON-RPC error with code -32000 and HTTP status 429. Unauthenticated calls to public tools share a per-IP bucket of the same limit.
Status and roadmap
This is v1 of the Klass MCP server, released as a pilot. The tools above are stable.
Planned for v2: session search, attendance lookup, and conversation handoff so an external agent can transfer context to the in-app Klass AI assistant.
Questions or integration support: reach out via your institute dashboard or email api@klass.ae.