Skip to main content
AL

Alegra

v0.2.0API Key

Cloud accounting for LatAm: invoicing, expenses, inventory, and DIAN compliance. Your agent handles multi-country bookkeeping from one API.

20 tools2 env vars๐Ÿ‡จ๐Ÿ‡ด Colombiastable on npm

Install

terminal
$ npm install @codespar/mcp-alegra

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "alegra": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-alegra"
      ],
      "env": {
        "ALEGRA_EMAIL": "<your_alegra_email>",
        "ALEGRA_API_TOKEN": "<your_alegra_api_token>"
      }
    }
  }
}

After restart, your agent can call any of the 20 tools below โ€” try create_invoice first.

Environment variables ยท 2

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

ALEGRA_EMAIL
required

Account email for Alegra

ALEGRA_API_TOKEN
requiredsecret

API token for Alegra

Available tools ยท 20

Each tool is independent โ€” your agent loads only what it needs to reduce context and response time.

WRITEcreate_invoice
Create an invoice
READget_invoice
Get invoice details by ID
READlist_invoices
List invoices
DELETEvoid_invoice
Void/cancel an invoice
READget_invoice_pdf
Get invoice PDF download URL
WRITEsend_invoice
Email an invoice to one or more recipients
WRITEcreate_contact
Create a contact (customer or supplier)
WRITEupdate_contact
Update an existing contact

Compatible frameworks

MCP is a protocol โ€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

All credentials are encrypted at rest in an isolated vault scoped per organization. OAuth2 tokens are automatically refreshed before expiry. Your agent code never sees raw secrets โ€” it receives scoped, short-lived session tokens.
Servers โ€” Every LatAm commerce API your agent needs | CodeSpar