aikount-mcp
v0.2.0Contabilidad española con IA: facturas, gastos por OCR, conciliación bancaria e impuestos AEAT.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
whoami
Verify the token and return the active tenant (id, name, VAT, currency…). Call this first. A 200 confirms the token works; a 401/403 means it is missing, revoked, or malformed. Note: with an 'agl_' API key this reads /tenants/me. The /auth/me endpoint is reserved for interactive session logins (onboarding/membership flow) and deliberately rejects API keys.
list_contacts
List contacts (customers and suppliers). Args: search: free-text match on name / legal name / VAT. kind: 'customer' or 'supplier' to filter; omit for both. limit: page size (1-500, default 50). offset: pagination offset.
| Parameter | Type | Description |
|---|---|---|
kind | ||
limit | integer | |
offset | integer | |
search |
create_contact
Create a contact. `country` is an ISO-3166 alpha-2 code (e.g. 'ES').
| Parameter | Type | Description |
|---|---|---|
name * | string | |
country | ||
email | ||
is_customer | boolean | |
is_supplier | boolean | |
legal_name | ||
notes | ||
vat |
list_tax_types
List the tenant's tax types (IVA/IGIC/IPSI/IRPF), each with its UUID. Invoice/purchase lines reference a tax by `tax_type_id` (a UUID from this list), not by a string code — call this to resolve which UUID is the 21% IVA, the 10% reducido, exento, etc.
list_products
List catalog products/services.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
offset | integer | |
search |
list_invoices
List sales invoices. Lifecycle: draft -> issued -> paid. Args: status: e.g. 'draft', 'issued', 'paid'. contact_id: filter to one customer (UUID). from_date / to_date: ISO 'YYYY-MM-DD' bounds on doc_date.
| Parameter | Type | Description |
|---|---|---|
contact_id | ||
from_date | ||
limit | integer | |
offset | integer | |
status | ||
to_date |
get_invoice
Fetch one sales invoice in full by UUID.
| Parameter | Type | Description |
|---|---|---|
doc_id * | string |
create_invoice
Create a DRAFT sales invoice (call issue_invoice to assign a number). Money is in MAJOR units (euros as decimals), e.g. unit_price 1200.00 — NOT cents. Each line is a dict: { "description": "Consultoría mayo", # required "quantity": 1, # default 1 "unit_price": 1200.00, # default 0, euros "tax_type_id": "<uuid>", # from list_tax_types; omit # to inherit the contact/ # product d…
| Parameter | Type | Description |
|---|---|---|
contact_id * | string | |
doc_date * | string | |
lines * | array | |
currency | string | |
due_date | ||
notes | ||
series_id |
issue_invoice
Issue a draft invoice — assigns the next sequential legal number. Irreversible-ish: issued numbers must stay contiguous, so do not delete issued invoices to "renumber". Confirm with the user before issuing.
| Parameter | Type | Description |
|---|---|---|
doc_id * | string |
list_purchases
List purchase documents (supplier invoices / expenses).
| Parameter | Type | Description |
|---|---|---|
contact_id | ||
from_date | ||
limit | integer | |
offset | integer | |
to_date |
get_purchase
Fetch one purchase document in full by UUID.
| Parameter | Type | Description |
|---|---|---|
doc_id * | string |
ingest_purchase_pdf
Queue a purchase PDF/image for AI extraction (OCR -> deduped purchase). The AI reads the supplier, lines and taxes and creates the purchase doc, deduplicating by invoice identity (contact + supplier_invoice_number, fallback total + date) so the same invoice never lands twice. Runs async: this returns a job immediately — poll get_ingest_job(job_id) until its status is done, then read result for the created document. Args: file_path: local path to a PDF / JPG / PNG / WebP / HEIC. force: bypass dedup and ingest anyway (use only when you are sure it…
| Parameter | Type | Description |
|---|---|---|
file_path * | string | |
force | boolean |
get_ingest_job
Poll the status/result of an AI ingest job (see ingest_purchase_pdf).
| Parameter | Type | Description |
|---|---|---|
job_id * | string |
list_treasuries
List treasuries (bank / Stripe / PayPal accounts) with balances. Stripe/PayPal treasuries return a live balance pulled on read; bank-feed treasuries return the last synced snapshot.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
offset | integer |
list_bank_movements
List bank movements, optionally scoped to one treasury. Args: treasury_id: restrict to a single treasury (UUID). status: e.g. 'unreconciled' / 'reconciled'. from_date / to_date: ISO date bounds. search: free-text match on the movement description.
| Parameter | Type | Description |
|---|---|---|
from_date | ||
limit | integer | |
offset | integer | |
search | ||
status | ||
to_date | ||
treasury_id |
reconciliation_board
Get the reconciliation board: suggested movement<->document matches. The system auto-reconciles matches with confidence >= 0.95; everything below is a suggestion to confirm (reconcile_movement) or dismiss.
reconcile_movement
Manually match a bank movement to an invoice/purchase document. Args: movement_id: bank movement UUID. document_id: invoice or purchase UUID.
| Parameter | Type | Description |
|---|---|---|
document_id * | string | |
movement_id * | string |
list_accounts
List the Spanish PGC chart of accounts (code, name, UUID, balance). Use this to resolve an account's UUID for `ledger`, or to browse by `group` (1-7, the leading PGC digit: 5 = financial accounts, 4 = receivables/payables, …) or free-text `search` (code or name).
| Parameter | Type | Description |
|---|---|---|
group | ||
limit | integer | |
offset | integer | |
search |
ledger
Read ledger movements for ONE PGC account. Args: account_id: the account's UUID (required). Resolve it from list_accounts — e.g. find the account whose code is '572' (bancos) and pass its id here. from_date / to_date: ISO date bounds.
| Parameter | Type | Description |
|---|---|---|
account_id * | string | |
from_date | ||
limit | integer | |
offset | integer | |
to_date |
trial_balance
Balance de sumas y saldos (trial balance) across every account. A one-shot overview of all account balances — no account_id needed. Args: at_date: ISO date to compute balances as of (default: today).
| Parameter | Type | Description |
|---|---|---|
at_date |
modelo_303_summary
Modelo 303 (quarterly VAT) — JSON summary of every quarter with activity. One row per (year, quarter): sales base, output VAT, rectified VAT, input VAT, and the net amount to pay. Use this for a machine-readable overview; use modelo_303_csv for the AEAT-format file of one quarter.
modelo_303_csv
Modelo 303 backing detail for one quarter as CSV text. Returns the per-transaction breakdown (one row per invoice/purchase line: date, doc, contact, base, rate, iva, input/output) that the quarter's VAT figures are built from — useful for auditing the numbers. For the aggregated box totals, use modelo_303_summary. Args: year: e.g. 2026. quarter: 1-4.
| Parameter | Type | Description |
|---|---|---|
quarter * | integer | |
year * | integer |
api_request
Call any Aikount API endpoint not covered by a dedicated tool. The full surface is documented at https://api.aikount.com/openapi.json — fetch it (e.g. api_request('GET', '/../openapi.json')) when you need an endpoint this server doesn't wrap. Args: method: GET / POST / PATCH / DELETE. path: API path relative to the base, e.g. '/invoices' or '/contacts/<uuid>'. Leading slash optional. params: query parameters. body: JSON body (for POST/PATCH).
| Parameter | Type | Description |
|---|---|---|
method * | string | |
path * | string | |
body | ||
params |