iFirma MCP Server

Invoices, costs and KSeF sending in iFirma, run by your agent.

Gehosteter MCP-Server

npx add-mcp 'https://cotlet.dev/mcp/v1/ifirma'

Installiert in Claude Code, Codex, Cursor und mehr

Dokumentation

Cotlet · Integrations · How it works · Security · For developers · For automation agencies · Blog · API docs · Help center · Changelog · Contact · Pricing · Sign up

iFirma API and MCP server

Yes. iFirma has a documented JSON API that issues invoices, lists them, records payments, sends them by email and to KSeF, and adds cost documents (checked 14 Oct 2026). It has no official MCP server in its documentation. Every request is signed with one of four keys (subscriber, invoice, receipt, expense), you activate API access in your account first, and 100 requests per minute and 15,000 per day apply.

Invoices, costs and KSeF sending in iFirma, run by your agent. Use it in ChatGPT, Claude or any AI agent over MCP, or in n8n, Make and scripts over REST.

MCP setup REST API guide

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by iFirma. iFirma is a trademark of its owner. If iFirma's own integrations cover what you need, use them first.

Online invoicing and accounting for Polish sole traders and small companies: sales invoices, cost documents, contractors, payments and sending invoices to the KSeF e-invoicing system.

What is the iFirma API?

Cotlet's iFirma API exposes 14 endpoints for your own iFirma account: list invoices, get invoice, get invoice PDF, list contractors, list KSeF purchase invoices, create contractor, save invoice draft, issue invoice, send invoice to KSeF, send invoice by email, record payment, book KSeF purchase invoice, add expense and send payment reminder. The list_invoices endpoint returns sales invoices for a date range, with totals, payment and KSeF status. Each endpoint takes simple JSON inputs like invoice_id, contractor_id or nip and works both as an operation of the ifirma_read or ifirma_write MCP tool for agents and as a REST call for scripts.

Yes. Cotlet is a hosted MCP server and REST API for iFirma with 14 endpoints (5 read, 9 write): you sign in once in your own cloud browser, your AI agent does the work.

Does iFirma have an official API?

Yes. iFirma has a documented JSON API that issues invoices, lists them, records payments, sends them by email and to KSeF, and adds cost documents (checked 14 Oct 2026). It has no official MCP server in its documentation. Every request is signed with one of four keys (subscriber, invoice, receipt, expense), you activate API access in your account first, and 100 requests per minute and 15,000 per day apply.

TaskiFirma officialCotlet
List invoices and filter unpaid onesYes: GET faktury.json with status nieoplacone, przeterminowane or oplaconeCzesciowoYes
Issue a domestic invoiceYes: POST fakturakraj.json with the invoice key; other invoice types have their own endpointsYes
Send an invoice by emailYes: POST send endpoint per invoice typeYes
Send an invoice to KSeF and read its statusYes: Since 1 Feb 2026; KsefStatus and KsefNumber are in the invoice listYes
Record a payment on an invoiceYes: POST wplaty endpoint with the amountYes
Add a cost documentYes: Four expense endpoints; KSeF marking is a fieldYes
Download purchase invoices from KSeF and book themNo: In the app under Wydatki, not in the API docsYes
Send a payment reminderNo: In the app under Windykacja, not in the API docsYes

Sources: iFirma API: general information and limits, iFirma API: activation, iFirma API: authorization header, iFirma API: sending an invoice to KSeF

Quick reference

Yes. iFirma has a documented JSON API that issues invoices, lists them, records payments, sends them by email and to KSeF, and adds cost documents (checked 14 Oct 2026). It has no official MCP server in its documentation. Every request is signed with one of four keys (subscriber, invoice, receipt, expense), you activate API access in your account first, and 100 requests per minute and 15,000 per day apply.
Cotlet provides a hosted MCP server and REST API for iFirma: 14 tools (5 read, 9 write).
Access       Sign up at https://cotlet.dev/app/signup?app=ifirma and request the app in the Cotlet console. ChatGPT and Claude connect with OAuth at https://cotlet.dev/mcp/v1/connect, no API key; code editors and scripts use an API key from the console.

MCP server   https://cotlet.dev/mcp/v1
MCP tools    ifirma_read, ifirma_write, reads and writes apart; call one with {"operation": "<operation>", "arguments": {...}}
REST base    https://cotlet.dev/api/v1/ifirma, each operation at its own route, e.g. POST /api/v1/ifirma/contractors/{contractor_id}/invoices
Auth         Authorization: Bearer <COTLET_API_KEY>. Listing endpoints and schemas needs no key; calling an endpoint needs one. Over MCP the input schemas come with sign-in.
Operations   list_invoices, get_invoice, get_invoice_pdf, list_contractors, list_ksef_purchase_invoices, create_contractor, save_invoice_draft, issue_invoice, send_invoice_to_ksef, send_invoice_email, record_payment, book_ksef_purchase_invoice, add_expense, send_payment_reminder
Confirm      issue_invoice, send_invoice_to_ksef, send_invoice_email, record_payment, book_ksef_purchase_invoice, add_expense, send_payment_reminder (by default the user approves each call; the user can switch this off per tool, e.g. for scheduled automations)
Markdown     https://cotlet.dev/integrations/ifirma-api-mcp-server.md

