mcpField
M
mcp-alegra

mcp-alegra

Local
github.com/codesparFinance275Updated 4w ago

About mcp-alegra

MCP Alegra is an MCP server for the Alegra cloud accounting platform, aimed at accounting and finance work in Latin America. It covers invoices, contacts, items and payments, and authenticates with an account email and API token.

Key features

  1. 01Provides 20 tools for invoices, contacts, items and payments
  2. 02Runs over stdio or HTTP transport
  3. 03Uses Basic authentication with email and API token
  4. 04Lists item categories and bank accounts

Use cases

  1. 01Creating, listing and voiding invoices from an MCP client
  2. 02Maintaining customer and supplier contacts and product records
  3. 03Recording payments and reviewing company settings

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-alegra": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-alegra"
],
"env": {
"ALEGRA_EMAIL": "<ALEGRA_EMAIL>",
"ALEGRA_API_TOKEN": "<ALEGRA_API_TOKEN>"
}
}
}
}
Run commandnpx -y @codespar/mcp-alegra
Environment variables to set
ALEGRA_EMAILAccount email for Alegra
ALEGRA_API_TOKENSecretAPI token for Alegra

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-alegra0.2.2

Tools

20

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
datestringYesInvoice date (YYYY-MM-DD)
itemsarrayYesInvoice items
stampobjectNoE-invoicing stamp (for DIAN)
stamp.generate_stampbooleanNoGenerate electronic stamp
clientnumberYesClient/contact ID
currencystringNoCurrency code (COP, USD, MXN)
due_datestringYesDue date (YYYY-MM-DD)
observationsstringNoNotes/observations
payment_methodstringNoPayment method

Details

From the project README

MCP Alegra

MCP server for Alegra — cloud accounting platform for LATAM (Colombian-founded), supporting invoicing, contacts, inventory, and payments across CO, MX, AR, CL, and more.

Quick Start

# Set your credentials
export ALEGRA_EMAIL="[email protected]"
export ALEGRA_API_TOKEN="your-api-token"

# Run via stdio
npx tsx packages/colombia/alegra/src/index.ts

# Run via HTTP
npx tsx packages/colombia/alegra/src/index.ts --http

Environment Variables

VariableRequiredDescription
ALEGRA_EMAILYesAccount email address
ALEGRA_API_TOKENYesAPI token from Alegra settings
MCP_HTTPNoSet to "true" to enable HTTP transport
MCP_PORTNoHTTP port (default: 3000)

Tools (20)

ToolPurpose
create_invoiceCreate an invoice
get_invoiceGet invoice details by ID
list_invoicesList invoices
void_invoiceVoid/cancel an invoice
get_invoice_pdfGet invoice PDF download URL
send_invoiceEmail an invoice to one or more recipients
create_contactCreate a contact (customer or supplier)
update_contactUpdate an existing contact
delete_contactDelete a contact
list_contactsList contacts
create_itemCreate a product or service item
update_itemUpdate an existing item
list_itemsList products and services
list_paymentsList payments
get_paymentGet payment by ID
create_paymentRecord a payment
void_paymentVoid/annul a payment
list_categoriesList item categories (chart of accounts)
list_bank_accountsList bank accounts
get_companyGet company profile and settings

Auth

Uses Basic authentication with email and API token. Obtain your API token from the Alegra settings page under "API" section.

API Reference


Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

Authentication

Set these environment variables before launching the server:

  • ALEGRA_EMAIL (required) — Account email for Alegra
  • ALEGRA_API_TOKEN (required, secret) — API token for Alegra

Issue credentials at the provider's developer portal: https://developer.alegra.com.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.