MCP server

Connect your AI assistant (Claude, Cursor, VS Code…) to the Ticketbai WS API with the Model Context Protocol. Every API method is a tool: issue, query and cancel TicketBAI and Verifactu invoices from the chat.

Server URLs

EnvironmentMCP server URL
Testhttps://api-test.ticketbaiws.eus/mcp-api
Productionhttps://api.ticketbaiws.eus/mcp-api

Company and license management: these methods authenticate with the developer token of your customer account (not with a company's token), so they have their own server: https://api.ticketbaiws.eus/mcp-api/cuenta, with the developer token and the account's NIF in the same headers. Add it as a second connector.

Always start in the test environment. In production, invoices are legally valid and are sent to the tax authority (Hacienda): ask the assistant to confirm each invoice with you before issuing it.

Connect your assistant

All you need is the URL. When you add the connector, your assistant opens a Ticketbai WS window: you log in with your account, choose the company and grant access. No tokens to copy, no headers to configure.

Claude (claude.ai and Claude Desktop)

  1. In Settings → Connectors, add a custom connector with the MCP server URL.
  2. Click Connect, log in with your Ticketbai WS account and choose the company.

ChatGPT

  1. Add a custom connector with the MCP server URL (depending on your plan, you may need to enable developer mode for connectors).
  2. Choose OAuth authentication, log in with your Ticketbai WS account and choose the company.

Claude Code

claude mcp add --transport http ticketbaiws-test https://api-test.ticketbaiws.eus/mcp-api

Then, inside Claude Code, type /mcp and choose Authenticate to log in.

Cursor, VS Code and other clients

Add the MCP server URL. If your client supports OAuth, it will ask you to log in; if not, use headers (see below).

One connection per company and environment. The access you grant applies only to the company you choose and only to the environment of the URL (test or production). If you manage several companies, add one connector per company. For company and license management, use https://api.ticketbaiws.eus/mcp-api/cuenta and log in with your customer account.

Alternative: headers with your token

For clients without OAuth or for automations, the server still accepts the company's token in HTTP headers, just like the REST API: Token and Nif. If your client only lets you pick headers from a list, use X-API-Token and X-Client-ID; if it only allows Authorization, send Authorization: Bearer YOUR_NIF:YOUR_TOKEN.

claude mcp add --transport http ticketbaiws-test https://api-test.ticketbaiws.eus/mcp-api \
  --header "Token: YOUR_TEST_TOKEN" \
  --header "Nif: YOUR_NIF"

The server does not store your token or access anything you couldn't do with the API: each tool makes the same REST call you would make, with the same usage limits.

Examples of what you can ask

See complete conversations, including the tools the assistant uses, in the MCP server use cases.

Tools

They are the methods in the API documentation, with the same parameters. Some management methods only exist in production.

TicketBAI / Verifactu invoices

Representation document (Verifactu, Bizkaia, Gipuzkoa)

Batuz Bizkaia (LROE)

Webhooks, companies and licenses

B2B e-invoicing (SPFE)

SII (AEAT)

Customers and products (invoicing tool)

Best practices