How access works:
1. The user signs up at https://cotlet.dev/app/signup?app=ifirma and requests iFirma in the Cotlet console.
2. The user signs in to iFirma once in their Cotlet Cloud Browser (their own Chrome in the cloud, opened from the console) and enables iFirma for agents. An agent cannot do this step.
3. ChatGPT and Claude: the user adds https://cotlet.dev/mcp/v1/connect as a connector and signs in to Cotlet (OAuth). Code editors and scripts: an API key from the console goes into the MCP client or the REST call as a bearer token.

Fits: people who want a hosted iFirma server that someone else maintains, including non-developers.

Policy: Cotlet never stores passwords and never bypasses MFA.
Company: legal details in the Terms of service at https://cotlet.dev/terms. Contact contact@cotlet.dev.
Sign-in: the user signs in to iFirma in their own Cloud Browser, a Chrome Cotlet runs for them in the EU; password saving is off, the profile is AES-256-GCM encrypted, and agents get iFirma only after the user enables it. Calls are requests from that browser's IP with its cookies, each listed in the user's Background activity. Disable for agents, signing out in the browser or Reset browser cuts access. Cotlet is run by Take Group sp. z o.o. (EU VAT PL6342984273).
API key: holds no iFirma login or cookies, only asks Cotlet to run a tool. Each key is scoped to chosen apps and tools, read only or read and write. Actions that reach other people wait for the user's approval by default, so a leaked key cannot post or message as the user. Every call is in the activity log; deleting the key ends access at once.
Terms: the user stays responsible for following iFirma's terms; Cotlet is not affiliated with iFirma.

What can an AI agent do in iFirma?

Cotlet is best for Polish sole traders and small businesses on iFirma who want their AI agent to issue invoices, send them to KSeF and chase payments without running or fixing a server.

  • Issue an invoice and send it to KSeF (runs: daily): "Issue a domestic VAT invoice in iFirma for Blue Fern Studio: 2 x Website retainer, net 500.00 each, 23% VAT, due in 14 days. Find the contractor by NIP first. Show me the invoice before you issue it, then send it to KSeF and by email." → list_contractors, issue_invoice, send_invoice_to_ksef, send_invoice_email
  • Book purchase invoices from KSeF as costs (runs: weekly): "List the purchase invoices that arrived in KSeF since last Monday and are not booked yet. Book the ones from suppliers I already have as contractors and show me the rest." → list_ksef_purchase_invoices, list_contractors, book_ksef_purchase_invoice
  • Chase unpaid invoices (runs: weekly): "List my overdue iFirma invoices. For each one, send a Monit to the buyer, except invoices under 100 PLN, and tell me the total still owed per contractor." → list_invoices, send_payment_reminder
  • Record payments on invoices (runs: weekly): "Here are this week's incoming transfers. For each one find the unpaid iFirma invoice with the same number and amount, record the payment, and list the transfers that did not match." → list_invoices, record_payment
  • Add a supplier cost document: "Add this phone bill to iFirma as a phone and internet cost: invoice 2026/10/0042 from Telco Sp. z o.o., issued 2026-10-09, net 81.30, VAT 18.70, no KSeF number." → list_contractors, add_expense

Can iFirma automations run on a schedule in n8n, Make or Zapier?

Yes. Cotlet does not replace your automation platform: it gives it a iFirma connection it does not have, with the same API key as your agent. Write actions ask for your OK by default; switch that off in your dashboard for the tools you choose, for example to issue an invoice and send it to ksef, and the schedule runs on its own. Cotlet runs in the cloud, so it keeps going while your computer is off.

WhereHow to connectHow to schedule
Your AI agentAdd https://cotlet.dev/mcp/v1 with your API key.A scheduled agent run, for example a Claude Code routine.
n8nMCP Client node with https://cotlet.dev/mcp/v1, or an HTTP Request node with the endpoint's method and URL, such as GET https://cotlet.dev/api/v1/ifirma/contractors.Schedule Trigger node.
MakeHTTP module: the endpoint's method and URL with an Authorization: Bearer header, and a JSON body for POST, PUT and PATCH.Scenario schedule.
ZapierWebhooks by Zapier, Custom Request: the same method, URL, header and body.Schedule by Zapier trigger.
Your own scriptGET https://cotlet.dev/api/v1/ifirma/contractors with your API key.cron or GitHub Actions.

Tools

For AI agents: Every endpoint and its schema is public. The 14 endpoints on this page, with parameters and example responses, can be listed without an account. Calling one returns 401 without an API key and 403 while the key has no access to iFirma.

list_invoices

Sales invoices for a date range, with totals, payment and KSeF status. Access: read. REST: GET /api/v1/ifirma/invoices. MCP: ifirma_read → list_invoices.

ParameterTypeRequiredDescription
date_fromstringyesYYYY-MM-DD, the first issue date.
date_tostringnoYYYY-MM-DD. Default: 30 days after date_from.
statusstringnooverdue, unpaid, partly_paid or paid. Several values can be joined with commas.
contractor_idstringnoContractor ID from list_contractors.
nipstringnoBuyer tax number (NIP).
min_amountnumbernoSmallest document value.
max_amountnumbernoLargest document value.
pageintegernoPage number. Default: 1.
per_pageintegernoResults per page. Default: 20.

