finance
Xero MCP Integration for OpenAI Agents SDK
Connect Xero to OpenAI Agents SDK through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.
Connect Xero 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.
Xero MCP Config for OpenAI Agents SDK
Use headless JSON commands for CI-style execution and MCP for agent tool discovery.
{
"mcpServers": {
"kosmokrator-xero": {
"type": "stdio",
"command": "kosmo",
"args": [
"mcp:serve",
"--integration=xero",
"--write=deny"
]
}
}
} Run the Gateway Manually
kosmokrator mcp:serve --integration=xero --write=deny Why Use KosmoKrator Here
Expose only Xero 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.
Xero Tools Visible to OpenAI Agents
OpenAI Agents sees stable MCP tool names generated from the Xero integration catalog.
| MCP tool | Source function | Type | Description |
|---|---|---|---|
integration__xero__xero_create_invoice | xero.xero_create_invoice | Write | Create a new invoice in Xero. Requires a contact_id and at least one line item with description and unit_amount. Returns the created invoice with its ID and number. |
integration__xero__xero_get_contact | xero.xero_get_contact | Read | Retrieve a Xero contact by its ID. Returns the contact's ID, name, email, phone, addresses, and status. |
integration__xero__xero_get_current_user | xero.xero_get_current_user | Read | Retrieve the currently authenticated Xero user. Returns the user's ID, name, and email. Useful for identifying which Xero organisation or token is in use. |
integration__xero__xero_get_invoice | xero.xero_get_invoice | Read | Retrieve a Xero invoice by its ID. Returns the full invoice including line items, contact details, and totals. |
integration__xero__xero_list_accounts | xero.xero_list_accounts | Read | List Xero chart of accounts. Returns account codes, names, types, tax types, and statuses. |
integration__xero__xero_list_contacts | xero.xero_list_contacts | Read | List Xero contacts with pagination. Returns contact IDs, names, emails, and types. Use page for pagination (1-indexed). |
integration__xero__xero_list_invoices | xero.xero_list_invoices | Read | List Xero invoices with pagination and filtering. Returns invoice IDs, numbers, amounts, status, and dates. Use page and pageSize for pagination. |