Skip to main content

MCP Server

The OlaClick MCP (Model Context Protocol) Server allows AI agents and MCP-compatible clients to interact with the OlaClick Public API. Connect your AI assistant to OlaClick and query orders, clients, and product sales data using natural language.

What is MCP?

Model Context Protocol is an open standard that enables AI assistants (like Claude, Cursor, or any MCP-compatible client) to securely interact with external APIs through a standardized interface. Instead of manually crafting API calls, your AI assistant can use OlaClick tools directly.

Available Tools

The OlaClick MCP server exposes the following tools:

ToolDescriptionRequired Scope
get_ordersRetrieve orders with filters (status, service type, source, dates)orders:read
get_clientsList clients with filters (name, phone, status, source, points)clients:read
get_products_soldProduct sales statistics (top sellers, quantities, revenue)orders:read
update_productUpdate a product's name or descriptionmenu:write

Quick Start

Prerequisites

  • An OlaClick API Key (generated from the restaurant's panel under Integrations > API Keys)
  • An MCP-compatible client (Claude Desktop, Cursor, VS Code with Copilot, etc.)

Configuration

The OlaClick MCP server uses HTTP (SSE) transport. Clients connect to the remote endpoint — no local installation needed.

Client Setup

Cursor

Add to Cursor

Or add manually to your project's .cursor/mcp.json:

{
"mcpServers": {
"olaclick": {
"url": "https://public-api.olaclick.app/mcp",
"headers": {
"Authorization": "Bearer olk_live_YOUR_KEY_HERE"
}
}
}
}

Claude Desktop

Add the following to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
"mcpServers": {
"olaclick": {
"url": "https://public-api.olaclick.app/mcp",
"headers": {
"Authorization": "Bearer olk_live_YOUR_KEY_HERE"
}
}
}
}

VS Code (Copilot / Kiro)

Add the following to .vscode/mcp.json or .kiro/settings/mcp.json:

{
"mcpServers": {
"olaclick": {
"url": "https://public-api.olaclick.app/mcp",
"headers": {
"Authorization": "Bearer olk_live_YOUR_KEY_HERE"
}
}
}
}

Remote HTTP (Hosted)

Connect to the OlaClick MCP server directly via HTTP:

{
"mcpServers": {
"olaclick": {
"url": "https://public-api.olaclick.app/mcp",
"headers": {
"Authorization": "Bearer olk_live_YOUR_KEY_HERE"
}
}
}
}

In HTTP mode, the API key is passed via the Authorization: Bearer header on each connection. No environment variables needed.

Tool Reference

get_orders

Retrieve a paginated list of orders with optional filters.

Note: If no start_date is provided, defaults to today's orders.

Parameters:

ParameterTypeRequiredDescription
order_idstringNoUUID or public ID (e.g. PE-1234567890) to get a single order
statusstringNoPENDING, PREPARING, READY, DELIVERED, FINALIZED, CANCELLED
service_typesstringNoDELIVERY, TAKEAWAY, ONSITE, TABLE (comma-separated)
sourcestringNoFilter by source (e.g. web, ifood, rappi, uber)
payment_statusstringNoFilter by payment status (e.g. PAID,PENDING)
payment_method_idsstringNoComma-separated payment method UUIDs
owner_idsstringNoComma-separated owner/cashier UUIDs
rider_idsstringNoComma-separated rider UUIDs
delivered_bystringNoFilter by who delivered (e.g. MERCHANT,IFOOD,PICKER)
delivery_statusstringNoFilter by delivery status
is_scheduledstringNoFilter scheduled orders (true or false)
client_idstringNoFilter by client UUID
public_idstringNoSearch by partial public order ID
cancelation_reasonstringNoFilter by cancelation reason
start_datestringNoFrom date (YYYY-MM-DD)
end_datestringNoUntil date (YYYY-MM-DD)
start_timestringNoFrom time (HH:mm:ss)
end_timestringNoUntil time (HH:mm:ss)
time_typestringNoDate column to filter on (default: pending_at)
timezonestringNoTimezone for date filters (default: company timezone)
pagenumberNoPage number (default: 1)
per_pagenumberNoItems per page (1-100, default: 50)

Example prompt:

"Show me today's pending delivery orders"

Response format:

{
"data": [
{
"id": "9c4f4203-9e2c-403d-88cc-7c0ce9e0f572",
"public_id": "PE-9799906639",
"status": "finalized",
"service_type": "onsite",
"source": "OUTBOUND",
"client": {
"name": "John Doe"
},
"address": {
"city": "Lima",
"area": "Miraflores"
},
"total": 90,
"total_paid": 90,
"total_tips": 0,
"total_discounts": 0,
"delivery_price": 0,
"service_fee_price": 0,
"combos_price": 90,
"created_at": "2026-06-23T18:23:42+00:00",
"updated_at": "2026-06-23T18:56:00+00:00"
}
],
"pagination": {
"current_page": 1,
"per_page": 50,
"total": 12,
"has_more": false
}
}