Returns invoices issued in the range you choose. Each item has number, buyer, issue and due date, gross amount, currency, amount paid, draft and sent flags, and the KSeF number and status. Without date_to the range is 30 days from date_from. Pages hold 20 results unless you set per_page.

Example response:

{
  "invoices": [
    {
      "id": 7020118,
      "number": "41/2026",
      "buyer": "Blue Fern Studio",
      "contractor_id": "c_4817",
      "issue_date": "2026-10-14",
      "due_date": "2026-10-28",
      "gross": 1230,
      "currency": "PLN",
      "paid": 0,
      "draft": false,
      "sent": false,
      "ksef_status": null
    },
    {
      "id": 7020104,
      "number": "39/2026",
      "buyer": "Harbor Print Ltd",
      "contractor_id": "c_4832",
      "issue_date": "2026-09-18",
      "due_date": "2026-10-02",
      "gross": 800,
      "currency": "PLN",
      "paid": 0,
      "draft": false,
      "sent": true,
      "ksef_status": "accepted"
    }
  ],
  "page": 1
}

get_invoice

One invoice with its lines, buyer, payments and KSeF status. Access: read. REST: GET /api/v1/ifirma/invoices/{invoice_id}. MCP: ifirma_read → get_invoice.

ParameterTypeRequiredDescription
invoice_idintegeryesInvoice ID from list_invoices.

Returns one invoice as the app shows it: number, buyer, lines, net, VAT and gross totals, payments recorded, reminders and the KSeF number and status. Use it after send_invoice_to_ksef to see whether KSeF accepted the invoice.

Example response:

{
  "id": 7020118,
  "number": "41/2026",
  "buyer": "Blue Fern Studio",
  "contractor_id": "c_4817",
  "lines": [
    {
      "name": "Website retainer",
      "quantity": 2,
      "unit": "month",
      "unit_price": 500,
      "vat_rate": 23
    }
  ],
  "net": 1000,
  "vat": 230,
  "gross": 1230,
  "currency": "PLN",
  "due_date": "2026-10-28",
  "paid": 0,
  "reminders": 0,
  "ksef_status": "queued",
  "ksef_number": null
}

get_invoice_pdf

The invoice as a PDF file, base64 encoded. Access: read. REST: GET /api/v1/ifirma/invoices/{invoice_id}/pdf. MCP: ifirma_read → get_invoice_pdf.

ParameterTypeRequiredDescription
invoice_idintegeryesInvoice ID from list_invoices.
duplicatebooleannotrue for a duplicate. Default: false.

Returns the PDF of one issued invoice as base64 with its file name. Set duplicate to true for a duplicate, which carries the date it was downloaded.

Example response:

{
  "invoice_id": 7020118,
  "file_name": "41-2026.pdf",
  "content_base64": "JVBERi0xLjQKJcfsj6IK..."
}

list_contractors

Contractors from your list, searchable by name or tax number. Access: read. REST: GET /api/v1/ifirma/contractors. MCP: ifirma_read → list_contractors.

ParameterTypeRequiredDescription
namestringnoContractor name or part of it.
nipstringnoTax number (NIP).
pageintegernoPage number. Default: 1.

Returns contractors saved under Firma, Kontrahenci. Search by NIP or name to find a buyer or supplier before you invoice or book a cost. Without a filter it returns the first page.

Example response:

{
  "contractors": [
    {
      "id": "c_4817",
      "name": "Blue Fern Studio",
      "nip": "1234563218",
      "email": "billing@bluefern.example",
      "city": "Gdansk",
      "postal_code": "80-001",
      "country_code": "PL"
    }
  ],
  "page": 1
}

list_ksef_purchase_invoices

Invoices that suppliers sent to you in KSeF and you have not booked yet. Access: read. REST: GET /api/v1/ifirma/ksef-purchase-invoices. MCP: ifirma_read → list_ksef_purchase_invoices.

ParameterTypeRequiredDescription
issued_fromstringyesYYYY-MM-DD, the first seller issue date to download.

Downloads new purchase invoices from KSeF into the "Faktury z KSeF" list and returns them. Each item has the seller document number, KSeF number, document type, seller NIP, issue date, and net and gross amounts. The date is the seller issue date, not the date sent to KSeF. Documents already booked are not returned.

Example response:

{
  "invoices": [
    {
      "ksef_number": "7010003987-20261012-AB12CD34EF56-7A",
      "seller_number": "FV 118/2026",
      "type": "vat",
      "seller_nip": "7010003987",
      "issue_date": "2026-10-12",
      "net": 650.41,
      "gross": 800
    },
    {
      "ksef_number": "5252248481-20261010-9F8E7D6C5B4A-12",
      "seller_number": "ZAL 7/2026",
      "type": "advance",
      "seller_nip": "5252248481",
      "issue_date": "2026-10-10",
      "net": 2000,
      "gross": 2460
    }
  ]
}

create_contractor

Add a contractor to your iFirma list. Access: write. REST: POST /api/v1/ifirma/postals/{postal_code}/contractors. MCP: ifirma_write → create_contractor.

