Agente Pyme MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Agente Pyme MCPPrepara un presupuesto para Oficinas Castellana: 2 splits de 3,5 kW con instalación."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agente-pyme-mcp
An AI back-office agent for a small business, built the way it should run in production: an MCP server that owns the business rules, a Claude agent that uses it, a human approval gate for anything that changes state, and tests + evals.
Agente de IA para el back office de una pyme: presupuestos, facturas vencidas y recordatorios de pago, con servidor MCP, aprobación humana, tests y evals. Resumen en español abajo.
Demo with a fictional HVAC company in Madrid. All clients, emails and figures in
data/seed.jsonare made up.
What it does
Ask in plain language:
"Prepara un presupuesto para Oficinas Castellana: 2 splits de 3,5 kW con su instalación."
"¿Qué facturas están vencidas? Redacta un recordatorio firme para la más antigua."
The agent looks up the client, picks products from the catalogue, creates a draft quote and drafts reminder emails. It never sends anything, and it can only approve a quote after a person says yes.
Related MCP server: manager-mcp
Design choices (the part that matters for production)
Concern | How it's handled |
The model never does the maths | Totals, VAT and discounts are computed in |
Policy lives in code, not in the prompt | Discounts above 15 % need a manager. The approver's role comes from server config ( |
Human in the loop |
|
Drafts, not side effects | Quotes are created as drafts and reminders are returned as text. Sending is deliberately out of scope. |
Recoverable errors | Unknown client/product, bad discount, missing approval → returned as tool errors with a hint ("use get_catalogue"), so the model can correct itself instead of crashing. |
Tested and evaluated | Unit + MCP protocol tests ( |
One server, many clients | The same MCP server works with this agent, Claude Desktop, Claude Code or any MCP-capable assistant. |
Architecture
you ──► agent.ts (Claude, tool loop, human approval gate)
│ MCP over stdio
▼
server.ts (6 tools, safety annotations)
│
▼
backoffice.ts (rules: totals, VAT, discount limits, approvals)
│
▼
data/seed.json (fictional company)Tools: search_clients, get_catalogue, create_quote_draft, approve_quote, list_overdue_invoices, draft_payment_reminder.
Run it
Requires Node.js 22.18+ (TypeScript runs natively, no build step) and pnpm.
pnpm install
pnpm test # unit + MCP tests, no API key needed
pnpm agent # interactive agent (needs Claude API credentials: ANTHROPIC_API_KEY or `ant auth login`)
pnpm evals # behavioural evals against the real model (a few cents per run)Use it from Claude Code or Claude Desktop
claude mcp add agente-pyme -- node /absolute/path/to/agente-pyme-mcp/src/server.tsClaude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"agente-pyme": { "command": "node", "args": ["/absolute/path/to/agente-pyme-mcp/src/server.ts"], "env": { "APPROVER_ROLE": "staff" } }
}
}Taking it to a real company
What changes in a client project: the JSON file becomes their ERP/CRM API or database, the MCP server moves to an HTTP transport with OAuth and per-user permissions, every tool call is logged for audit, and the evals grow from real conversations. That's the work I do as a freelance: cayetano.dev.
En español
Demo de un agente de IA para el back office de una pyme (empresa ficticia de climatización en Madrid): busca clientes, consulta el catálogo, crea borradores de presupuesto, lista facturas vencidas y redacta recordatorios de pago.
Lo importante es cómo está hecho:
El modelo no hace cuentas: totales, IVA y descuentos se calculan en código.
Las reglas están en el código, no en el prompt: un descuento por encima del 15 % requiere a un responsable, y el rol lo fija la configuración del servidor, no el modelo.
Aprobación humana: aprobar un presupuesto exige que una persona diga que sí.
Nada se envía solo: presupuestos y recordatorios son borradores.
Errores recuperables, tests y evals.
Un servidor MCP para todo: sirve para este agente, para Claude Desktop, Claude Code o cualquier asistente compatible con MCP.
¿Quieres algo así conectado a tu ERP, CRM o correo? Escríbeme en cayetano.dev.
License
MIT © Cayetano Soriano Gallego
This server cannot be deployed
Maintenance
Related MCP Connectors
AI agents for CRM, mail, calendar, ERP and accounting - you approve. EU-hosted, OAuth.
Invoicing tools for AI assistants: clients, draft invoices with computed tax, and email sending.
Run your service firm from your AI: client work to review, clients, deliverables, invoices.
Malaysian SME accounting, e-Invoice and payroll for your AI. 64 tools; writes are approved drafts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with a commercial management system through controlled capabilities for querying orders, analyzing invoices, summarizing customer activity, and creating orders, with role-based access control and audit trails.-
- AlicenseBqualityAmaintenanceEnables AI assistants to query and manage self-hosted accounting data—invoices, balances, and books—through natural language, with read-only tools by default and optional scoped write operations.3036 PyPI1AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceLets a user ask what their business is owed, who to chase first, and get a chase email drafted in their own voice, via tools for weekly totals, chase queues, customer history, due-soon invoices and insights. Every tool only reads or returns a draft, so nothing can be sent.MIT
- AlicenseNot gradedqualityBmaintenanceConnects AI assistants to a business workspace so they can read and manage clients, leads, projects, tasks, tickets, invoices, proposals, and related records, including sending client emails.MIT