> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tilta.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Connect Claude or any MCP client to your Tilta account. Underwrite buyers, submit invoices for financing, and query your receivables in natural language.

Tilta runs a remote [Model Context Protocol](https://modelcontextprotocol.io) server that exposes your Tilta account as tools an AI client can call. Instead of writing integration code, you work through your receivables in natural language: look up a buyer, request a facility, submit an invoice for financing, or ask an analytical question about your ledger.

The MCP server is the third technical surface alongside the [REST API](/docs/integration-server-side) and [Web Elements](/docs/integration-web-elements), and it operates on exactly the same objects. Anything you do through MCP is visible through the API and the portal, and vice versa.

<Note>
  MCP is well suited to operational and exploratory work – onboarding a buyer you just spoke to, chasing down why an invoice was not financed, or answering a question about your exposure. For high-volume, unattended flows such as a checkout, use the REST API.
</Note>

## Connect

The server speaks Streamable HTTP and authenticates with OAuth 2.0. Point your client at the endpoint for the environment you are using:

| Environment | Endpoint                           |
| ----------- | ---------------------------------- |
| Production  | `https://api.tilta.io/mcp`         |
| Sandbox     | `https://api.tilta-sandbox.io/mcp` |

Your client discovers the authorization server automatically through the protected resource metadata Tilta publishes at `/.well-known/oauth-protected-resource/mcp`, then registers itself and prompts you to sign in. No API key handling is required.

<Steps>
  <Step title="Add the server to your client">
    In Claude, open **Settings > Connectors > Add custom connector** and enter the endpoint URL for your environment. Other MCP clients accept the same URL wherever they take a remote or HTTP server.
  </Step>

  <Step title="Sign in">
    Your client opens a browser window for authentication. Sign in with the account you use for the Tilta Portal. The session is scoped to that account, so every tool call is limited to your own data.
  </Step>

  <Step title="Allow egress to Tilta">
    Required only if you intend to upload invoice files. See [Allowing file uploads](#allowing-file-uploads) below.
  </Step>
</Steps>

## What the tools cover

The server exposes tools across four areas. Read tools return data; write tools always ask for your confirmation before they run.

<AccordionGroup>
  <Accordion title="Buyers and credit">
    Search the business registry for a company, create a buyer from it, and add contacts. Request a credit facility, request an increase on an existing one, and inspect the current limit, usage, and status.
  </Accordion>

  <Accordion title="Orders and invoices">
    Create orders and invoices, look them up individually or in bulk, and search across them when you only know a fragment of a name or number.
  </Accordion>

  <Accordion title="Financing and services">
    Submit an invoice for financing, insurance, or collection, check the outstanding requirements for a service, and follow its status as Tilta processes it.
  </Accordion>

  <Accordion title="Analytics">
    Ask analytical questions about your ledger in natural language – exposure by buyer, overdue balances, financing volumes over time – and get answers computed from your data rather than estimated.
  </Accordion>
</AccordionGroup>

## Allowing file uploads

Financing an invoice requires the invoice document to be attached. The `create_invoice_file_upload` tool handles this, but it works differently from every other tool: rather than accepting the file, it returns a short-lived upload URL that **your client** then posts the file to directly. File bytes never pass through the conversation.

That means your client needs permission to make an outbound request to Tilta.

<Warning>
  In Claude, add `api.tilta.io` under **Settings > Capabilities > Domain allow list > Additional allowed domains**. Without it, the upload request is blocked and the file is never attached, even though minting the URL appears to succeed.
</Warning>

For sandbox work, allow `api.tilta-sandbox.io` instead. In other MCP clients, look for the equivalent network or egress allow list.

The upload URL expires after about ten minutes. If it lapses before the file is sent, the client simply requests a fresh one. Only one invoice document is allowed per invoice, so minting a second URL for an invoice that already has one fails by design.

## Confirming writes

Every tool that changes something – creating a buyer, an order, or an invoice, requesting a facility, or submitting a service – is marked as requiring approval. Your client prompts you before the call runs, and the prompt shows what is about to be created. Read and analytics tools run without a prompt.

<Tip>
  Start in the sandbox. It exposes the same tools against simulated credit decisions, so you can work through an onboarding and a financing submission end to end before touching production data. See [Sandbox Environment](/docs/sandbox-environment).
</Tip>

## Limitations

The MCP server does not cover the full REST surface. It is scoped to the operational path from onboarding a buyer through to financing an invoice, plus analytics on top. Merchant onboarding, payout instructions, webhook management, and platform configuration remain API and portal tasks. It also cannot provide legal, tax, or financial advice, guarantee credit approval, or modify approved facility terms.