ParameterTypeRequiredDescription
namestringyesContractor name, up to 150 characters.
postal_codestringyesPostal code.
citystringyesCity.
streetstringnoStreet and number.
nipstringnoTax number (NIP).
country_codestringnoTwo-letter country code.
emailstringnoEmail address used for sending invoices and reminders.
private_personbooleannotrue for a private person. Default: false.

Creates a contractor record. Name, postal code and city are required. Nothing is sent to anyone, and the contractor can be edited or deleted in the app, so create_contractor runs without asking first.

Example response:

{
  "id": "c_4901",
  "name": "Lime Courier Sp. z o.o.",
  "nip": "9512345678",
  "email": "office@limecourier.example",
  "city": "Warsaw",
  "postal_code": "00-001",
  "country_code": "PL"
}

save_invoice_draft

Save an invoice as a draft without a number, to review and issue in the app. Access: write. REST: POST /api/v1/ifirma/contractors/{contractor_id}/invoice-draft/save. MCP: ifirma_write → save_invoice_draft.

ParameterTypeRequiredDescription
contractor_idstringyesContractor ID from list_contractors or create_contractor.
linesarrayyesLines: {name, quantity, unit, unit_price, vat_rate}. vat_rate is 23, 8, 5, 0 or exempt.
calculate_fromstringnonet or gross: which price you give. Default: net.
issue_datestringnoYYYY-MM-DD. Default: today.
due_datestringnoYYYY-MM-DD.

Does what "Zapisz szkic" does: saves the invoice without a number, and it shows in the invoice list. A draft reaches no one and can be edited or deleted in the app, so save_invoice_draft runs without asking first. It takes the same parameters as issue_invoice.

Example response:

{
  "id": 7020119,
  "number": null,
  "draft": true,
  "buyer": "Blue Fern Studio",
  "gross": 1230,
  "currency": "PLN"
}

issue_invoice

Issue a domestic invoice for a contractor with one or more lines. Access: write, asks the user first. REST: POST /api/v1/ifirma/contractors/{contractor_id}/invoices. MCP: ifirma_write → issue_invoice.

ParameterTypeRequiredDescription
contractor_idstringyesContractor ID from list_contractors or create_contractor.
linesarrayyesLines: {name, quantity, unit, unit_price, vat_rate}. vat_rate is 23, 8, 5, 0 or exempt.
calculate_fromstringnonet or gross: which price you give. Default: net.
issue_datestringnoYYYY-MM-DD. Default: today.
sale_datestringnoYYYY-MM-DD. Default: issue date.
due_datestringnoYYYY-MM-DD.
payment_methodstringnotransfer, cash or card.
notesstringnoRemarks printed on the invoice, up to 1000 characters.

Issues the invoice with the next number in the series, the same as "Wystaw". Lines need name, quantity, unit, unit price and VAT rate; a line that is not exempt may also need a PKWiU code. The invoice is not sent to KSeF or to the buyer until you call send_invoice_to_ksef or send_invoice_email. By default you confirm each call; you can switch that off for this tool.

Example response:

{
  "id": 7020118,
  "number": "41/2026",
  "draft": false,
  "buyer": "Blue Fern Studio",
  "net": 1000,
  "vat": 230,
  "gross": 1230,
  "currency": "PLN",
  "issue_date": "2026-10-14",
  "due_date": "2026-10-28",
  "ksef_status": null
}

send_invoice_to_ksef

Send one issued invoice to the Polish KSeF e-invoicing system. Access: write, asks the user first. REST: POST /api/v1/ifirma/invoices/{invoice_id}/to-ksef. MCP: ifirma_write → send_invoice_to_ksef.

ParameterTypeRequiredDescription
invoice_idintegeryesInvoice ID from list_invoices.

Does what "Wyślij do KSeF" does and returns the first status, "Przekazana do wysyłki"; the KSeF number appears once the Ministry of Finance accepts it, so read it with get_invoice. KSeF must already be connected in the account. After sending, iFirma does not allow editing or deleting the invoice, and the issue date cannot be later than the sending date. By default you confirm each call; you can switch that off for this tool.

Example response:

{
  "invoice_id": 7020118,
  "ksef_status": "queued",
  "ksef_number": null
}

send_invoice_email

Email an issued invoice to the buyer, with the invoice attached. Access: write, asks the user first. REST: POST /api/v1/ifirma/invoices/{invoice_id}/email. MCP: ifirma_write → send_invoice_email.

ParameterTypeRequiredDescription
invoice_idintegeryesInvoice ID from list_invoices.
recipient_emailstringnoDefault: the email on the contractor record.
messagestringnoText put before the standard message, up to 1000 characters.
include_transfer_detailsbooleannoAdd bank transfer payment information. Default: false.

Sends one invoice to the buyer's address stored in the contractor record, or to recipient_email if you give one. The sender address and message template must be set in the account, otherwise iFirma uses its defaults. Sending an invoice by email without offline QR codes means it will not be entered into KSeF, so send to KSeF first. By default you confirm each call; you can switch that off for this tool.

Example response:

{
  "invoice_id": 7020118,
  "sent_to": "billing@bluefern.example",
  "sent": true
}

record_payment

Record a payment received on an invoice. Access: write, asks the user first. REST: POST /api/v1/ifirma/invoices/{invoice_id}/payments. MCP: ifirma_write → record_payment.

