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
- 01Provides 20 tools for invoices, contacts, items and payments
- 02Runs over stdio or HTTP transport
- 03Uses Basic authentication with email and API token
- 04Lists item categories and bank accounts
Use cases
- 01Creating, listing and voiding invoices from an MCP client
- 02Maintaining customer and supplier contacts and product records
- 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.
npx -y @codespar/mcp-alegraALEGRA_EMAILAccount email for AlegraALEGRA_API_TOKENSecretAPI token for AlegraLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
20Saved tool list · updated 2w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| date | string | Yes | Invoice date (YYYY-MM-DD) |
| items | array | Yes | Invoice items |
| stamp | object | No | E-invoicing stamp (for DIAN) |
| stamp.generate_stamp | boolean | No | Generate electronic stamp |
| client | number | Yes | Client/contact ID |
| currency | string | No | Currency code (COP, USD, MXN) |
| due_date | string | Yes | Due date (YYYY-MM-DD) |
| observations | string | No | Notes/observations |
| payment_method | string | No | Payment method |
Details
From the project READMEMCP 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
| Variable | Required | Description |
|---|---|---|
ALEGRA_EMAIL | Yes | Account email address |
ALEGRA_API_TOKEN | Yes | API token from Alegra settings |
MCP_HTTP | No | Set to "true" to enable HTTP transport |
MCP_PORT | No | HTTP port (default: 3000) |
Tools (20)
| Tool | Purpose |
|---|---|
create_invoice | Create an invoice |
get_invoice | Get invoice details by ID |
list_invoices | List invoices |
void_invoice | Void/cancel an invoice |
get_invoice_pdf | Get invoice PDF download URL |
send_invoice | Email an invoice to one or more recipients |
create_contact | Create a contact (customer or supplier) |
update_contact | Update an existing contact |
delete_contact | Delete a contact |
list_contacts | List contacts |
create_item | Create a product or service item |
update_item | Update an existing item |
list_items | List products and services |
list_payments | List payments |
get_payment | Get payment by ID |
create_payment | Record a payment |
void_payment | Void/annul a payment |
list_categories | List item categories (chart of accounts) |
list_bank_accounts | List bank accounts |
get_company | Get 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 AlegraALEGRA_API_TOKEN(required, secret) — API token for Alegra
Issue credentials at the provider's developer portal: https://developer.alegra.com.
License
MIT
Comments
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.