Frihet MCP Skill
Business assistant inside Claude Code. Manage invoices, expenses, clients, products, and quotes in plain language — with built-in Spanish tax intelligence.
Requires: Frihet account with API access + @frihet/mcp-server configured as MCP server.
Setup
1. Configure the MCP server
Add to your Claude Code MCP config (~/.claude/mcp.json or project .mcp.json):
{
"mcpServers": {
"frihet": {
"command": "npx",
"args": ["@frihet/mcp-server"],
"env": {
"FRIHET_API_KEY": "fri_your_api_key_here"
}
}
}
}
Get your API key at app.frihet.io > Settings > API.
2. Verify
Run /frihet status — if you see your account info, you're ready.
Commands
| Command |
What it does |
Example |
/frihet status |
Account overview: recent invoices, pending payments, month's expenses |
/frihet status |
/frihet invoice |
Create, list, search invoices |
/frihet invoice "Acme 3500 EUR consulting enero" |
/frihet expense |
Log and query expenses |
/frihet expense "47.50 gasolina 15 feb" |
/frihet clients |
Manage client database |
/frihet clients "Acme" |
/frihet quote |
Create and manage quotes |
/frihet quote create |
/frihet report |
Financial summaries and P&L |
/frihet report quarterly |
/frihet webhooks |
Configure automation triggers |
/frihet webhooks |
/frihet setup |
Guided connection setup |
/frihet setup |
MCP catalogue (158 canonical operations)
The table below lists the core resource groups. The catalogue contains 158 canonical operations across 20+ domains; alias and discovery names are profile-specific. See the README catalogue for the full list and capability semantics.
| Resource |
Tools |
Operations |
| Intelligence |
4 |
get_business_context, get_monthly_summary, get_quarterly_taxes, duplicate_invoice |
| Invoices |
6 |
list, get, create, update, delete, search |
| Expenses |
5 |
list, get, create, update, delete |
| Clients |
5 |
list, get, create, update, delete |
| Products |
5 |
list, get, create, update, delete |
| Quotes |
5 |
list, get, create, update, delete |
| Webhooks |
5 |
list, get, create, update, delete |
| Banking |
5 |
list_bank_accounts, get_bank_account, list_transactions, categorize_transaction, match_transaction_to_invoice |
| Fiscal |
8 |
modelo_303/130/390/180/347, verifactu_status, verifactu_resubmit, ticketbai_status |
| Stay |
5 |
list_reservations, get_reservation, create_reservation, list_properties, sync_channel |
| POS |
4 |
list_terminals, get_sale, list_sales, refund_sale |
| Time Tracking |
4 |
list_time_entries, create_time_entry, update_time_entry, delete_time_entry |
| Recurring Invoices |
2 |
list_recurring_invoices, run_recurring_now |
Core Decision Logic
Tax Rate Selection
Determine the correct tax based on the client's fiscal zone:
| Fiscal Zone |
Tax |
General Rate |
Reduced |
Super-reduced |
peninsula |
IVA |
21% |
10% |
4% |
canarias |
IGIC |
7% |
3% |
0% |
ceuta_melilla |
IPSI |
10% |
— |
— |
eu |
Reverse charge |
0% |
— |
— |
world |
Exempt |
0% |
— |
— |
Decision flow for invoices:
- Check the client's address/fiscal zone
- If
peninsula → apply IVA at the rate matching the product/service type
- If
canarias → apply IGIC instead of IVA
- If
eu → 0% with "Inversión del sujeto pasivo" / "Reverse charge" note
- If
world → 0% exempt, no tax line
IRPF retention (professional services only):
- Standard: 15%
- New autónomo (first 3 years): 7%
- Only applies when invoicing as a professional to a business (B2B peninsula)
For full tax details including quarterly models, deadlines, and expense deductibility rules, see references/tax-guide.md.
Expense Categorization
Auto-categorize expenses by matching keywords in the description:
| Category |
Keywords (ES/EN) |
office |
oficina, papelería, material, supplies, stationery |
technology |
software, SaaS, hosting, dominio, hardware, cloud |
travel |
viaje, vuelo, tren, hotel, parking, flight, train |
food |
comida, restaurante, café, meal, lunch, dinner |
vehicle |
gasolina, combustible, fuel, peaje, toll, mantenimiento |
professional |
asesoría, gestoría, abogado, notario, consulting |
marketing |
publicidad, ads, diseño, campaign, SEO, social |
general |
anything that doesn't match above |
Invoice Status Flow
draft → sent → paid
→ overdue → paid
→ cancelled
Rectificativa (credit note) types, per the LIVA article each one keys on:
R1 (art. 80.1-2 / 80.6 — error in law, returns, retroactive discounts), R2 (art. 80.3 —
concurso de acreedores, i.e. a court has declared the customer insolvent), R3 (art. 80.4 —
wholly or partly uncollectible debt), R4 (anything else), R5 (rectifying a simplified invoice).
create_credit_note only reaches R1 and R4: the type is derived server-side from reason
(error -> R1, everything else -> R4). R2, R3 and R5 exist in the regulation but cannot be
selected through the API — use the app. The tool creates a DRAFT (no fiscal number, no hash,
not submitted to VeriFactu), always rectifies by differences (TipoRectificativa = I), and
only does full credits — fullCredit: false returns 400 PARTIAL_CREDIT_NOT_IMPLEMENTED.
Quote Status Flow
draft → sent → accepted → (convert to invoice)
→ rejected
→ expired
Key Workflows
Brief workflow outlines — for detailed step-by-step recipes, see references/workflows.md.
Monthly close ("cierre mensual"): List month's invoices + expenses → calculate income, expenses, IVA collected vs paid, net result → flag unpaid invoices.
Tax prep 303 ("IVA trimestral", "303"): Sum quarter's IVA repercutido (invoices) - IVA soportado (deductible expenses) → present pre-filled 303 data.
Client onboarding: Create client → optionally create product → create invoice → confirm.
Expense batch ("gastos del mes"): Parse multiple expenses → create each with auto-categorized category → summary table with deductible split.
Overdue follow-up ("morosos"): List overdue invoices → sort by amount → suggest follow-up actions.
Quote to invoice: Get accepted quote → create invoice copying client/items/notes → mark quote as accepted.
Error Handling
| Error |
What to tell the user |
Action |
| 401 Unauthorized |
"API key inválida o expirada. Revisa tu configuración en app.frihet.io > Settings > API." |
Guide to /frihet setup |
| 404 Not Found |
"No encontré ese recurso. Comprueba el ID o busca por nombre." |
Suggest search tool |
| 429 Rate Limited |
"Demasiadas peticiones. Esperando {retryAfter}s..." |
Auto-retry with backoff |
| Network Error |
"No puedo conectar con Frihet. Verifica tu conexión." |
Check MCP server status |
| No MCP Server |
"El servidor MCP de Frihet no está configurado. Ejecuta /frihet setup." |
Guide setup |
For full error code reference and pagination patterns, see references/api-patterns.md.
Language Rules
- Respond in the same language the user writes in
- Default to Spanish (ES) for financial terms and tax references
- Keep Spanish terms for tax models (Modelo 303, IRPF, IVA) even in English — they have no direct translation
- Currency is always EUR. Format:
1,234.56 EUR (dot for decimals, comma for thousands)
Security
- Never log, display, or store the API key in conversation output
- Never include the API key in code snippets shown to the user
- API key is managed exclusively via environment variables in MCP config
- All data stays between Claude Code, the MCP server, and Frihet's API
- The MCP server is stateless — stores nothing
- If a user asks to see their API key, direct them to app.frihet.io
References
references/tax-guide.md — Full Spanish tax knowledge: IVA/IGIC/IRPF rates, fiscal zones, quarterly calendar, expense deductibility, VeriFactu, Crea y Crece
references/workflows.md — Detailed workflow recipes with step-by-step MCP tool calls and response formatting templates
references/api-patterns.md — API rate limits, pagination, error codes, response formatting conventions
Links
1---2name: frihet-mcp-23description: Business-aware ERP management skill for Frihet MCP server. Manages invoices, expenses, clients, products, quotes, and webhooks with embedded Spanish tax knowledge (IVA/IGIC/IRPF), automatic expense categorization, and multi-step workflows like monthly close and quarterly tax prep. Use when the user says "create invoice", "log expense", "list clients", "tax report", "monthly close", "cierre mensual", "factura", "gasto", "presupuesto", "frihet", "303", "IVA trimestral", "overdue invoices", "morosos", or any business management task with a Frihet MCP server connected. Supports both English and Spanish. Do NOT use for general accounting questions without Frihet MCP server configured.4license: MIT5---67# Frihet MCP Skill89Business assistant inside Claude Code. Manage invoices, expenses, clients, products, and quotes in plain language — with built-in Spanish tax intelligence.1011**Requires:** Frihet account with API access + `@frihet/mcp-server` configured as MCP server.1213## Setup1415### 1. Configure the MCP server1617Add to your Claude Code MCP config (`~/.claude/mcp.json` or project `.mcp.json`):1819```json20{21 "mcpServers": {22 "frihet": {23 "command": "npx",24 "args": ["@frihet/mcp-server"],25 "env": {26 "FRIHET_API_KEY": "fri_your_api_key_here"27 }28 }29 }30}31```3233Get your API key at **app.frihet.io > Settings > API**.3435### 2. Verify3637Run `/frihet status` — if you see your account info, you're ready.3839## Commands4041| Command | What it does | Example |42|---------|-------------|---------|43| `/frihet status` | Account overview: recent invoices, pending payments, month's expenses | `/frihet status` |44| `/frihet invoice` | Create, list, search invoices | `/frihet invoice "Acme 3500 EUR consulting enero"` |45| `/frihet expense` | Log and query expenses | `/frihet expense "47.50 gasolina 15 feb"` |46| `/frihet clients` | Manage client database | `/frihet clients "Acme"` |47| `/frihet quote` | Create and manage quotes | `/frihet quote create` |48| `/frihet report` | Financial summaries and P&L | `/frihet report quarterly` |49| `/frihet webhooks` | Configure automation triggers | `/frihet webhooks` |50| `/frihet setup` | Guided connection setup | `/frihet setup` |5152## MCP catalogue (158 canonical operations)5354The table below lists the core resource groups. The catalogue contains **158 canonical operations across 20+ domains**; alias and discovery names are profile-specific. See the [README catalogue](https://github.com/Frihet-io/frihet-mcp#catalogue-operations-158) for the full list and capability semantics.5556| Resource | Tools | Operations |57|----------|-------|------------|58| Intelligence | 4 | get_business_context, get_monthly_summary, get_quarterly_taxes, duplicate_invoice |59| Invoices | 6 | list, get, create, update, delete, search |60| Expenses | 5 | list, get, create, update, delete |61| Clients | 5 | list, get, create, update, delete |62| Products | 5 | list, get, create, update, delete |63| Quotes | 5 | list, get, create, update, delete |64| Webhooks | 5 | list, get, create, update, delete |65| Banking | 5 | list_bank_accounts, get_bank_account, list_transactions, categorize_transaction, match_transaction_to_invoice |66| Fiscal | 8 | modelo_303/130/390/180/347, verifactu_status, verifactu_resubmit, ticketbai_status |67| Stay | 5 | list_reservations, get_reservation, create_reservation, list_properties, sync_channel |68| POS | 4 | list_terminals, get_sale, list_sales, refund_sale |69| Time Tracking | 4 | list_time_entries, create_time_entry, update_time_entry, delete_time_entry |70| Recurring Invoices | 2 | list_recurring_invoices, run_recurring_now |7172## Core Decision Logic7374### Tax Rate Selection7576Determine the correct tax based on the client's fiscal zone:7778| Fiscal Zone | Tax | General Rate | Reduced | Super-reduced |79|-------------|-----|-------------|---------|---------------|80| `peninsula` | IVA | 21% | 10% | 4% |81| `canarias` | IGIC | 7% | 3% | 0% |82| `ceuta_melilla` | IPSI | 10% | — | — |83| `eu` | Reverse charge | 0% | — | — |84| `world` | Exempt | 0% | — | — |8586**Decision flow for invoices:**871. Check the client's address/fiscal zone882. If `peninsula` → apply IVA at the rate matching the product/service type893. If `canarias` → apply IGIC instead of IVA904. If `eu` → 0% with "Inversión del sujeto pasivo" / "Reverse charge" note915. If `world` → 0% exempt, no tax line9293**IRPF retention (professional services only):**94- Standard: 15%95- New autónomo (first 3 years): 7%96- Only applies when invoicing as a professional to a business (B2B peninsula)9798For full tax details including quarterly models, deadlines, and expense deductibility rules, see `references/tax-guide.md`.99100### Expense Categorization101102Auto-categorize expenses by matching keywords in the description:103104| Category | Keywords (ES/EN) |105|----------|-----------------|106| `office` | oficina, papelería, material, supplies, stationery |107| `technology` | software, SaaS, hosting, dominio, hardware, cloud |108| `travel` | viaje, vuelo, tren, hotel, parking, flight, train |109| `food` | comida, restaurante, café, meal, lunch, dinner |110| `vehicle` | gasolina, combustible, fuel, peaje, toll, mantenimiento |111| `professional` | asesoría, gestoría, abogado, notario, consulting |112| `marketing` | publicidad, ads, diseño, campaign, SEO, social |113| `general` | anything that doesn't match above |114115### Invoice Status Flow116117```118draft → sent → paid119 → overdue → paid120 → cancelled121```122123Rectificativa (credit note) types, per the LIVA article each one keys on:124R1 (art. 80.1-2 / 80.6 — error in law, returns, retroactive discounts), R2 (art. 80.3 —125concurso de acreedores, i.e. a court has declared the customer insolvent), R3 (art. 80.4 —126wholly or partly uncollectible debt), R4 (anything else), R5 (rectifying a simplified invoice).127128`create_credit_note` only reaches R1 and R4: the type is derived server-side from `reason`129(`error` -> R1, everything else -> R4). R2, R3 and R5 exist in the regulation but cannot be130selected through the API — use the app. The tool creates a DRAFT (no fiscal number, no hash,131not submitted to VeriFactu), always rectifies by differences (`TipoRectificativa = I`), and132only does full credits — `fullCredit: false` returns `400 PARTIAL_CREDIT_NOT_IMPLEMENTED`.133134### Quote Status Flow135136```137draft → sent → accepted → (convert to invoice)138 → rejected139 → expired140```141142## Key Workflows143144Brief workflow outlines — for detailed step-by-step recipes, see `references/workflows.md`.145146**Monthly close** ("cierre mensual"): List month's invoices + expenses → calculate income, expenses, IVA collected vs paid, net result → flag unpaid invoices.147148**Tax prep 303** ("IVA trimestral", "303"): Sum quarter's IVA repercutido (invoices) - IVA soportado (deductible expenses) → present pre-filled 303 data.149150**Client onboarding**: Create client → optionally create product → create invoice → confirm.151152**Expense batch** ("gastos del mes"): Parse multiple expenses → create each with auto-categorized category → summary table with deductible split.153154**Overdue follow-up** ("morosos"): List overdue invoices → sort by amount → suggest follow-up actions.155156**Quote to invoice**: Get accepted quote → create invoice copying client/items/notes → mark quote as accepted.157158## Error Handling159160| Error | What to tell the user | Action |161|-------|----------------------|--------|162| 401 Unauthorized | "API key inválida o expirada. Revisa tu configuración en app.frihet.io > Settings > API." | Guide to `/frihet setup` |163| 404 Not Found | "No encontré ese recurso. Comprueba el ID o busca por nombre." | Suggest search tool |164| 429 Rate Limited | "Demasiadas peticiones. Esperando {retryAfter}s..." | Auto-retry with backoff |165| Network Error | "No puedo conectar con Frihet. Verifica tu conexión." | Check MCP server status |166| No MCP Server | "El servidor MCP de Frihet no está configurado. Ejecuta `/frihet setup`." | Guide setup |167168For full error code reference and pagination patterns, see `references/api-patterns.md`.169170## Language Rules171172- Respond in the same language the user writes in173- Default to Spanish (ES) for financial terms and tax references174- Keep Spanish terms for tax models (Modelo 303, IRPF, IVA) even in English — they have no direct translation175- Currency is always EUR. Format: `1,234.56 EUR` (dot for decimals, comma for thousands)176177## Security178179- **Never** log, display, or store the API key in conversation output180- **Never** include the API key in code snippets shown to the user181- API key is managed exclusively via environment variables in MCP config182- All data stays between Claude Code, the MCP server, and Frihet's API183- The MCP server is stateless — stores nothing184- If a user asks to see their API key, direct them to app.frihet.io185186## References187188- `references/tax-guide.md` — Full Spanish tax knowledge: IVA/IGIC/IRPF rates, fiscal zones, quarterly calendar, expense deductibility, VeriFactu, Crea y Crece189- `references/workflows.md` — Detailed workflow recipes with step-by-step MCP tool calls and response formatting templates190- `references/api-patterns.md` — API rate limits, pagination, error codes, response formatting conventions191192## Links193194- **App:** https://app.frihet.io195- **Docs:** https://docs.frihet.io/desarrolladores196- **API Reference:** https://docs.frihet.io/desarrolladores/api-rest197- **MCP Server (npm):** https://www.npmjs.com/package/@frihet/mcp-server198- **Source Code:** https://github.com/Frihet-io/frihet-mcp199- **Remote MCP:** https://mcp.frihet.io200- **Support:** soporte@frihet.io