ParameterTypeRequiredDescription
invoice_idintegeryesInvoice ID from list_invoices.
amountnumberyesAmount received, at most the amount still owed.
datestringnoYYYY-MM-DD the money arrived. Required for foreign-currency and cash-method invoices.

Adds a payment to one invoice. The amount cannot be more than what is still owed on it. For a foreign-currency invoice or a cash-method invoice, the payment date is required. iFirma then shows the invoice as paid or partly paid. By default you confirm each call; you can switch that off for this tool.

Example response:

{
  "invoice_id": 7020104,
  "amount": 800,
  "remaining": 0,
  "status": "paid"
}

book_ksef_purchase_invoice

Book a purchase invoice from KSeF as a cost. Access: write, asks the user first. REST: POST /api/v1/ifirma/ksefs/{ksef_number}/purchase-invoice. MCP: ifirma_write → book_ksef_purchase_invoice.

ParameterTypeRequiredDescription
ksef_numberstringyesKSeF number from list_ksef_purchase_invoices.

Does what "Zaksięguj" does on a document from list_ksef_purchase_invoices. It works for VAT and corrective invoices; advance and final invoices are booked in an order and are refused. The cost then appears in Wydatki, Lista wydatków. By default you confirm each call; you can switch that off for this tool.

Example response:

{
  "ksef_number": "7010003987-20261012-AB12CD34EF56-7A",
  "booked": true,
  "seller_number": "FV 118/2026",
  "gross": 800
}

add_expense

Add a cost document by hand: goods purchase, business cost or phone and internet bill. Access: write, asks the user first. REST: POST /api/v1/ifirma/invoices/{invoice_number}/expenses. MCP: ifirma_write → add_expense.

ParameterTypeRequiredDescription
typestringyesgoods_purchase, business_cost_invoice or phone_internet.
invoice_numberstringyesNumber printed on the supplier document.
expense_namestringyesName of the expense.
issue_datestringyesYYYY-MM-DD.
ksef_markingstringyesnumber, offline, bfk or di.
ksef_numberstringnoRequired when ksef_marking is number.
contractor_idstringnoContractor ID from list_contractors.
net_23numbernoNet amount at 23%. The same for net_8, net_5, net_0 and net_exempt.
vat_23numbernoVAT amount at 23%. The same for vat_8 and vat_5.

Adds one cost document with the amounts per VAT rate. KSeF marking is required: number (with ksef_number), offline, bfk or di. The seller is matched by contractor_id or NIP. The cost goes into your records. By default you confirm each call; you can switch that off for this tool.

Example response:

{
  "id": 3310027,
  "type": "phone_internet",
  "invoice_number": "2026/10/0042",
  "net": 81.3,
  "vat": 18.7,
  "gross": 100
}

send_payment_reminder

Email a Ponaglenie, Monit or Wezwanie do zapłaty for an unpaid invoice. Access: write, asks the user first. REST: POST /api/v1/ifirma/invoices/{invoice_id}/payment-reminders. MCP: ifirma_write → send_payment_reminder.

ParameterTypeRequiredDescription
invoice_idintegeryesInvoice ID from list_invoices.
typestringyesreminder, monit or demand.
send_copy_to_mebooleannoCopy to the seller email. Default: true.

Creates the reminder from the invoice and emails it to the buyer with a PDF. reminder is before the due date, monit is after it, and demand is the formal Wezwanie do zapłaty, which iFirma recommends sending by registered letter. The seller gets a copy unless send_copy_to_me is false. By default you confirm each call; you can switch that off for this tool.

Example response:

{
  "invoice_id": 7020104,
  "type": "monit",
  "sent_to": "office@harborprint.example",
  "copy_sent_to_me": true
}

How do I connect iFirma to ChatGPT, Claude, Cursor or Codex?

Connecting iFirma takes three steps: sign up, sign in to iFirma once in your Cloud Browser and enable it for agents, then add Cotlet to ChatGPT or Claude as a connector, with no API key, or add one MCP server or call the REST API with an API key.

Connect iFirma to your agent.

  1. Create an account Sign up and add iFirma in the console. ChatGPT and Claude need no API key: you sign in to Cotlet when you add the connector. Code editors and scripts take an API key from the console.

  2. Sign in to iFirma in your Cloud Browser Open your Cloud Browser in the console: your own Chrome in the cloud. Sign in to iFirma there yourself, the way you always do, then press Enable for agents, read only or read and write. We never save your password, and your agent keeps working even when your computer is off.

  3. Add Cotlet to ChatGPT, Claude or your agent Paste the snippet for your client. The same server and key serve every app you connect, so you do this once.

    ChatGPT:

Settings > Apps & Connectors > Create
MCP server URL: https://cotlet.dev/mcp/v1/connect
Authentication: OAuth

Claude:

Settings > Connectors > Add custom connector
URL: https://cotlet.dev/mcp/v1/connect

Claude Code:

claude mcp add --transport http cotlet \
  https://cotlet.dev/mcp/v1 \
  --header "Authorization: Bearer $COTLET_API_KEY"

Cursor:

{
  "mcpServers": {
    "cotlet": {
      "url": "https://cotlet.dev/mcp/v1",
      "headers": {
        "Authorization": "Bearer ${COTLET_API_KEY}"
      }
    }
  }
}

