# mcp-quipu [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/nubiia-dev/mcp-quipu  
**GitHub Stars:** 0  
**npm Downloads (last month):** 213  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-quipu

## Description
Quipu API integration with 18 MCP tools for invoices, expenses, contacts and Spanish VAT reporting

## Tools
Capabilities this server exposes over MCP:

- **list_contacts** — List contacts (clients and suppliers) from Quipu. Returns id, name, tax_id (NIF/CIF), email, phone and address fields. Results are paginated: use `page` to walk through pages. Quipu returns JSON:API, but this tool flattens each resource so attributes appear at the top level alongside `id`.
- **get_contact** — Get a single Quipu contact by its id, with all available attributes (name, tax_id, email, phone, address, town, zip_code, country_code).
- **create_contact** — Create a contact in Quipu. `name` is required. Provide `tax_id` (NIF/CIF) whenever the contact will be invoiced — Spanish invoices require it and Quipu will reject the invoice later without it.
- **update_contact** — Update an existing Quipu contact. Only the fields you pass are modified; everything else is left untouched.
- **delete_contact** — Delete a Quipu contact permanently. Quipu refuses to delete contacts that already have invoices attached; in that case the API returns an error explaining it.
- **list_invoices** — List issued invoices from Quipu, with number, issue_date, due_date, total, subtotal and payment status. Paginated via `page`. Use `filter_from` and `filter_to` to bound the period — this is the tool to use when asked about revenue or VAT for a quarter, since Quipu has no endpoint that returns tax models directly and the figures must be derived from invoices.
- **get_invoice** — Get a single Quipu invoice by id, with all of its attributes and totals.
- **create_invoice** — Create an issued invoice in Quipu. Requires the contact id it is billed to and at least one line item. The contact must already have a tax_id (NIF/CIF) or Quipu will reject the invoice.
- **update_invoice** — Update an existing Quipu invoice. Note that Spanish invoicing rules restrict what can change once an invoice is issued and numbered; Quipu returns an error when a field is locked.
- **delete_invoice** — Delete a Quipu invoice permanently. Spanish invoicing rules generally require issuing a credit note instead of deleting a numbered invoice — prefer that unless the invoice is still a draft.
- **get_invoice_download_url** — Get a temporary public URL to download a Quipu invoice as PDF. The link is ephemeral and expires, so fetch it when the user actually needs the document rather than storing it.
- **list_additional_incomes** — List additional incomes and expenses recorded in Quipu — everything that is not an issued invoice: supplier bills, purchases, tickets and other deductible costs. Returns kind, total_amount_without_taxes, vat_amount and retention_amount. Bound the period with `filter_from` / `filter_to`. This is the input-VAT side needed to work out what a quarter actually owes.
- **get_additional_income** — Get a single additional income or expense entry from Quipu by its id.
- **create_additional_income** — Record an expense or additional income in Quipu. Use it to log supplier bills and deductible costs. Assign an `accounting_category_id` whenever you know it — an uncategorised expense still counts for VAT but is useless for the profit and loss breakdown.
- **update_additional_income** — Update an existing additional income or expense in Quipu. Only the fields passed are modified.
- **delete_additional_income** — Delete an additional income or expense entry from Quipu permanently.
- **get_additional_income_download_url** — Get a temporary public URL to download an expense document as PDF. The link is ephemeral and expires.
- **get_tax_summary** — Work out the VAT and IRPF position for a period from the invoices and expenses recorded in Quipu. Give it a year and a quarter (or an explicit date range) and it returns output VAT charged on invoices, input VAT paid on expenses, the resulting balance, and withholdings. Use this instead of listing invoices and adding them up by hand: Quipu has no endpoint that returns tax models (130, 303, 111), so the figures must be derived, and doing the arithmetic in code avoids the mistakes that come from adding long lists token by token. Treat the result as an estimate for orientation, not as a filed return.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-quipu": {
    "command": "npx",
    "args": ["-y","@nubiia/mcp-quipu"],
    "env": {
      "QUIPU_CLIENT_ID": "",
      "QUIPU_CLIENT_SECRET": "",
      "QUIPU_OWNER_SLUG": ""
    }
  }
}
```

**Requires environment variables:** `QUIPU_CLIENT_ID`, `QUIPU_CLIENT_SECRET`, `QUIPU_OWNER_SLUG` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What mcp-quipu does

mcp-quipu exposes selected Quipu API operations through the Model Context Protocol. Its scope covers four areas: contacts, issued invoices, additional income and expenses, and fiscal aggregation. The 18 available tools support both read and write operations, including creating invoices with line items, VAT, and personal income tax withholding, registering deductible expenses, and obtaining temporary PDF download URLs.

The tax tool calculates VAT charged, VAT paid, the resulting balance, and withholdings for a quarter or arbitrary date range. It derives these values from invoice and additional-income records rather than calling a Quipu tax-model endpoint.

## How it works

The server communicates with Quipu using OAuth2 rather than a static API key. It caches access tokens in memory, refreshes them 60 seconds before expiry, shares one refresh request among concurrent calls, and retries after invalidating a token that receives a 401 response.

Quipu returns JSON:API documents with nested `data`, `id`, and `attributes` fields. mcp-quipu converts these into flat objects such as `{ id, ...attributes }` before returning them to the assistant. This keeps responses focused on the record fields exposed by Quipu.

For tax summaries, the implementation reads all pages of the relevant invoice and additional-income resources, parses the monetary values, rounds calculations to cents, and returns the computed totals. Decimal commas are accepted; empty amounts are ignored, while values that cannot be parsed are excluded with a warning.

## Setup and configuration

Install the package globally with npm:

```bash
npm install -g @nubiia/mcp-quipu
```

The MCP client configuration runs the package through `npx` and supplies three environment variables:

```json
{
  "mcpServers": {
    "quipu": {
      "command": "npx",
      "args": ["-y", "@nubiia/mcp-quipu"],
      "env": {
        "QUIPU_CLIENT_ID": "your_client_id",
        "QUIPU_CLIENT_SECRET": "your_client_secret",
        "QUIPU_OWNER_SLUG": "your_account_slug"
      }
    }
  }
}
```

Create or obtain the OAuth2 credentials in Quipu under Configuration → API. `QUIPU_OWNER_SLUG` is the first path segment in the account's Quipu URL.

## Tools and capabilities

- List, inspect, create, update, and delete contacts; contact searches support name filters and pagination.
- List, inspect, create, update, and delete issued invoices, with optional date-range filtering for lists.
- Generate temporary PDF URLs for invoices.
- List, inspect, create, update, and delete additional income or expense entries, with date-range filtering.
- Generate temporary PDF URLs for additional-income records.
- Calculate VAT charged, VAT paid, tax balance, and withholdings for a selected period.

## Limitations and notes

Only the mapped contact, invoice, additional-income, and tax-summary operations are exposed. Other Quipu API areas, including simplified invoices, paysheets, numbering series, accounting categories, attachments, and book entries, are outside the current tool set.

Write operations use stricter limits than reads, and destructive operations are marked with a destructive hint. Deleting a numbered invoice can conflict with Spanish invoicing requirements, which generally call for a corrective invoice instead. The API permits the delete operation, but it should not be treated as the normal way to correct an issued document.

Quipu field names for amounts are explicit: the pre-tax amount is `total_amount_without_taxes` and the tax amount is `vat_amount`. The server does not expose Quipu's tax models; its fiscal summary is calculated from the records it retrieves.

_Full upstream README: https://allmcps.com/mcp/mcp-quipu/readme_

