Skip to main content
MCP server CX Codex

mcp-alegra — Claude Code MCP server: setup and use

Connects an agent to Alegra for invoices, contacts, items, and payments. Use it when an MCP client needs access to accounting data.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mcp-alegra -e ALEGRA_EMAIL=<ALEGRA_EMAIL> -e ALEGRA_API_TOKEN=<ALEGRA_API_TOKEN> -- npx -y @codespar/mcp-alegra
Open on GitHub

What mcp-alegra does

mcp-alegra connects an MCP client with Alegra, a cloud accounting service for LATAM. Its tools can create, read, list, send, and void invoices, return an invoice PDF URL, and manage customer or supplier contacts. The server also covers products and services, payments, categories, bank accounts, and company settings.

The package runs through @codespar/mcp-alegra over stdio. HTTP transport can be started with --http; MCP_HTTP enables that mode and MCP_PORT selects the port, with 3000 as its default. Authentication uses Basic auth with the Alegra account email and API token.

Set ALEGRA_EMAIL and ALEGRA_API_TOKEN before launch. The token comes from the API section of Alegra settings, so a missing token prevents the server from connecting to the account.

What it helps with

  • create or void Alegra invoices
  • retrieve a downloadable invoice PDF URL
  • look up contacts, items, or payments
  • record a payment in Alegra
  • read company and bank account details

Example prompts for the agent

  • Create an Alegra invoice for this customer and email it to the recipient.
  • List the payments for the requested period and show their IDs.
  • Add this service to the Alegra item catalog, then return its details.

How to install mcp-alegra

Platform CLI

claude mcp add mcp-alegra -e ALEGRA_EMAIL=<ALEGRA_EMAIL> -e ALEGRA_API_TOKEN=<ALEGRA_API_TOKEN> -- npx -y @codespar/mcp-alegra

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mcp-alegra

How do I install mcp-alegra in Claude Code?

Run claude mcp add mcp-alegra -e ALEGRA_EMAIL=<ALEGRA_EMAIL> -e ALEGRA_API_TOKEN=<ALEGRA_API_TOKEN> -- npx -y @codespar/mcp-alegra.

What does mcp-alegra do?

It gives the agent Alegra tools for invoices, contacts, items, payments, categories, bank accounts, and company settings.

What credentials does mcp-alegra need?

Provide the Alegra account email and an API token from Alegra settings through ALEGRA_EMAIL and ALEGRA_API_TOKEN.

Similar MCP servers

Everything for Finance and business →

From the same set124

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor