field-service
ServiceM8 MCP Integration for OpenAI Agents SDK
Connect ServiceM8 to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect ServiceM8 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.
ServiceM8 MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"mcpServers": {
"kosmokrator-service_m8": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=service_m8",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=service_m8 --write=deny Why Use KosmoKrator Here
Expose only ServiceM8 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.
ServiceM8 Tools Visible to OpenAI Agents
OpenAI Agents sees stable MCP tool names generated from the ServiceM8 integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__service_m8__servicem8_list_jobs | service_m8.servicem8_list_jobs | Read | List jobs from ServiceM8. Returns job details including status, client, dates, and descriptions. Supports filtering by status and pagination. |
integration__service_m8__servicem8_get_job | service_m8.servicem8_get_job | Read | Get detailed information about a specific ServiceM8 job by its UUID. Returns full job details including status, client, description, dates, and assigned staff. |
integration__service_m8__servicem8_list_clients | service_m8.servicem8_list_clients | Read | List clients from ServiceM8. Returns client details including name, email, phone, and address. Supports pagination. |
integration__service_m8__servicem8_get_client | service_m8.servicem8_get_client | Read | Get detailed information about a specific ServiceM8 client by their UUID. Returns client details including name, email, phone, billing address, and notes. |
integration__service_m8__servicem8_create_job | service_m8.servicem8_create_job | Write | Create a new job in ServiceM8. Requires a client UUID. Optionally specify a job template and description to pre-populate the job. |
integration__service_m8__servicem8_list_activities | service_m8.servicem8_list_activities | Read | List activity records from ServiceM8. Returns a timeline of events such as job status changes, comments, and notes. Supports filtering by job and pagination. |
integration__service_m8__servicem8_get_current_user | service_m8.servicem8_get_current_user | Read | Get the profile of the currently authenticated ServiceM8 user. Returns name, email, role, and account details. |