Oblio MCP server
Issue and track a Romanian company's invoices from your AI assistant, through
Oblio's API. It reads clients, products, series, VAT
rates and issued invoices; it issues invoices and proformas, records payments,
and cancels, restores, reverses or deletes invoices. Every tool that makes,
changes or unmakes a fiscal document is money: your client asks you first,
and shows the total computed the way ANAF (Romania's tax authority) checks it.
You need an Oblio account, its API secret, and the tax id (CIF) of the
company the server should act on. There is no sandbox: an invoice issued here
is real and takes the next number in its series.
What you can ask
- "Which invoices from September are still unpaid?"
- "Invoice Client SRL for 8 hours of consulting at 1,000 RON an hour plus 21%
VAT, due in 30 days."
- "Client SRL paid 1,000 EUR on invoice FCT 0042 by bank transfer today.
Record it."
- "Turn proforma PRF 0007 into an invoice."
- "Reverse invoice FCT 0042, and keep the payment recorded on it."
Install

With Claude Code:
claude mcp add oblio -e OBLIO_CONFIG="<path to Oblio app.json>" -- npx -y @foreverworks/mcp-oblio
Claude Desktop (Settings, Developer, Edit Config) and most other clients read the same command as JSON:
{
"mcpServers": {
"oblio": {
"command": "npx",
"args": ["-y", "@foreverworks/mcp-oblio"],
"env": {
"OBLIO_CONFIG": "<path to Oblio app.json>"
}
}
}
}
Each runs the published package on Node 22.19 or newer. VS Code and the Claude Desktop bundle ask for OBLIO_CONFIG as they add the server. Cursor reads it from your environment instead (${env:OBLIO_CONFIG}), so set it before you start Cursor. Configuration says what it holds.
From a clone
git clone https://github.com/foreverworks/mcps.git && cd mcps
npm ci && npm run build
claude mcp add oblio -e OBLIO_CONFIG="<path to Oblio app.json>" -- node "$PWD/servers/oblio/dist/index.js"
In a JSON configuration, the command is node and its one argument the full path of servers/oblio/dist/index.js. To share one running copy between several clients over HTTP, see docs/deploying.md.
Configuration
| Variable |
Required |
Meaning |
OBLIO_CONFIG |
yes |
Path of app.json (below), which the server only reads. Under systemd, when this is unset, app.json in CREDENTIALS_DIRECTORY (LoadCredential=app.json:<path>) is used. |
OBLIO_STATE_DIR |
no |
Where the access-token cache goes; the default is in docs/configuration.md. |
app.json holds three values, all required:
{
"client_id": "<the email you sign in to Oblio with>",
"client_secret": "<the API secret>",
"company_cif": "<the CIF of the company every call acts on>"
}
company_cif has no default, so no call can act on a company nobody named.
api_base and token_url override Oblio's endpoints, for tests or a proxy.
The server never writes app.json, and its errors name a bad field, never a
value.
Getting the API secret
- Sign in to the Oblio web app.
- Open Settings, then Account Data (Setari, Date cont), and copy the API
secret.
- Put it in
app.json as client_secret, with the email you signed in with
as client_id.
Oblio makes a new secret every time the account's password is reset, so after
a reset app.json needs the new one.
The state folder holds access_token.json, the hour-long token Oblio issues
for the secret, written with mode 0600 and locked across processes. The
variables every server shares (transport, limits, confirmation) are in
docs/configuration.md.
First run
- Ask your assistant to run Oblio's
health check. It answers with the
account, the company CIF from app.json, and whether the account reaches
that company. A refused secret shows up here, before anything is issued.
- Ask for your series (
list_series) and VAT rates (list_vat_rates): an
invoice names its series and each line's rate by the names Oblio gives
them.
From a shell, node dist/index.js --health prints one OBLIO: line and exits
non-zero when the credentials do not work, which suits a timer.
Tools
read changes nothing; write changes something in your Oblio account;
money makes, changes or unmakes a fiscal document, and your client asks you
before each call.
| Tool |
Access |
What it does |
health |
read |
Whether the server is up, as which account, on which company CIF, and whether the account reaches that CIF. Always asks Oblio. |
list_companies |
read |
The companies the account is attached to. Cached 10 minutes. |
list_clients |
read |
Saved clients, filtered by name or CIF, a page at a time. Never cached. |
list_products |
read |
Saved products and services, filtered by name or code, a page at a time. Never cached. |
list_series |
read |
The document series and the number each one issues next. Cached 10 minutes, and forgotten after any issue or delete. |
list_vat_rates |
read |
The VAT rates a line's vat_name and vat_percentage come from. Cached 10 minutes. |
list_invoices |
read |
Issued invoices by period, series, buyer, status (unpaid, paid, cancelled) and e-Factura state (e-Factura is ANAF's e-invoicing system), newest first, a page at a time. |
get_invoice / get_proforma |
read |
One document by series and number: its PDF and e-Factura links, its total and its payments. |
create_proforma |
write |
Issues a proforma. It is not a fiscal document, but it takes a number in its series. |
create_invoice |
money |
Issues an invoice. |
invoice_from_proforma |
money |
Issues an invoice that references a proforma, with the proforma's client, lines and total. |
collect_invoice |
money |
Records a payment received against an issued invoice: how, how much, when, and its reference. |
cancel_invoice / restore_invoice |
money |
Cancels an invoice (its number stays used), or undoes that. |
reverse_invoice |
money |
Issues the reversing invoice (storno) for an issued one, its total exactly the original's, negated. |
delete_invoice |
money |
Removes an invoice for good. Oblio allows it only for the last number in a series. |
Money
The seven money tools are marked so in tools/list, and your client asks you
to approve each call (Claude Code does, in every permission mode). With
MCP_CONFIRM=elicit the server asks you itself instead, in one line computed
from the arguments. For example:
Issue invoice in series FCT to Client SRL (CIF RO87654329): 9680.00 RON incl. VAT 1680.00 (1 line), dated 2026-09-28, due 2026-10-28, marked paid by Ordin de plata OP 7001
Record 1000.00 EUR paid on invoice FCT 0042 to Client SRL, Ordin de plata OP 7001, 2026-10-02, leaving 210.00 EUR unpaid
Issue a reversing invoice for FCT 0042, Client SRL, total -9680.00 RON, in series FCT, keeping the payment recorded on it
DELETE invoice FCT 0042 totalling 9680.00 permanently (no undo; only the last number in a series can be deleted, and anything already sent to ANAF stays there)
The first line is the document in Document input, below.
The last is delete_invoice given expect_total; without it the line says
"total not given, so not checked". The server puts its name first, so you read
oblio: Issue invoice ....
What you approve is what is issued:
- The total you confirm is the total issued. It is computed by
documentTotal (the kit's invoiceTotals.ts), the same function whose
result create_invoice returns as computedTotal. After issuing, the
document is read back, and if Oblio's total differs the call fails with
reason: "total_mismatch", naming the document that was issued.
invoice_from_proforma reads the proforma first and holds the invoice to
its total.
- Cancel, restore and delete read the invoice first and answer with what it
totalled, the document Oblio acted on and the company's CIF. Given
expect_total, a number that names an invoice of another total changes
nothing. (Oblio's document read carries no buyer, so the buyer cannot be
checked the same way.)
- A payment is checked against the invoice: the server refuses a cancelled
invoice, one already paid in full, and an amount over what is still owed,
saying how much that is.
Troubleshooting
auth: "Oblio refused the client_id and secret". The secret changed,
usually after a password reset. Copy the new one from Settings, Account Data
into app.json.
api with reason: "outcome_unknown" after an issue or a delete. The
connection dropped, so nobody knows whether Oblio acted. Look the document up
first (get_invoice, or Oblio's web app). If it is not there, call again with
the idempotency_key the error reported: Oblio will not issue the same key
twice. A repeated collect_invoice is safe as it is: it finds the payment if
it landed and records nothing.
api with reason: "total_mismatch". The document was issued, but
Oblio's total is not the one you confirmed. Open it (get_invoice or
get_proforma) and cancel it if it is wrong; do not issue it again.
api with Oblio's own message, such as "Seria FCT nu exista". The message
names the field or series at fault; list_series and list_vat_rates give
the names Oblio expects.
api with status 401 or 403 on a call. The account cannot act on the
company in company_cif; health and list_companies show which companies
it reaches.
api with reason: "drift". Oblio's answer changed shape. The server
refuses to guess; please report it.
How it works
Document input
create_invoice and create_proforma take the document as a validated input
modelled on Oblio's "Parametri document" table, in snake_case. The company's
CIF is not part of it: it comes from app.json, so no pasted example can issue
against another company.
{
"client": { "name": "Client SRL", "cif": "RO87654329", "vat_payer": true },
"series_name": "FCT",
"issue_date": "2026-09-28",
"due_date": "2026-10-28",
"currency": "RON",
"products": [
{ "name": "Consulting", "price": "1000.00", "quantity": "8", "measuring_unit": "ora",
"vat_name": "Normala", "vat_percentage": "21", "vat_included": false, "product_type": "Serviciu" }
],
"collect": { "type": "Ordin de plata", "document_number": "OP 7001" }
}
- Every amount is a decimal string (
"1000.00"), checked by a pattern and
sent to Oblio as that string, so it never passes through a floating-point
number. The arithmetic is the kit's exact decimal.ts.
vat_included is required on every line, because Oblio's default
("included") silently turns a net price into a gross one. vat_percentage
is required because the total you confirm is computed from it.
- The buyer's code and IBAN are checked by their check digits: a Romanian
buyer's
cif must be a CIF with a valid control digit or a valid CNP (a person's numeric code), so a
transposed digit cannot send the invoice to another company. A buyer whose
country is another country passes as written. With send_email, the
answer's emailedTo says where Oblio sent the invoice.
- Series and numbers are checked for their form: a series is letters and
digits as
list_series shows it; a number is digits only, as text
("0042").
- Everything else that would go wrong is refused before sending, all at
once (
src/domain/rules.ts): more decimals than precision (Oblio would
round silently), a zero quantity, a negative price, a rate outside 0-100, a
due date before the issue date, a Chitanta without its receipt series, any
other payment without its reference.
- A retry cannot issue twice. Oblio refuses a second document with the same
idempotency_key. When you give none, the key is derived from the document
(its kind, the company, its content and its issue date: src/domain/keys.ts).
To issue a deliberately identical document the same day, give a key of your
own.
The total
EN 16931's rule, which ANAF validates every e-Factura against and Oblio
follows: a line's amount is quantity times price, rounded to 2 decimals; VAT is
computed once per rate on the sum of those amounts (VAT-inclusive and
VAT-exclusive lines at one rate are two groups, each rounded once); the total
is amounts plus VAT. The VAT inside a VAT-inclusive gross is gross x rate /
(100 + rate). Rounding is half away from zero throughout, as PHP's round()
does. Because that rounding is symmetric, a storno's lines add up to the
original's total exactly, negated; the tests check it on the rounding cases.
Payments and reversals