---
title: "Connect Bexio to ChatGPT: Manage Invoices, Projects & Accounting"
slug: connect-bexio-to-chatgpt-manage-invoices-projects-accounting
date: 2026-09-28
author: Yuvraj Muley
categories: ["AI & Agents"]
excerpt: "Learn how to connect Bexio to ChatGPT using a managed MCP server. Automate invoices, project time tracking, and accounting workflows with AI agents."
tldr: "Connect Bexio to ChatGPT via Truto's SuperAI MCP server to automate accounting, projects, and invoicing. This guide covers UI and API setup, security constraints, and real-world AI tool calling workflows."
canonical: https://truto.one/blog/connect-bexio-to-chatgpt-manage-invoices-projects-accounting/
---

# Connect Bexio to ChatGPT: Manage Invoices, Projects & Accounting


If you need to connect Bexio to ChatGPT to automate accounting workflows, manage invoices, or track project timesheets, you need a [Model Context Protocol (MCP) server](https://truto.one/blog/what-is-mcp-and-mcp-servers-and-how-do-they-work/). This server acts as the translation layer between ChatGPT's JSON-RPC tool calls and Bexio's REST APIs. You can either build, host, and maintain this complex infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. 

If your team uses Claude, check out our guide on [connecting Bexio to Claude](https://truto.one/connect-bexio-to-claude-sync-contacts-sales-payroll-records/) or explore our broader architectural overview on [connecting Bexio to AI Agents](https://truto.one/connect-bexio-to-ai-agents-automate-billing-tasks-inventory/).

Giving a Large Language Model (LLM) read and write access to an ERP and accounting platform like Bexio requires precision. You have to handle complex document cascades (converting quotes to orders to invoices), strict state machine validations, and deeply nested search arrays. Every time you want to expose a new accounting feature to your AI agent, a custom-built server demands new code, testing, and deployment. 

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Bexio, connect it natively to ChatGPT, and execute complex financial workflows using natural language.

::cta{buttonText="Talk to us" buttonUrl="/book-a-demo/"}
Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds.
:::

## The Engineering Reality of the Bexio API

A custom MCP server is a self-hosted integration layer. While the [open MCP standard](https://truto.one/blog/what-is-mcp-model-context-protocol-the-2026-guide-for-saas-pms/) provides a predictable way for models to discover tools, implementing it against Bexio's API is an architectural challenge. 

If you decide to build a custom MCP server for Bexio, you own the entire integration lifecycle. Here are the specific challenges that break standard CRUD assumptions when working with Bexio:

### Document Cascades and Lifecycle States
Unlike simple REST APIs where you can freely POST and PATCH resources, Bexio operates on strict accounting state machines. An invoice or delivery document often cannot be created in isolation. A standard workflow involves converting a Quote to an Order, an Order to a Delivery, and an Order to an Invoice. If your LLM attempts a generic `POST /invoices` without proper references, it will fail. Furthermore, documents exist in strict states (`DRAFT`, `ISSUED`, `PENDING`, `BOOKED`). You cannot edit a `BOOKED` purchase bill. Your MCP server must expose specific lifecycle actions (like `bexio_invoices_issue` or `bexio_quotes_accept`) rather than generic updates.

### Complex Search Criteria Arrays
When an LLM needs to find a specific contact or invoice, standard query string parameters do not work with Bexio. Bexio's search endpoints (e.g., `bexio_invoices_search`) require clients to `POST` an array of criteria objects containing `field`, `value`, and `criteria` (operator) keys. Building an MCP schema that teaches an LLM how to properly format these criteria arrays - and handling the fallback to default 'like' operators - requires meticulous JSON Schema engineering.

### Legacy vs. Structured Data Fields
Bexio's API carries historical technical debt, particularly around addresses. The legacy `address` request field is deprecated across contacts and profile endpoints, replaced by structured fields like `street_name` and `house_number`. If your custom MCP server exposes the raw, uncurated Bexio OpenAPI spec, the LLM will hallucinate payloads using deprecated fields, resulting in validation errors. 

## Bexio to ChatGPT Quickstart Guide

If you want the fastest path from a fresh Truto account to ChatGPT successfully calling the Bexio API, follow these steps. We cover both UI and API methodologies for generating the server, as well as UI and configuration file approaches for connecting it to the client.

**What you need:**
- A Truto account with API access.
- A Bexio admin account to approve the OAuth consent.
- A ChatGPT Pro, Plus, Business, Enterprise, or Education seat with Developer mode available.

### Step 1: Connect Bexio as an Integrated Account
First, authorize Truto to interact with your Bexio instance.
In the Truto dashboard, navigate to **Integrated Accounts -> New Integrated Account**, select Bexio, and complete the OAuth flow. Truto securely stores the refresh token and manages the token refresh lifecycle in the background, ensuring ChatGPT never encounters an expired credential.

### Step 2: Generate the Bexio MCP Server
Truto scopes each MCP server to a single integrated account. You can generate this server via the Truto dashboard or programmatically via the API.

**Method A: Via the Truto UI**
1. Navigate to the integrated account page for your Bexio connection.
2. Click the **MCP Servers** tab.
3. Click **Create MCP Server**.
4. Select your desired configuration (e.g., restrict to read-only methods or specific tags like "invoicing").
5. Copy the generated MCP server URL (it will look like `https://api.truto.one/mcp/<token>`).

**Method B: Via the API**
You can programmatically provision an MCP server by making a POST request. This is ideal for multi-tenant SaaS platforms provisioning agents for their end-users.

```bash
curl -X POST https://api.truto.one/integrated-account/$INTEGRATED_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Bexio Financial Agent",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["invoices", "projects", "accounting"]
    }
  }'
```

The response returns a `url` field containing the secure endpoint. This single URL carries routing and authentication context - treat it as a sensitive secret.

### Step 3: Connect the MCP Server to ChatGPT
With the URL in hand, you need to register the server with your MCP client.

**Method A: Via the ChatGPT UI**
1. In ChatGPT, go to **Settings -> Apps -> Advanced settings**.
2. Enable **Developer mode**.
3. Under MCP servers / Custom connectors, click to add a new server.
4. **Name:** "Bexio ERP"
5. **Server URL:** Paste the Truto MCP URL.
6. Save. ChatGPT will perform an initialization handshake and instantly [discover the Bexio tools](https://truto.one/blog/bring-100-custom-connectors-to-chatgpt-with-superai-by-truto/).

**Method B: Via Manual Config File (SSE Transport)**
If you are orchestrating agents locally or running headless client infrastructure, you can configure the MCP server using Server-Sent Events (SSE). Add this to your agent's MCP configuration JSON:

```json
{
  "mcpServers": {
    "bexio-agent": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<YOUR_TOKEN>"
      ]
    }
  }
}
```

## Hero Tools for Bexio Automation

Truto [dynamically generates MCP tools](https://truto.one/blog/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/) based on curated integration documentation. When ChatGPT connects to your Bexio MCP server, it gains access to highly structured operations. Here are the highest-leverage tools available for Bexio workflows.

### Search Invoices
**Tool name:** `bexio_invoices_search`
Bexio requires a POST body to search. This tool allows the LLM to search invoices using field-based criteria over supported fields such as `document_nr`, `title`, `contact_id`, and `total`. 

> "Find all Bexio invoices assigned to contact ID 45 with a total amount greater than 1000. Return their document numbers and status IDs."

### Create a Timesheet
**Tool name:** `create_a_bexio_timesheet`
Ideal for project management workflows. This tool creates a new timesheet record requiring the `user_id`, `client_service_id`, and tracking details, linking time spent directly to billable projects.

> "Log 4 hours of development time for user ID 12 on project ID 88, marking it as billable."

### Create an Order from a Quote
**Tool name:** `bexio_quotes_create_order`
Instead of manually copying line items, this custom lifecycle tool creates a Bexio order directly from an existing quote. It accepts optional overrides for how hourly rates and fixed prices transfer.

> "Convert quote ID 102 into an order, ensuring hourly project rates are transferred correctly."

### Create a Purchase Bill
**Tool name:** `create_a_bexio_bill`
Creates a new purchase bill including line item positions, discounts, and payment details. Essential for accounts payable automation.

> "Draft a new purchase bill for vendor 'Acme Corp' for $500 for office supplies, due in 30 days."

### Issue a Delivery
**Tool name:** `bexio_deliveries_issue`
Moves a delivery document out of the draft state. This is a critical state machine operation required before final invoicing can occur.

> "Issue delivery document ID 45 so we can proceed with billing the customer."

### Send an Invoice Reminder
**Tool name:** `bexio_invoices_send_reminder`
Triggers Bexio to send an invoice reminder via email. This tool manages the accounts receivable workflow without requiring manual intervention in the Bexio dashboard.

> "Send an email reminder for invoice ID 883, which is currently 15 days overdue."

To view the complete inventory of available Bexio tools, schema definitions, and required parameters, visit the [Bexio integration page](https://truto.one/integrations/detail/bexio).

## Workflows in Action

Exposing individual REST endpoints is useful, but true agentic automation happens when ChatGPT chains multiple Bexio tools together to solve complex business logic. 

### Use Case 1: Automated Quote-to-Cash Lifecycle
**Persona:** Sales Operations Manager

> "Quote #QU-1045 was just accepted by the client. Please convert it into an order, generate the delivery document, issue the delivery, and draft the final invoice."

**Tool Execution Sequence:**
1. `bexio_quotes_search` - The agent locates Quote #QU-1045 to retrieve its internal `id`.
2. `bexio_quotes_create_order` - The agent converts the quote into an Order and captures the new `order_id`.
3. `bexio_orders_create_delivery` - Using the `order_id`, the agent drafts a delivery document.
4. `bexio_deliveries_issue` - The agent executes the state change to mark the delivery as issued.
5. `bexio_orders_create_invoice` - Finally, the agent generates the final invoice draft linked to the original order.

```mermaid
sequenceDiagram
    participant User as User
    participant Agent as ChatGPT
    participant MCP as Truto MCP Server
    participant Bexio as Bexio API

    User->>Agent: "Convert Quote QU-1045 to final invoice"
    Agent->>MCP: Call bexio_quotes_search (QU-1045)
    MCP->>Bexio: POST /2.0/kb_quote/search
    Bexio-->>MCP: Returns Quote ID 55
    MCP-->>Agent: JSON Result
    
    Agent->>MCP: Call bexio_quotes_create_order (Quote 55)
    MCP->>Bexio: POST /2.0/kb_quote/55/order
    Bexio-->>MCP: Returns Order ID 89
    MCP-->>Agent: JSON Result

    Agent->>MCP: Call bexio_orders_create_delivery (Order 89)
    MCP->>Bexio: POST /2.0/kb_order/89/delivery
    Bexio-->>MCP: Returns Delivery ID 12
    MCP-->>Agent: JSON Result

    Agent->>MCP: Call bexio_deliveries_issue (Delivery 12)
    MCP->>Bexio: POST /2.0/kb_delivery/12/issue
    Bexio-->>MCP: 200 OK
    MCP-->>Agent: JSON Result
    
    Agent->>MCP: Call bexio_orders_create_invoice (Order 89)
    MCP->>Bexio: POST /2.0/kb_order/89/invoice
    Bexio-->>MCP: Returns Invoice ID 104
    MCP-->>Agent: JSON Result
    Agent-->>User: "Done. Invoice ID 104 is drafted and ready."
```

### Use Case 2: Project Time Auditing & Invoicing
**Persona:** Agency Account Manager

> "Find the 'Website Redesign' project. Log 3 hours of billable design time for today, then generate a draft invoice for all unbilled time on that project."

**Tool Execution Sequence:**
1. `bexio_projects_search` - The agent queries the projects list for "Website Redesign" to extract the `project_id` and associated `contact_id`.
2. `create_a_bexio_timesheet` - The agent logs the 3 hours of tracking data against the retrieved `project_id`, marking `allowable_bill` as true.
3. `create_a_bexio_invoice` - The agent creates a draft invoice using the `contact_id` and adds the timesheet positions.

## Security and Access Control

Exposing an ERP system to an AI agent requires strict guardrails. Truto's MCP architecture provides native security controls that you apply at the time of server creation:

*   **Method Filtering:** Constrain the AI's capabilities by explicitly declaring allowed operations. Pass `methods: ["read"]` to allow only `get` and `list` tools, preventing the AI from accidentally mutating financial records.
*   **Tag Filtering:** Limit the server's scope to specific functional areas. Using `tags: ["invoices", "projects"]` ensures the LLM cannot access payroll, employee records, or CRM contacts.
*   **Secondary Authentication (`require_api_token_auth`):** Enable this flag to force the MCP client to pass a valid Truto API token in the Authorization header. This guarantees that even if the MCP URL is leaked, unauthorized users cannot execute tools.
*   **Ephemeral Servers (`expires_at`):** Assign a time-to-live (TTL) timestamp to the MCP server. Truto's durable state systems will automatically revoke the URL and wipe the credentials when the timer expires, which is perfect for temporary agent sessions.

## A Note on Rate Limits and Infrastructure

When orchestrating agents that execute loops (like auditing hundreds of invoices), you will eventually hit Bexio's API rate limits. 

Truto does not silently retry, throttle, or apply backoff logic on rate limit errors. When the upstream Bexio API returns an HTTP 429 Too Many Requests error, Truto passes that error directly back to the ChatGPT client. 

Crucially, Truto normalizes the upstream rate limit information into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) conforming to the IETF spec. The agent or the orchestrating framework (like LangGraph or CrewAI) is responsible for reading these headers and implementing its own retry or backoff logic.

## Strategic Architecture Advantage

Connecting ChatGPT to Bexio shouldn't mean spending weeks building a custom API wrapper, untangling legacy schemas, and mapping state transitions to LLM tool definitions. 

By leveraging an auto-generated MCP server, you offload the entire integration lifecycle - authentication, tool curation, schema validation, and security scoping. Your engineering team can focus entirely on prompt engineering and agent orchestration, while the infrastructure layer provides a secure, normalized, and AI-ready connection to Bexio.
