- Home
- MCP servers
- Alegra
Alegra
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"juancsanchez-alegra-mcp": {
"command": "npx",
"args": [
"-y",
"@juancsanchez/alegra-mcp"
],
"env": {
"ALEGRA_USER": "YOUR_ALEGRA_USER",
"ALEGRA_TOKEN": "YOUR_ALEGRA_TOKEN"
}
}
}
}You can run a dedicated MCP server that acts as a secure bridge to Alegra’s accounting API, enabling your language models to interact with invoices, contacts, items, and more without exposing credentials outside your environment.
How to use
Configure your MCP client to point at the Alegra MCP, then start serving requests from your language model. You will provide credentials via environment variables, and all requests and errors will be logged locally for debugging.
How to install
Prerequisites you need before starting:
Node.js version 18 or higher
Alegra API credentials (user and token) ready for your environment
Choose one of the setup methods below and follow the steps exactly.
Direct NPX run (easy start for end users)
{
"mcpservers": {
"Alegra-MCP-Public": {
"command": "npx",
"args": [
"-y",
"@juancsanchez/alegra-mcp"
],
"env": {
"ALEGRA_USER": "su_email@dominio.com",
"ALEGRA_TOKEN": "su_token_de_api_aqui"
}
}
}
}
Local installation and run (developers)
If you want to modify or inspect the code, follow these steps exactly.
Prerequisites
Node.js 18 or newer
Alegra API credentials: a user and a token
- Clone the repository
git clone https://github.com/juancsanchez/Alegra-MCP
cd alegra-mcp
- Install dependencies
npm install
- Create credentials file
touch .env
- Add your Alegra credentials to .env
ALEGRA_USER="su-correo@ejemplo.com"
ALEGRA_TOKEN="su_token_secreto_de_la_api"
- Build the code
npm run build
- Start the server
npm start
Available tools
AlegraAPI
Provides CRUD operations (GET, POST, PUT, DELETE) on Alegra API endpoints such as invoices, contacts, items, and more.
Logging
All requests and errors are written to a local log file alegra-mcp.log for debugging and traceability.