sales
Square MCP Integration for OpenAI Agents SDK
Connect Square to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Square to OpenAI Agents SDK
Attach KosmoKrator integration tools to OpenAI Agents SDK workflows through a local MCP gateway.
Start the KosmoKrator MCP gateway locally and point the OpenAI Agents SDK MCP tool at that process or wrapper. The gateway is local, scoped to this integration, and starts with
--write=deny so OpenAI Agents can inspect read-capable tools without receiving write access by default.
Square MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"mcpServers": {
"kosmokrator-square": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=square",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=square --write=deny Why Use KosmoKrator Here
Expose only Square instead of a broad multi-service tool list.
Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.
Start read-only, then opt into ask or allow for trusted workspaces.
Square Tools Visible to OpenAI Agents
OpenAI Agents sees stable MCP tool names generated from the Square integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__square__square_get_current_user | square.square_get_current_user | Read | Get the current authenticated Square merchant account. Returns merchant details including business name, country, currency, and status. |
integration__square__square_get_customer | square.square_get_customer | Read | Retrieve a Square customer by ID. Returns full customer details including email, phone, address, and cards on file. |
integration__square__square_get_order | square.square_get_order | Read | Retrieve a Square order by ID. Returns full order details including line items, totals, taxes, and discounts. |
integration__square__square_get_payment | square.square_get_payment | Read | Retrieve a Square payment by ID. Returns full payment details including amount, status, card details, and processing fees. |
integration__square__square_list_customers | square.square_list_customers | Read | List Square customers with optional filtering. Supports pagination with cursor. |
integration__square__square_list_orders | square.square_list_orders | Read | List Square orders for a specific location. Requires a location_id. Supports filtering by order states and pagination with cursor. |
integration__square__square_list_payments | square.square_list_payments | Read | List Square payments with optional filtering. Supports filtering by location ID, begin_time / end_time (ISO 8601), and pagination with cursor. |