Codex:

# ~/.codex/config.toml
[mcp_servers.cotlet]
url = "https://cotlet.dev/mcp/v1"
bearer_token_env_var = "COTLET_API_KEY"
  1. Ask your agent Ask in plain words. Your agent finds the iFirma tools on the server and calls them for you; anything that reaches other people waits for your OK unless you switch that off for a tool.
Issue a domestic VAT invoice in iFirma for Blue Fern Studio: 2 x Website retainer, net 500.00 each, 23% VAT, due in 14 days. Find the contractor by NIP first. Show me the invoice before you issue it, then send it to KSeF and by email.

Call iFirma from your scripts.

  1. Export your API key Your scripts use the same API key as your agent. Keep it in an environment variable, never in your code.
export COTLET_API_KEY="cotlet_..."
  1. Call a tool Every tool is an endpoint under /api/v1/ifirma with its own method and path, listed with the endpoints above. Path parameters go in the URL; the other parameters go in the query for GET and DELETE and in a JSON body otherwise.
curl -X POST https://cotlet.dev/api/v1/ifirma/contractors/c_4817/invoices \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"calculate_from":"net","issue_date":"2026-10-14","sale_date":"2026-10-14","due_date":"2026-10-28","payment_method":"transfer","lines":[{"name":"Website retainer","quantity":2,"unit":"month","unit_price":500,"vat_rate":23}]}'
  1. Read the result You get plain JSON back, ready for your script. A failed call costs nothing.
{
  "id": 7020118,
  "number": "41/2026",
  "draft": false,
  "buyer": "Blue Fern Studio",
  "net": 1000,
  "vat": 230,
  "gross": 1230,
  "currency": "PLN",
  "issue_date": "2026-10-14",
  "due_date": "2026-10-28",
  "ksef_status": null
}

How to use the iFirma REST API

Create your Cotlet API key

Create a Cotlet API key with access to iFirma and its read operations. Store it as COTLET_API_KEY in your environment or automation platform's credential store.

Connect iFirma in Cotlet and enable it for agents. Account access: Your own iFirma account (the account holder; sales, KSeF and expenses must be part of your package).

Make your first iFirma API request

REST:

curl https://cotlet.dev/api/v1/ifirma/contractors \
  -H "Authorization: Bearer $COTLET_API_KEY"

Read contractors and apply the operation limits

A successful REST call puts the tool output in result. This illustrative response excerpt omits call IDs, messages and credit details.

Illustrative response excerpt:

{
  "status": "success",
  "app": "ifirma",
  "tool": "list_contractors",
  "result": {
    "contractors": [
      {
        "id": "c_4817",
        "name": "Blue Fern Studio",
        "nip": "1234563218",
        "email": "billing@bluefern.example",
        "city": "Gdansk",
        "postal_code": "80-001",
        "country_code": "PL"
      }
    ],
    "page": 1
  }
}

Returns contractors saved under Firma, Kontrahenci. Search by NIP or name to find a buyer or supplier before you invoice or book a cost.

Without a filter it returns the first page.

page: Page number. Default: 1.

Keep the same selection when continuing a list. Compare changed record values as well as identifiers when refreshing your destination.

iFirma workflows for agents and automations

ToolConnect throughExample workflow
n8nHTTP RequestSales invoices for a date range, with totals, payment and KSeF status. Use list_invoices in your configured operations sheet.
MakeHTTP > Make a requestOne invoice with its lines, buyer, payments and KSeF status. Use get_invoice in your configured operations sheet.
Python or Node.jsREST APIThe invoice as a PDF file, base64 encoded. Use get_invoice_pdf in your configured operations sheet.

Send Authorization: Bearer <your Cotlet API key> in request headers. You configure the schedule, destination and record comparisons.

Cotlet reads iFirma; your workflow steps write to your chosen destination. These HTTP workflows do not require a native Cotlet connector or a prebuilt template.

Python and Node.js can use the same HTTP requests without an AI agent. Keep access keys in credentials, outside shared workflow exports.

The API and MCP reference lists operations and inputs. The REST API guide explains authentication, errors and approvals.

Why use Cotlet for iFirma?

Built for agents

  • One MCP server for every app you connect.
  • The same tools as a REST API for scripts and cron jobs.
  • Works with ChatGPT, Claude, Claude Code, Codex and Cursor.

Your login stays yours

  • You sign in to iFirma yourself, in your own Cloud Browser. We never save your password; the profile is encrypted with AES-256-GCM, the cipher 1Password uses.
  • A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory.
  • The model never sees a login.
  • No stored passwords, no MFA bypass.

You stay in control

  • Scope each API key: its apps, its tools, read only or read and write.
  • Anything that reaches other people waits for your OK, so a leaked key cannot post or message as you.
  • Every background request listed in your Background activity. Disable for agents in one click.

Kept working for you

  • We test every integration every 6 hours.
  • When iFirma changes, the tool pauses until we fix it.
  • Failed calls cost nothing.

Is it safe to connect iFirma to Cotlet?

