aikount-mcp

v0.2.0
io.github.mutonby/aikount-mcp Checked 1 day ago Published 1 month ago

Contabilidad 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.

ParameterTypeDescription
kind
limitinteger
offsetinteger
search

create_contact

Create a contact. `country` is an ISO-3166 alpha-2 code (e.g. 'ES').

ParameterTypeDescription
name *string
country
email
is_customerboolean
is_supplierboolean
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.

ParameterTypeDescription
limitinteger
offsetinteger
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.

ParameterTypeDescription
contact_id
from_date
limitinteger
offsetinteger
status
to_date

get_invoice

Fetch one sales invoice in full by UUID.

ParameterTypeDescription
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…

ParameterTypeDescription
contact_id *string
doc_date *string
lines *array
currencystring
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.

ParameterTypeDescription
doc_id *string

list_purchases

List purchase documents (supplier invoices / expenses).

ParameterTypeDescription
contact_id
from_date
limitinteger
offsetinteger
to_date

get_purchase

Fetch one purchase document in full by UUID.

ParameterTypeDescription
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…

ParameterTypeDescription
file_path *string
forceboolean

get_ingest_job

Poll the status/result of an AI ingest job (see ingest_purchase_pdf).

ParameterTypeDescription
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.

ParameterTypeDescription
limitinteger
offsetinteger

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.

ParameterTypeDescription
from_date
limitinteger
offsetinteger
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.

ParameterTypeDescription
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).

ParameterTypeDescription
group
limitinteger
offsetinteger
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.

ParameterTypeDescription
account_id *string
from_date
limitinteger
offsetinteger
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).

ParameterTypeDescription
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.

ParameterTypeDescription
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).

ParameterTypeDescription
method *string
path *string
body
params