Skip to main content
AL

Alegra

v0.2.1API Key

Contabilidad en la nube para LatAm: facturación, gastos, inventario y compliance con la DIAN. Tu agente maneja la contabilidad multi-país desde una sola API.

20 herramientas2 env vars🇨🇴 Colombiaestable en npm

Qué puede hacer tu agente

Alegra le da a tu agente 20 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • create_invoiceCreate an invoice
  • get_invoiceGet invoice details by ID
  • list_invoicesList invoices
Ejemplo de llamada
// Your agent calls a tool directly — no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("create_invoice", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-alegra

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

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>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 20 herramientas de abajo — probá create_invoice primero.

Variables de entorno · 2

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

ALEGRA_EMAIL
obligatorio

Account email for Alegra

ALEGRA_API_TOKEN
obligatoriosecret

API token for Alegra

Herramientas disponibles · 20

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

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

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Cualquier cliente MCPProtocolo

Preguntas frecuentes

Corré `npx -y @codespar/mcp-alegra` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
Alegra — MCP server · 20 tools | CodeSpar