Yes. You sign in to iFirma yourself, in your own Cloud Browser, and we never save your password. Your agents only get iFirma once you enable it, and every background request is listed. The browser profile is stored encrypted with AES-256-GCM, the same cipher 1Password uses for its vaults and Apple for iCloud Keychain. Independent public scanners grade cotlet.dev A+ and find it clean; click a result to rerun it yourself.

  • A+ on Qualys SSL Labs: Encryption in transit: TLS setup and certificates, on all four server addresses. Live result
  • A+ on securityheaders.com: Browser protections sent with every page, all six headers present. Live result
  • A+ on Mozilla Observatory: Mozilla's web security baseline: score 120 of 100, 12 of 12 tests passed. Live result
  • Clean on Sucuri SiteCheck: No malware, spam or defacement, and not on any of 9 blocklists, Google Safe Browsing included. Live result

How Cotlet protects your access

Common concerns

Who runs Cotlet?

Cotlet is run by Take Group, a Polish software company working since 2019. Take Group runs about 3,200 websites on its own systems and has its own DevOps team for infrastructure security. We built and used integrations like this inside the company for years before opening them as Cotlet.

Is this an official iFirma integration?

No, Cotlet is independent of iFirma. iFirma's own API is too limited for this work. Cotlet works through your own iFirma account, the way you use iFirma in the browser.

What about client data and GDPR?

Cotlet is run from the EU and follows the GDPR. Cloud Browsers run in Finland, a Tier 1 country in the ITU Global Cybersecurity Index 2024. Data passes through a call and is not kept after it.

Can I start with read only?

Yes. Enable the app for agents as read only, or make the API key read only, and anything that reaches other people waits for your OK unless you switch that off per tool.

Is it reliable?

Every Cotlet service is checked every 3 minutes from Europe, North America, Asia and Australia. The live results and any outage are public at status.cotlet.dev.

How do I stop?

Press Disable for agents next to iFirma in your console: your agents lose access at once and you stay signed in. Signing out of iFirma in the browser works too, and Reset browser deletes the whole profile.

Is there a iFirma MCP server on GitHub?

Yes. Community iFirma MCP servers exist on npm and GitHub, usually maintained by one person. You install one on your own computer, give it your API keys, and keep it running yourself; when iFirma changes the API, it stops working until you or the maintainer fix it. The official API is the other route: you register for access and write the code. Cotlet hosts the same tools for you, with one key and one sign-in, and our team keeps them working.

GitHub MCP server or the APICotlet
SetupActivate API access, generate the keys, install the server or write signed requests, add it to each MCP clientSign up, sign in to iFirma once, add one MCP server or API key
When iFirma changesIt breaks until you or the maintainer fix itOur team tests it daily and fixes it for you; failed calls are free
Your iFirma accessAPI keys with account-wide rights, kept in a config file on your computerSigned in inside your own Cloud Browser in the EU, profile encrypted, only for the apps you enable, disabled for agents in one click; no keys to paste
Features outside the APINot available: KSeF purchase invoices and payment reminders have no API callIncluded: the agent works in the app itself, so Wydatki and Windykacja are reachable
UpkeepYou update, monitor and debug it yourselfNothing to host or update
Where it runsYour computer, while it is onHosted: Claude Code, Codex, Cursor, n8n and scripts, also on a schedule
PriceFree, paid for with your timeFree 7-day trial, then pay-as-you-go credit packs, no subscription

Which one fits you

Pick Cotlet if

  • you are not a developer, or you do not want to maintain a server
  • you need it to keep working when iFirma changes, without checking it yourself
  • your agent or a script should run it on a schedule, also while your computer is off

Pick an open-source server if

  • you are comfortable installing, updating and fixing it yourself
  • you want your sign-in to stay on your own computer
  • you only need it now and then, from one MCP client

How much does the iFirma API cost?

Free 7-day trial with 2,000 credits, no card needed. After that, the iFirma API is pay as you go with no limit on apps: Credit packs from $29 for 5,000 credits, one-time, no subscription. A successful call uses 10 to 100 credits (10 for most tools, about $0.04 to $0.06), your Cloud Browser uses 50 credits a day while it has an app enabled for agents, however many apps that is, and an agent driving the browser itself uses 5 credits a minute. Credit packs stay valid for 12 months and stack, so unused credits carry over.

CreditsPrice, one timeCalls at 10 creditsPer 1,000 credits
5,000$29500$5.80
15,000$791,500$5.27
32,000$1493,200$4.66
60,000$2496,000$4.15

Only successful calls use credits; failed calls and timeouts cost nothing. At a balance of 0 calls pause, never a surprise charge. Authenticate with the Authorization: Bearer header. See full pricing

How Cotlet holds your access

Cotlet hosts MCP servers and REST APIs for apps with no usable API. Your agent works in your own iFirma account.

  • Company details: Cotlet is run by Take Group sp. z o.o., a company registered in Poland. Its full address and registration numbers are in the Terms of service. Terms of service
  • Your sign-in: You sign in to iFirma yourself, in your own Cloud Browser: a Chrome we run for you in the EU, one per app. We never save your password (password saving is off), the profile is stored encrypted with AES-256-GCM, and your agents get iFirma only after you enable it. When iFirma signs you out, your agent gives you a link to sign in again. Security
  • Revoking access: Press Disable for agents next to iFirma, sign out of iFirma in your Cloud Browser, or reset the browser. Every background request is listed in your Background activity. Actions that reach other people wait for your OK unless you switch that off per tool.
  • What we never do: Store passwords or bypass MFA.
  • iFirma's terms: You use your own iFirma account and stay responsible for following iFirma's terms. Cotlet is independent and not affiliated with iFirma. Terms
  • Contact: Questions about the company, security or an app: contact@cotlet.dev

