Autonify
Български · English

AI assistants (MCP)

Български: Асистенти с ИИ (MCP)

For connecting an AI assistant — Claude Desktop, Claude Code, Cursor, VS Code or any other client that speaks the Model Context Protocol — to one company's books in Autonify. Server address:

https://app.autonify.bg/mcp

1. What it is

One endpoint, read-only by construction. Every tool on it is one of the public API's reads (GET /api/v1/…, see the API reference), run with the same key, the same permissions, the same units and the same limits as a direct call. The answer a tool gives is the JSON that read returns.

  • One company. The key names the company, as it does on the API. No tool takes a company argument; there is no way to ask for another one.
  • Never writes. No tool issues, changes or annuls a document, pays, files a declaration, reads payroll or downloads a file. There is no tool that could.
  • Same limits. Every tool call spends units from the company's daily API allowance, exactly as the read it mirrors (§5), and appears in the request log on the Developer API page as MCP · <tool>.
  • No advice. The server tells the assistant that it describes what the books show and gives no tax, legal or accounting advice.

2. Connect

You need a read-only key: Settings → Developer API → AI assistants (MCP) → Create a read-only key. It is minted with purchases:read, sales:read, bank:read, masterdata:read, filings:read and stock:read; tick books:read too if the assistant is to answer about balances and turnover (it is the whole ledger), and work:read for the work logged for clients.

Only read-only keys are let in. A key holding any other permission — a write, payroll, or an account-wide one — is refused with 403 mcp_key_can_write, and error.details.remove lists the permissions to drop. Give the assistant a key of its own (§6).

The key travels as a header, Authorization: Bearer atn_live_…. Replace KEY below with it.

Claude Code

claude mcp add --transport http autonify https://app.autonify.bg/mcp --header "Authorization: Bearer KEY"

Claude Desktop (Settings → Developer → Edit config; it reaches a remote server through the mcp-remote bridge, which needs Node.js)

{
  "mcpServers": {
    "autonify": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://app.autonify.bg/mcp", "--header", "Authorization:${AUTONIFY_AUTH}"],
      "env": { "AUTONIFY_AUTH": "Bearer KEY" }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "autonify": {
      "url": "https://app.autonify.bg/mcp",
      "headers": { "Authorization": "Bearer KEY" }
    }
  }
}

VS Code (.vscode/mcp.json)

{
  "servers": {
    "autonify": {
      "type": "http",
      "url": "https://app.autonify.bg/mcp",
      "headers": { "Authorization": "Bearer KEY" }
    }
  }
}

The page shows these, with the key filled in, right after you create it — the key itself is shown only once.

Claude and ChatGPT in the browser and on the phone connect without a key. Add a custom connector with the server address above — in Claude, a custom connector; in ChatGPT, a connector in developer mode. The assistant sends you to Autonify: sign in, choose the company and what the assistant may read, accept the developer terms and confirm your password. Behind the connection stands a read-only key of its own, made for it and never shown — with the same permissions, units and limits as any key, and counted in the plan's number of keys. The connection lasts as long as that key (a year) or until you end it: Settings → Developer API → AI assistants (MCP) → Connected assistants → Disconnect. Owners and admins are told of every new connection.

For whoever builds such a client: OAuth 2.1 with PKCE (S256), public clients only. The server describes itself at /.well-known/oauth-protected-resource/mcp and /.well-known/oauth-authorization-server; a client identifies itself by a Client ID Metadata Document (an https client_id) or registers at /oauth/register. The scopes are the read permissions of §3. An access token lasts an hour and is accepted at /mcp only; a refresh token lasts thirty days and is replaced on every use.

3. Tools

Arguments are optional unless marked required. Dates are YYYY-MM-DD; lists are cursor-paged — pass meta.next_cursor back as cursor, and limit takes 1 to 100 (50 by default). Each tool's answer (structuredContent) is the JSON of the read named beside it, documented in the API reference.

Tool The read it is Permission Units Arguments
whoami GET /whoami — free —
list_sales_invoices GET /sales/invoices sales:read 5 kind, from, to (issue date), cursor, limit, updated_since
get_sales_invoice GET /sales/invoices/{id} sales:read 1 id required
list_purchases GET /purchases purchases:read 5 kind, needs_review (true/false), from, to, cursor, limit, updated_since
get_purchase GET /purchases/{id} purchases:read 1 id required
list_counterparties GET /counterparties masterdata:read 5 search (up to 100 characters), cursor, limit
list_items GET /items masterdata:read 5 kind (income / expense), cursor, limit
chart_of_accounts GET /chart-of-accounts masterdata:read 5 active (true/false)
list_bank_accounts GET /bank-accounts bank:read 5 —
list_bank_transactions GET /bank-transactions bank:read 5 from, to, cursor, limit
list_warehouses GET /warehouses stock:read 5 kind, cursor, limit
stock_levels GET /stock stock:read 5 warehouse_id, sku, cursor, limit
stock_movements GET /stock/movements stock:read 5 sku required, from, to, cursor, limit
trial_balance GET /books/trial-balance books:read 5 from required, to required
journal_lines GET /books/journal books:read 5 from required, to required, cursor, limit
list_filings GET /filings filings:read free kind, period, cursor, limit
list_billable_entries GET /billable-entries work:read or sales:read 5 counterparty_id, status (unbilled / billed), from, to, cursor, limit

