FattureInCloud MCP
FattureInCloud MCP
MCP (Model Context Protocol) server for the Fatture in Cloud API v2. Lets Claude (Code / Desktop / any MCP client) read and manage (CRUD) issued documents (invoices, credit notes, quotes...) and received documents (expenses, passive credit notes...).
Two transports over the same tools: stdio as a local child process, and Streamable HTTP for a shared deployment that keeps no credentials of its own.
Tools
Tool | Description |
| Companies accessible with the token (source of |
| Config lookups: VAT types, payment methods/accounts, expense categories |
| Paginated list of issued documents, one type per call (default |
| Full detail of a single issued document |
| Paginated list of received documents (default |
| Full detail of a single received document |
| Create an invoice, credit note, quote... |
| Update an issued document (partial: only the fields passed) |
| Delete an issued document (irreversible) |
| Create an expense or other received document |
| Update a received document (partial) |
| Delete a received document (irreversible) |
| Upload a local file, returns an |
| Remove a document's attachment (FIC API currently 500s here, see docs) |
See docs/api.md for parameters, payload shapes and API quirks. List tools support:
q— Fatture in Cloud filter language, e.g.date >= '2026-01-01' and date <= '2026-06-30',entity.name like '%acme%',amount_gross > 1000sort— e.g.-date(descending)page/per_page(min 5, max 100) — responses includecurrent_page,last_page,totalfieldset—basic(compact, default for lists) ordetailed(includes line items)
Setup
npm install
npm run buildAuthentication
Two values, wherever they come from:
FIC_ACCESS_TOKEN(required) — a manual access token: generate it from the Fatture in Cloud developer area selecting the read scopes for issued and received documents. Manual tokens never expire (revocable from the same page).FIC_COMPANY_ID(optional) — default company ID; if unset, tools require an explicitcompany_idargument (discover it withlist_companies).
Over stdio they are environment variables of the server process. Over HTTP they are the X-FIC-Token and X-FIC-Company headers of each request, so the deployed instance stores neither.
Configuration templates for Claude Code, Claude Desktop and opencode, local stdio and remote HTTP, are in examples/.
Claude Code
A project-scoped .mcp.json (gitignored) holds the credentials. From any other directory:
claude mcp add --scope user fattureincloud -e FIC_ACCESS_TOKEN=<token> -e FIC_COMPANY_ID=<id> -- node <repo>\dist\index.jsClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"fattureincloud": {
"command": "node",
"args": ["<repo>\\dist\\index.js"],
"env": {
"FIC_ACCESS_TOKEN": "<token>",
"FIC_COMPANY_ID": "<id>"
}
}
}
}Remote (Streamable HTTP)
dist/http.js serves the same tools over HTTP and takes the credentials from the X-FIC-Token and X-FIC-Company request headers instead of the environment, so the host running it stores no secret. ./scripts/deploy.ps1 installs it as a systemd service on a remote machine — see docs/deploy.md.
Extending
The API surface is small on purpose. To add endpoints (clients, suppliers, products, receipts, taxes, cashbook...), follow the pattern in src/server.ts: one registerTool per action calling ficGet from src/fic.ts. The full OpenAPI spec lives at fattureincloud/openapi-fattureincloud.