Also listed on: Odel, mcpbeat

iFirma API and MCP: questions

How do I get access?

Sign up free, open iFirma in the console and press Activate. Then you create your API key and connect iFirma there.

Do I need to be technical?

No. You sign in to iFirma once in your Cloud Browser, a normal Chrome you open from the console, and paste one command into your agent, or one URL into n8n. Your agent can walk you through it. There is no server to install, update or fix.

Is it safe to connect iFirma to Cotlet?

Yes. You sign in to iFirma yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get iFirma once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

Is a hosted server safer than a local one? My iFirma sign-in would leave my computer.

On Cotlet you sign in inside your own Cloud Browser, which only you open, and its profile is stored encrypted with AES-256-GCM in the EU. Agents get only the apps you enable, and every background request is listed. A local server keeps your iFirma cookie in a plain file on your computer, readable by any program you run, and stops when your computer is off.

Why does Cotlet send requests instead of clicking in my browser?

To be fast, Cotlet doesn't click through iFirma's pages. It sends the same requests your browser would, from your browser's IP with its cookies, without opening a window. iFirma sees the same browser and IP you signed in with, and every request is listed in your Background activity.

What if someone gets my Cotlet API key?

The key holds no iFirma login or cookies, it only asks Cotlet to run a tool. It can call only the apps and tools you gave it, and a read-only key changes nothing. Anything that reaches other people, like posts, comments or messages, waits for your OK in the dashboard by default, so a leaked key cannot post or message as you. When you switch approval off for a scheduled job, give that job its own key limited to that one tool. Every call is in your activity log, and deleting the key ends access at once.

Why a signed-in browser and not OAuth, like other integration platforms?

iFirma offers no OAuth token you can simply grant for these tools: its official API leaves them out or needs a developer app, a plan or an approval first (see the official API section above). That is why Cotlet sets the limits itself: per key, per tool, with your approval before anything reaches other people. Cotlet is run by Take Group sp. z o.o., an EU company (VAT PL6342984273).

How do I connect iFirma to ChatGPT or Claude?

Sign up at cotlet.dev, log in to iFirma once in its Cloud Browser and add Cotlet to ChatGPT or Claude, following the steps in your console. No API key is needed. ChatGPT and Claude then work in your iFirma account through Cotlet, in their phone apps too.

What can ChatGPT do in iFirma?

With Cotlet, ChatGPT, Claude and other AI agents handle jobs like these in iFirma: issue an invoice and send it to KSeF; book purchase invoices from KSeF as costs; chase unpaid invoices. You ask in plain words, and anything that reaches other people waits for your OK first.

Do I need to activate the iFirma API or pay for it?

No. Cotlet works from your signed-in account, so no API keys. For comparison, the API is activated in your account: basic access is for under 1000 invoices a month, and subscribers can issue up to 1000 documents a month through it; more needs an individual quote.

Which iFirma packages does KSeF purchase invoice download work on?

iFirma lists downloading from KSeF for Księgowość internetowa and for the faktura plus and darmowa faktura packages. Booking the invoices is done under Wydatki.

Can my agent post or send messages in iFirma without asking me?

No. Every call to issue_invoice, send_invoice_to_ksef, send_invoice_email, record_payment, book_ksef_purchase_invoice, add_expense or send_payment_reminder waits for your OK by default. For scheduled automations you can switch confirmation off per tool in your dashboard, for example only for approvals. create_contractor and save_invoice_draft run without asking, because they send nothing to anyone and one call undoes it.

Can I use the iFirma API in n8n?

Yes. Add https://cotlet.dev/mcp/v1 with your API key in n8n's MCP Client node, or call its endpoints under https://cotlet.dev/api/v1/ifirma from the HTTP Request node.

Can I use the iFirma API without an AI agent?

Yes. Call Cotlet's REST API from a script or an HTTP step in n8n, Make or Zapier with your Cotlet key. MCP is the alternative for AI agents; you do not need to connect an agent to use REST.


Give your AI agents your signed-in browser.

Product: Integrations · How it works · Pricing · Security

Resources: Blog · API docs · Help center · Changelog · GitHub

Solutions: For developers · For automation agencies

Company: About · AI info: company facts · Contact

Legal: Terms of service · Privacy policy · Refund policy · Acceptable use · Cookie policy · DPA · Subprocessors

Elsewhere: Status page · Cotlet on GitHub · Cotlet on X · Cotlet on LinkedIn · Cotlet on Product Hunt · Cotlet on Crunchbase · Cotlet on SaaSHub

Cotlet.dev is built by Bart Krawczyk and Jake Slugocki, the founders of Take Group sp. z o.o., ul. Wincentego Janasa 4, 40-855 Katowice, Poland. KRS 0000871398, NIP 6342984273, VAT EU: PL6342984273. About us

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by any of the products listed on this site. Product names are trademarks of their respective owners.