The list is what your key may use now. tools/list shows only the tools the key's permissions, the company's plan and the team seat of the person who minted the key allow — a key without books:read sees fifteen, a seat with no access to the bank sees no bank tools. A tool that is not listed for you cannot be called either (§4).

list_filings reads each filing's status, due date and whether it is ready; a VAT filing's caveats may name counterparties, and a payroll filing's come back null (they name employees, and payroll is never read here).

4. Errors

A tool that is refused answers as a tool result with isError: true — the HTTP status of the MCP answer itself is 200. Its text is <status> <code>: <message>, followed by the API's error envelope as JSON, with the request_id support looks up:

422 validation_failed: The from field is required.
{"error":{"code":"validation_failed","message":"…","details":{"from":["…"]},"request_id":"01k…"}}

The codes are the API's own (API reference, §8) — quota_exceeded, inventory_not_in_plan, not_found, validation_failed and the rest. A field check the API answers in the framework's shape comes back as validation_failed with the fields in details. Two codes belong to the tools themselves, and nothing is charged for either:

Code When
unknown_argument An argument the tool does not take. The message names it and lists the ones it does.
invalid_argument An argument of the wrong type (a string where a number or true/false is expected), or an id that is not 1 to 64 letters, digits, _ or -.

Before any tool runs, the server itself may refuse the request:

Code Status When
api_disabled 503 The public API is not switched on for this installation.
mcp_disabled 503 The MCP server is not switched on for this installation.
origin_not_allowed 403 The request carries a browser Origin. An assistant calls the server from a program, never from a web page.
body_too_large 413 A request body over 64 KB.
mcp_key_can_write 403 The key holds a permission an assistant may not use; details.remove lists them.
unauthenticated, invalid_token, token_expired, token_revoked 401 As on the API, with WWW-Authenticate: Bearer realm="autonify".

The protocol's own answers are JSON-RPC errors:

  • -32600, HTTP 400 — a JSON-RPC batch (an array of messages). Send one message per request.
  • -32602 "Tool [name] not found.", HTTP 400 — a tool your key, plan or seat may not use: it is not listed for you, and calling it reads nothing and costs nothing.
  • -32601, HTTP 404 — a method the server does not serve (it has no resources, prompts, completions or subscriptions to stream).
  • -32020, HTTP 400 — on the 2026-07-28 protocol, an Mcp-Method, Mcp-Name or MCP-Protocol-Version header that does not match the message.

5. Units and limits

The same as the API's (API reference, §2): each tool costs what its read costs — 1 unit for one document, 5 for a list page, nothing for whoami and list_filings — from the company's daily allowance and the account's, with the per-key and per-address bursts. A refused call costs nothing.

Every successful tool result carries what it cost in _meta:

"_meta": { "bg.autonify/units": { "charged": 5, "limit": 1000, "remaining": 995, "reset": "2026-11-15T23:59:59+02:00" } }

remaining is absent when the allowance has no ceiling, and reset is midnight in Sofia. whoami shows the same figures. To answer a question about totals, trial_balance is one call; paging journal_lines through a year is many.

6. Security

  • Text written by others is data. Descriptions, notes, counterparty and supplier names and bank references come from third parties. The server tells the assistant never to follow an instruction found in them — but mind what else the same assistant is connected to: if it can also send e-mail or publish, such text may try to push it into sending your data out. Connect them together only if you trust them.
  • A read-only key is still an API key. Pasted into an assistant's configuration, it also reads over /api/v1 everything its permissions read — with filings:read, the filing files too. Give each assistant a key of its own, so revoking it stops that assistant and nothing else.
  • Revoking a key on the Developer API page stops the assistant at once. Keys expire after a year.
  • Plan and seat. The connection reads only what the company's plan includes and the team seat of the person who made the key reaches; a stopped seat stops the key (seat_stopped).

7. Versions

The server speaks MCP over Streamable HTTP, answering in JSON (no event streams). Protocol versions 2025-03-26, 2025-06-18 and 2025-11-25 (with initialize) and 2026-07-28 (with server/discover). Each POST stands on its own: there is no session, and GET / DELETE on /mcp answer 405.

The tool contract is version 1.0.0 (serverInfo.version); it changes only with this page.

Autonify is accounting and compliance software.

Privacy Terms