@frihet/mcp-server 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -40
- package/dist/index.js +1 -1
- package/package.json +24 -15
package/README.md
CHANGED
|
@@ -8,37 +8,39 @@
|
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
11
|
-
<a href="https://www.npmjs.com/package/@frihet/mcp-server"><img src="https://img.shields.io/npm/v/@frihet/mcp-server?style=flat&color=18181b&labelColor=09090b" alt="npm"></a>
|
|
11
|
+
<a href="https://www.npmjs.com/package/@frihet/mcp-server"><img src="https://img.shields.io/npm/v/@frihet/mcp-server?style=flat&color=18181b&labelColor=09090b" alt="npm version"></a>
|
|
12
|
+
<a href="https://www.npmjs.com/package/@frihet/mcp-server"><img src="https://img.shields.io/npm/dm/@frihet/mcp-server?style=flat&color=18181b&labelColor=09090b&label=downloads" alt="npm downloads"></a>
|
|
13
|
+
<a href="https://smithery.ai/server/frihet/frihet-mcp"><img src="https://smithery.ai/badge/frihet/frihet-mcp" alt="Smithery installs"></a>
|
|
14
|
+
<a href="https://registry.modelcontextprotocol.io/servers/io.github.berthelius/frihet"><img src="https://img.shields.io/badge/MCP-Registry-18181b?style=flat&labelColor=09090b" alt="MCP Registry"></a>
|
|
12
15
|
<a href="https://github.com/Frihet-io/frihet-mcp/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-18181b?style=flat&labelColor=09090b" alt="license"></a>
|
|
13
|
-
<
|
|
14
|
-
<
|
|
16
|
+
<img src="https://img.shields.io/badge/tools-31-18181b?style=flat&labelColor=09090b" alt="31 tools">
|
|
17
|
+
<img src="https://img.shields.io/badge/node-%3E%3D18-18181b?style=flat&labelColor=09090b" alt="node >=18">
|
|
18
|
+
<a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-18181b?style=flat&labelColor=09090b" alt="TypeScript"></a>
|
|
15
19
|
</p>
|
|
16
20
|
|
|
17
21
|
---
|
|
18
22
|
|
|
19
23
|
## What is this
|
|
20
24
|
|
|
21
|
-
An MCP server that connects your AI assistant to [Frihet
|
|
25
|
+
An MCP server that connects your AI assistant to [Frihet](https://frihet.io). Create invoices by talking. Query expenses in natural language. Manage your entire business from your IDE.
|
|
22
26
|
|
|
23
27
|
```
|
|
24
28
|
You: "Create an invoice for TechStart SL, 40 hours of consulting at 75 EUR/hour, due March 1st"
|
|
25
29
|
Claude: Done. Invoice INV-2026-089 created. Total: 3,000.00 EUR + 21% IVA = 3,630.00 EUR.
|
|
26
30
|
```
|
|
27
31
|
|
|
28
|
-
31 tools. 5 resources. 5 prompts. Structured output. Zero boilerplate.
|
|
32
|
+
31 tools. 5 resources. 5 prompts. Structured output on every tool. Zero boilerplate.
|
|
29
33
|
|
|
30
34
|
---
|
|
31
35
|
|
|
32
36
|
## Install
|
|
33
37
|
|
|
34
|
-
###
|
|
38
|
+
### One-line (Claude Code, Cursor, Copilot, Codex, Windsurf, Gemini CLI, and more)
|
|
35
39
|
|
|
36
40
|
```bash
|
|
37
41
|
npx skills add Frihet-io/frihet-mcp
|
|
38
42
|
```
|
|
39
43
|
|
|
40
|
-
### Per-tool configuration
|
|
41
|
-
|
|
42
44
|
### Claude Code / Claude Desktop
|
|
43
45
|
|
|
44
46
|
```json
|
|
@@ -68,7 +70,9 @@ The JSON config is identical for all tools. Only the file path changes.
|
|
|
68
70
|
|
|
69
71
|
### Remote (no install)
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
Use the hosted endpoint at `mcp.frihet.io` -- zero local dependencies, runs on Cloudflare Workers.
|
|
74
|
+
|
|
75
|
+
**With API key:**
|
|
72
76
|
|
|
73
77
|
```json
|
|
74
78
|
{
|
|
@@ -84,7 +88,9 @@ If you prefer not to install anything locally, use the hosted endpoint at `mcp.f
|
|
|
84
88
|
}
|
|
85
89
|
```
|
|
86
90
|
|
|
87
|
-
|
|
91
|
+
**With OAuth 2.0 + PKCE** (browser-based login, no API key needed):
|
|
92
|
+
|
|
93
|
+
Clients that support OAuth (Claude Desktop, Smithery, etc.) can connect directly to `https://mcp.frihet.io/mcp` and authenticate via browser. The server implements the full OAuth 2.1 authorization code flow with PKCE.
|
|
88
94
|
|
|
89
95
|
### Get your API key
|
|
90
96
|
|
|
@@ -140,9 +146,9 @@ Talk to your ERP. These are real prompts, not marketing copy.
|
|
|
140
146
|
|
|
141
147
|
---
|
|
142
148
|
|
|
143
|
-
## Tools
|
|
149
|
+
## Tools (31)
|
|
144
150
|
|
|
145
|
-
### Invoices
|
|
151
|
+
### Invoices (6)
|
|
146
152
|
|
|
147
153
|
| Tool | What it does |
|
|
148
154
|
|------|-------------|
|
|
@@ -153,7 +159,7 @@ Talk to your ERP. These are real prompts, not marketing copy.
|
|
|
153
159
|
| `delete_invoice` | Permanently delete an invoice |
|
|
154
160
|
| `search_invoices` | Find invoices by client name |
|
|
155
161
|
|
|
156
|
-
### Expenses
|
|
162
|
+
### Expenses (5)
|
|
157
163
|
|
|
158
164
|
| Tool | What it does |
|
|
159
165
|
|------|-------------|
|
|
@@ -163,7 +169,7 @@ Talk to your ERP. These are real prompts, not marketing copy.
|
|
|
163
169
|
| `update_expense` | Modify an expense |
|
|
164
170
|
| `delete_expense` | Delete an expense |
|
|
165
171
|
|
|
166
|
-
### Clients
|
|
172
|
+
### Clients (5)
|
|
167
173
|
|
|
168
174
|
| Tool | What it does |
|
|
169
175
|
|------|-------------|
|
|
@@ -173,7 +179,7 @@ Talk to your ERP. These are real prompts, not marketing copy.
|
|
|
173
179
|
| `update_client` | Update client info |
|
|
174
180
|
| `delete_client` | Remove a client |
|
|
175
181
|
|
|
176
|
-
### Products
|
|
182
|
+
### Products (5)
|
|
177
183
|
|
|
178
184
|
| Tool | What it does |
|
|
179
185
|
|------|-------------|
|
|
@@ -183,7 +189,7 @@ Talk to your ERP. These are real prompts, not marketing copy.
|
|
|
183
189
|
| `update_product` | Update pricing or details |
|
|
184
190
|
| `delete_product` | Remove a product |
|
|
185
191
|
|
|
186
|
-
### Quotes
|
|
192
|
+
### Quotes (5)
|
|
187
193
|
|
|
188
194
|
| Tool | What it does |
|
|
189
195
|
|------|-------------|
|
|
@@ -193,7 +199,7 @@ Talk to your ERP. These are real prompts, not marketing copy.
|
|
|
193
199
|
| `update_quote` | Modify a quote |
|
|
194
200
|
| `delete_quote` | Delete a quote |
|
|
195
201
|
|
|
196
|
-
### Webhooks
|
|
202
|
+
### Webhooks (5)
|
|
197
203
|
|
|
198
204
|
| Tool | What it does |
|
|
199
205
|
|------|-------------|
|
|
@@ -203,6 +209,36 @@ Talk to your ERP. These are real prompts, not marketing copy.
|
|
|
203
209
|
| `update_webhook` | Modify events or URL |
|
|
204
210
|
| `delete_webhook` | Remove a webhook |
|
|
205
211
|
|
|
212
|
+
All 31 tools return **structured output** via `outputSchema` -- typed JSON, not raw text. List tools return paginated results (`{ data, total, limit, offset }`).
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Resources (5)
|
|
217
|
+
|
|
218
|
+
Static context the AI can read without making API calls.
|
|
219
|
+
|
|
220
|
+
| Resource | URI | What it provides |
|
|
221
|
+
|----------|-----|-----------------|
|
|
222
|
+
| API Schema | `frihet://api/schema` | OpenAPI summary: endpoints, auth, rate limits, pagination, error codes |
|
|
223
|
+
| Tax Rates | `frihet://tax/rates` | Tax rates by Spanish fiscal zone: IVA, IGIC, IPSI, EU reverse charge, IRPF |
|
|
224
|
+
| Tax Calendar | `frihet://tax/calendar` | Quarterly filing deadlines: Modelo 303, 130, 390, 420, VeriFactu timeline |
|
|
225
|
+
| Expense Categories | `frihet://config/expense-categories` | 8 categories with deductibility rules, IVA treatment, amortization |
|
|
226
|
+
| Invoice Statuses | `frihet://config/invoice-statuses` | Status flow (draft > sent > paid/overdue > cancelled), transition rules, webhook events |
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Prompts (5)
|
|
231
|
+
|
|
232
|
+
Pre-built workflows the AI can execute as guided multi-step operations.
|
|
233
|
+
|
|
234
|
+
| Prompt | What it does | Arguments |
|
|
235
|
+
|--------|-------------|-----------|
|
|
236
|
+
| `monthly-close` | Close the month: review unpaid invoices, categorize expenses, check tax obligations, generate summary | `month?` (YYYY-MM) |
|
|
237
|
+
| `onboard-client` | Set up a new client with correct tax rates by location, optionally create a welcome quote | `clientName`, `country?`, `region?` |
|
|
238
|
+
| `quarterly-tax-prep` | Prepare quarterly tax filing: calculate IVA/IGIC, identify deductibles, preview Modelo 303/130/420 | `quarter?`, `fiscalZone?` |
|
|
239
|
+
| `overdue-followup` | Find overdue invoices, draft follow-up messages, suggest payment reminders | -- |
|
|
240
|
+
| `expense-batch` | Process expenses in bulk: categorize, apply tax rates, flag missing receipts | `fiscalZone?` |
|
|
241
|
+
|
|
206
242
|
---
|
|
207
243
|
|
|
208
244
|
## How it works
|
|
@@ -213,20 +249,22 @@ Your AI assistant frihet-mcp Frihet API
|
|
|
213
249
|
|-- "create invoice" --> | |
|
|
214
250
|
| |-- POST /invoices ->|
|
|
215
251
|
| |<-- 201 Created ----|
|
|
216
|
-
|<--
|
|
252
|
+
|<-- structured JSON --- | |
|
|
217
253
|
```
|
|
218
254
|
|
|
219
|
-
The
|
|
255
|
+
The server translates tool calls into REST API requests. It handles authentication, rate limiting (automatic retry with backoff on 429), pagination, and error mapping.
|
|
256
|
+
|
|
257
|
+
Two transports:
|
|
258
|
+
- **stdio** (local) -- `npx @frihet/mcp-server` with `FRIHET_API_KEY`
|
|
259
|
+
- **Streamable HTTP** (remote) -- `https://mcp.frihet.io/mcp` with Bearer token or OAuth 2.0+PKCE
|
|
220
260
|
|
|
221
261
|
### Environment variables
|
|
222
262
|
|
|
223
263
|
| Variable | Required | Default |
|
|
224
264
|
|----------|----------|---------|
|
|
225
|
-
| `FRIHET_API_KEY` | Yes | -- |
|
|
265
|
+
| `FRIHET_API_KEY` | Yes (stdio) | -- |
|
|
226
266
|
| `FRIHET_API_URL` | No | `https://api.frihet.io/v1` |
|
|
227
267
|
|
|
228
|
-
`FRIHET_API_URL` is useful if you self-host or want to point to a staging environment.
|
|
229
|
-
|
|
230
268
|
---
|
|
231
269
|
|
|
232
270
|
## API limits
|
|
@@ -239,22 +277,27 @@ The MCP server translates natural language tool calls into REST API requests. It
|
|
|
239
277
|
| Webhook payload | 100 KB max |
|
|
240
278
|
| Webhooks per account | 20 max |
|
|
241
279
|
|
|
242
|
-
Rate limiting is handled automatically with exponential backoff.
|
|
280
|
+
Rate limiting is handled automatically with exponential backoff.
|
|
243
281
|
|
|
244
282
|
---
|
|
245
283
|
|
|
246
284
|
## Claude Code Skill
|
|
247
285
|
|
|
248
|
-
Beyond raw MCP tools,
|
|
286
|
+
Beyond raw MCP tools, this repo includes a **Claude Code skill** that adds business context: Spanish tax rules, workflow recipes, financial reports, and natural language commands.
|
|
249
287
|
|
|
250
288
|
### Install the skill
|
|
251
289
|
|
|
252
290
|
```bash
|
|
253
|
-
# Clone and symlink
|
|
254
291
|
git clone https://github.com/Frihet-io/frihet-mcp.git
|
|
255
292
|
ln -s "$(pwd)/frihet-mcp/skill" ~/.claude/skills/frihet
|
|
256
293
|
```
|
|
257
294
|
|
|
295
|
+
Or with the universal installer:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
npx skills add Frihet-io/frihet-mcp
|
|
299
|
+
```
|
|
300
|
+
|
|
258
301
|
### Commands
|
|
259
302
|
|
|
260
303
|
| Command | What it does |
|
|
@@ -268,7 +311,7 @@ ln -s "$(pwd)/frihet-mcp/skill" ~/.claude/skills/frihet
|
|
|
268
311
|
| `/frihet webhooks` | Configure automation triggers |
|
|
269
312
|
| `/frihet setup` | Guided setup and connection test |
|
|
270
313
|
|
|
271
|
-
The skill knows about IVA rates, IRPF retention, Modelo 303 prep, expense deductibility rules, and
|
|
314
|
+
The skill knows about IVA rates, IRPF retention, Modelo 303 prep, expense deductibility rules, and VeriFactu compliance.
|
|
272
315
|
|
|
273
316
|
Full documentation: [docs.frihet.io/desarrolladores/skill-claude-code](https://docs.frihet.io/desarrolladores/skill-claude-code)
|
|
274
317
|
|
|
@@ -297,27 +340,31 @@ npx @modelcontextprotocol/inspector node dist/index.js
|
|
|
297
340
|
|
|
298
341
|
---
|
|
299
342
|
|
|
300
|
-
##
|
|
343
|
+
## Contributing
|
|
301
344
|
|
|
302
|
-
|
|
303
|
-
|---|:---:|:---:|:---:|:---:|:---:|
|
|
304
|
-
| Official MCP server | **Yes** | No (third-party) | No | No | No |
|
|
305
|
-
| Claude / Cursor / Windsurf | **Yes** | No | No | No | No |
|
|
306
|
-
| Public REST API | **Yes** | Yes | Limited | Yes | No |
|
|
307
|
-
| Webhooks with HMAC verification | **Yes** | No | No | No | No |
|
|
308
|
-
| AI assistant built-in | **Yes** | No | No | No | No |
|
|
309
|
-
| Open source tooling | **Yes** | No | No | No | No |
|
|
345
|
+
Contributions are welcome. Please open an issue first to discuss what you'd like to change.
|
|
310
346
|
|
|
311
|
-
|
|
347
|
+
```bash
|
|
348
|
+
git clone https://github.com/Frihet-io/frihet-mcp.git
|
|
349
|
+
cd frihet-mcp
|
|
350
|
+
npm install
|
|
351
|
+
npm run build # must pass before submitting
|
|
352
|
+
```
|
|
312
353
|
|
|
313
354
|
---
|
|
314
355
|
|
|
315
356
|
## Links
|
|
316
357
|
|
|
317
|
-
- [Frihet
|
|
318
|
-
- [
|
|
319
|
-
- [
|
|
358
|
+
- [Frihet](https://frihet.io) -- The product
|
|
359
|
+
- [Documentation](https://docs.frihet.io) -- Full docs
|
|
360
|
+
- [API reference](https://docs.frihet.io/desarrolladores/api-rest) -- REST API
|
|
361
|
+
- [MCP server docs](https://docs.frihet.io/desarrolladores/mcp-server) -- Setup guides, troubleshooting
|
|
362
|
+
- [Webhook docs](https://docs.frihet.io/desarrolladores/webhooks) -- Events, signatures, retries
|
|
363
|
+
- [npm](https://www.npmjs.com/package/@frihet/mcp-server) -- Package registry
|
|
364
|
+
- [MCP Registry](https://registry.modelcontextprotocol.io/servers/io.github.berthelius/frihet) -- Official MCP Registry
|
|
365
|
+
- [Smithery](https://smithery.ai/server/frihet/frihet-mcp) -- Smithery marketplace
|
|
320
366
|
- [Remote endpoint](https://mcp.frihet.io) -- Hosted MCP server (Cloudflare Workers)
|
|
367
|
+
- [OpenAPI spec](https://api.frihet.io/openapi.yaml) -- Machine-readable API definition
|
|
321
368
|
- [MCP specification](https://modelcontextprotocol.io) -- The protocol
|
|
322
369
|
|
|
323
370
|
---
|
|
@@ -326,4 +373,4 @@ The first business management platform with an official MCP server. No other ERP
|
|
|
326
373
|
|
|
327
374
|
MIT. See [LICENSE](./LICENSE).
|
|
328
375
|
|
|
329
|
-
Built by [
|
|
376
|
+
Built by [Frihet](https://frihet.io).
|
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ function main() {
|
|
|
47
47
|
const client = new FrihetClient(apiKey, baseUrl);
|
|
48
48
|
const server = new McpServer({
|
|
49
49
|
name: "frihet-erp",
|
|
50
|
-
version: "1.2.
|
|
50
|
+
version: "1.2.3",
|
|
51
51
|
description: "AI-native MCP server for Frihet ERP — invoices, expenses, clients, products, quotes, and webhooks. " +
|
|
52
52
|
"Provides 31 tools, 5 resources (tax rates, calendar, expense categories, invoice statuses, API schema), " +
|
|
53
53
|
"and 5 workflow prompts for business management with full Spanish tax compliance (IVA, IGIC, IPSI).",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frihet/mcp-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "AI-native MCP server for business management — invoices, expenses, clients, products, quotes, webhooks. 31 tools. Works with Claude, Cursor, Windsurf, Cline.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,25 +13,34 @@
|
|
|
13
13
|
"prepublishOnly": "npm run build"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
|
-
"
|
|
17
|
-
"erp",
|
|
18
|
-
"invoicing",
|
|
19
|
-
"frihet",
|
|
16
|
+
"accounting",
|
|
20
17
|
"ai",
|
|
21
|
-
"
|
|
18
|
+
"ai-agent",
|
|
19
|
+
"anthropic",
|
|
20
|
+
"automation",
|
|
21
|
+
"billing",
|
|
22
|
+
"business-management",
|
|
22
23
|
"claude",
|
|
24
|
+
"clients",
|
|
25
|
+
"cline",
|
|
26
|
+
"codex",
|
|
27
|
+
"copilot",
|
|
23
28
|
"cursor",
|
|
24
|
-
"
|
|
25
|
-
"business-management",
|
|
26
|
-
"accounting",
|
|
29
|
+
"erp",
|
|
27
30
|
"expenses",
|
|
31
|
+
"fintech",
|
|
32
|
+
"frihet",
|
|
33
|
+
"invoicing",
|
|
34
|
+
"llm",
|
|
35
|
+
"mcp",
|
|
36
|
+
"mcp-server",
|
|
37
|
+
"model-context-protocol",
|
|
38
|
+
"quotes",
|
|
39
|
+
"saas",
|
|
28
40
|
"tax-compliance",
|
|
29
41
|
"verifactu",
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"codex",
|
|
33
|
-
"ai-agent",
|
|
34
|
-
"automation"
|
|
42
|
+
"webhooks",
|
|
43
|
+
"windsurf"
|
|
35
44
|
],
|
|
36
45
|
"author": "BRTHLS <viktor@brthls.com>",
|
|
37
46
|
"license": "MIT",
|
|
@@ -39,7 +48,7 @@
|
|
|
39
48
|
"type": "git",
|
|
40
49
|
"url": "git+https://github.com/Frihet-io/frihet-mcp.git"
|
|
41
50
|
},
|
|
42
|
-
"mcpName": "io.github.
|
|
51
|
+
"mcpName": "io.github.berthelius/frihet",
|
|
43
52
|
"homepage": "https://github.com/Frihet-io/frihet-mcp#readme",
|
|
44
53
|
"bugs": {
|
|
45
54
|
"url": "https://github.com/Frihet-io/frihet-mcp/issues"
|