get_clients

Retrieve a paginated list of clients with optional filters.

Parameters:

ParameterTypeRequiredDescription
filter_namestringNoPartial match on client name (accent-insensitive)
filter_phone_numberstringNoMatches phone number prefix
filter_country_calling_codestringNoCountry calling code (used with phone_number)
filter_typestringNoComma-separated client types
filter_statusstringNoComma-separated client statuses
filter_sourcestringNoDIGITAL_MENU, CHATBOT, ECOMMERCE, PANEL (comma-separated)
filter_available_pointsnumberNoClients with available_points greater than this value
filter_used_pointsnumberNoClients with used_points greater than this value
sort_bystringNoname, phone_number, available_points, used_points, source, total_orders, address
directionstringNoasc or desc
include_addressesbooleanNoInclude client addresses in response
simple_paginatebooleanNoUse simple pagination (faster, no total count)
pagenumberNoPage number (default: 1)
per_pagenumberNoItems per page (1-100, default: 25)

Example prompt:

"List my top 10 clients sorted by total orders"

Response format:

{
"data": [
{
"id": "9c8e720f-31b1-485a-85fa-0aaf552faaa9",
"name": "John Doe",
"email": "john@example.com",
"phone_number": "3001234567",
"country_calling_code": "57",
"available_points": 150,
"used_points": 0,
"status": "AT_RISK",
"type": "BUYER",
"source": "DIGITAL_MENU",
"order_count_service_type_delivery": 5,
"order_count_service_type_onsite": 2,
"order_count_service_type_takeaway": 1,
"order_count_service_type_table": 0,
"total_orders": 8,
"created_at": "2024-07-19T02:28:48+00:00"
}
],
"pagination": {
"current_page": 1,
"per_page": 25,
"total": 340,
"has_more": true
}
}

get_products_sold

Retrieve statistics about the most sold products.

Note: If no start_date is provided, defaults to the last 7 days.

Parameters:

ParameterTypeRequiredDescription
includestringNoGrouping: products, products_modifiers, freehand
show_productsnumberNoLimit to top N products
category_idsstringNoComma-separated category IDs
combo_typestringNoFreehand combo type filter (only when include=freehand)
statusstringNoOrder statuses (e.g. finalized,delivered)
sourcesstringNoOrder sources (e.g. inbound,outbound)
service_typesstringNoService types (e.g. delivery,onsite)
start_datestringNoStart date (YYYY-MM-DD)
end_datestringNoEnd date (YYYY-MM-DD)
timezonestringNoTimezone (default: company timezone)
pagenumberNoPage number (default: 1)
per_pagenumberNoItems per page (1-100, default: 25)

Example prompt:

"What are my top 5 best-selling products this week?"

Response format:

{
"data": [
{
"product_name": "Combo Classic Smash",
"product_quantity": 41,
"average_price": 39,
"total_sales": 1599,
"modifiers": [],
"product_id": "9c4f4203-9e2c-403d-88cc-7c0ce9e0f572",
"variant_id": "9c4f4203-a0ec-45bc-9810-3a8ada0838dd"
}
],
"pagination": {
"current_page": 1,
"per_page": 25,
"total": 45,
"has_more": true
}
}

update_product

Update a product's name and/or description.

Parameters:

ParameterTypeRequiredDescription
product_idstringYesUUID of the product to update
namestringNo**New product name (max 191 chars)
descriptionstringNo**New product description

**At least one of name or description must be provided.

Example prompt:

"Rename product 9c4f4203-9e2c-403d-88cc-7c0ce9e0f572 to 'Double Smash Burger'"

Response format:

{
"data": {
"id": "9c4f4203-9e2c-403d-88cc-7c0ce9e0f572",
"name": "Double Smash Burger",
"description": "Two smashed beef patties with cheese"
}
}

Authentication

The MCP server authenticates via the HTTP Authorization header:

Authorization: Bearer olk_live_YOUR_KEY_HERE

The API key is passed on the initial HTTP/SSE connection. All tool calls within that session inherit the key automatically — no need to pass it per-call.

Example Conversations

Here are some example prompts you can use once the MCP server is connected:

PromptTool Used
"How many orders did I get today?"get_orders
"Show me all cancelled orders from last week"get_orders
"List delivery orders that are still pending"get_orders
"Who are my most frequent customers?"get_clients
"Find the client with phone number 300..."get_clients
"What's my best-selling product this month?"get_products_sold
"Show top 10 products for delivery orders"get_products_sold
"Update the description of product X"update_product

Security

  • API keys are never logged or stored by the MCP server
  • All communication uses HTTPS
  • Each user provides their own key via the Authorization header
  • The server validates scopes per-tool (e.g., orders:read, clients:read, menu:write)

Next Steps