oliveratech-platform
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
oliveratech-platform
ES — El núcleo agéntico de un pequeño negocio revendedor de productos digitales. EN — The agentic core of a small digital-reseller business.
Español · English · License: MIT
Español
Qué es y por qué
oliveratech-platform es el corazón agéntico de un pequeño negocio que revende productos digitales
(asientos de suites de productividad, tarjetas virtuales, recargas, suscripciones de software). Reúne:
CRM en PostgreSQL: leads, consentimientos, hilos e interacciones, seguimientos, casos de soporte, pedidos, cotizaciones, cobros, tareas del directorio y bandeja de salida (outbox).
Servidor MCP como ÚNICA interfaz operativa para agentes de IA. Cada agente (
attention,sales,support,marketing,finance_supervisor,ceo,qa, más el puente de canal no-LLMchannel_gateway) tiene su propia identidad y una lista cerrada de herramientas. Los canales (WhatsApp, chat web, agente de voz web de ElevenLabs) son clientes MCP: no tienen lógica de negocio propia.Ruta del dinero determinista: precios, tipo de cambio, margen de seguridad (buffer), montos de cotización, vencimientos, estado pagado/activo y libro mayor los calcula y escribe código, nunca un modelo de lenguaje. Ninguna herramienta MCP acepta montos, precios, monedas ni estados.
Base de conocimiento (KB) versionada: políticas, FAQ, guiones y fichas de producto con versión, vigencia (
as_of), hash de contenido y citas. La KB nunca contiene precios ni estados.
Los humanos (el directorio / board) sólo intervienen para lo que requiere criterio humano:
aprobar gasto, excepciones y nuevas condiciones, mensajes salientes sin consentimiento, reembolsos y
asuntos legales. Lo hacen mediante la CLI del directorio (pnpm board …), que no es accesible por MCP.
Arquitectura (resumen)
Arquitectura hexagonal (puertos y adaptadores). Detalle completo en ARCHITECTURE.md.
src/
domain/ reglas puras: máquina de estados, dinero, precios, política de envío, KB, plugins
ports/ interfaces: repositorios, proveedor de pagos, embeddings, canales, DNS
application/ servicios: cotización, cobro, eventos de pago, cumplimiento, mensajería, KB, privacidad, finanzas, directorio
adapters/ Postgres, memoria, Kaia Pay (REST + verificador de webhooks), proveedor falso, embeddings, precios
mcp/ catálogo de herramientas, roles, capacidades prohibidas, ejecutor, auth, rate limit
http/ servidor node:http: POST /mcp, webhook de pagos, /healthz
cli/ board, migrate, kb:sync, kb:lint, privacy:purge, servidor stdio de desarrollo
products/ plugins de tipo de producto (workspace + stubs)Inicio rápido
Requisitos: Node.js ≥ 20.19 y pnpm (ver packageManager en package.json).
pnpm install
cp .env.example .env # revise y complete; nunca suba .env al repositorio
# Desarrollo con almacenamiento en memoria, KB de ejemplo y un token por rol (impresos en stderr)
KB_SEED_EXAMPLES=true DEV_BOOTSTRAP_AGENTS=true DNS_RESOLVER=offline pnpm dev
# Servidor MCP por stdio para un solo rol (memoria, proveedor falso, KB de ejemplo)
MCP_DEV_ROLE=sales pnpm dev:stdioCon PostgreSQL (requiere la extensión pgvector):
export STORAGE=postgres DATABASE_URL=postgres://<user>:<password>@localhost:5432/<db>
pnpm migrateNotas de desarrollo:
Con
DNS_RESOLVER=offlinesólo "existen" los dominios bajo los TLD reservados.testy.example(p. ej.mi-empresa.test), así queworkspacese puede cotizar sin red; cualquier otro dominio respondedomain_not_resolvable. UseDNS_RESOLVER=nodepara dominios reales (obligatorio en producción).PAYMENT_PROVIDER=fake(por defecto) nunca mueve dinero. Un pedido sólo pasa apaidcon un webhook firmado y verificado, así que para simularlo localmente definaKAIA_PAY_WEBHOOK_SECRETcon un valor de prueba y envíe un evento firmado (ver docs/payments-kaia-pay.md).Los comandos
pnpm board …,pnpm kb:sync(sin--dry-run) ypnpm privacy:purgerequierenSTORAGE=postgres.
Configuración
Toda la configuración se lee de variables de entorno y se valida al arrancar (src/config/env.ts); un
valor inválido detiene el proceso. La lista completa con comentarios está en .env.example.
Grupo | Variables principales | Notas |
Servidor |
|
|
Almacenamiento |
| producción exige |
Autenticación MCP |
|
|
Pagos |
|
|
Precios |
| producción exige |
Reglas |
| montos en unidades menores |
Límites |
| por agente / por petición |
KB |
| con Postgres |
Productos |
| |
CLI del directorio |
| sólo para |
Tabla completa y reglas de arranque: docs/deployment.md.
Estado del proveedor de pagos
El adaptador de Kaia Pay sigue un contrato REST provisional (2026-12-01), transmitido por el
agente del proveedor y aún no verificado contra el servidor real (marcado TODO-sync-with-kaia-pay en el
código). PAYMENT_PROVIDER=fake es el valor por defecto para desarrollo y pruebas y se rechaza en
producción. Ver docs/payments-kaia-pay.md.
Pruebas
pnpm test # unitarias + integración
pnpm lint # eslint + prettier --check
pnpm typecheckLas pruebas de integración sólo se ejecutan cuando DATABASE_URL apunta a un PostgreSQL con
pgvector, por ejemplo:
docker run --rm -d -p 5432:5432 -e POSTGRES_PASSWORD=dev pgvector/pgvector:pg17
DATABASE_URL=postgres://postgres:dev@localhost:5432/postgres pnpm testHerramientas MCP
Las herramientas se asignan por rol con denegación por defecto (src/mcp/roles.ts): una herramienta no
asignada no aparece en la lista ni puede invocarse. Ver la tabla en la sección en inglés.
CLI del directorio
Requiere BOARD_TOKEN (secreto del operador) cuyo SHA-256 coincida con BOARD_TOKEN_SHA256.
Comando | Efecto |
| Tareas abiertas (escalamientos, facturas por emitir, revisiones) |
| Cerrar un caso de cobro/reembolso/legal (los agentes no pueden) |
| Borradores salientes pendientes de aprobación |
| Liberar a |
| Identidades de agentes (el token se muestra una sola vez) |
| Validar y activar una versión de la tabla de precios |
| Asiento de reversión (el original nunca se modifica) |
| Derechos del titular de datos |
| Cómo registra el webhook el propietario (sin llamadas de red) |
Seguridad
Ningún agente puede marcar pagos, cambiar estados, escribir el libro mayor, fijar precios, reembolsar, configurar webhooks, aprobar borradores, gestionar agentes ni borrar datos: estas capacidades están prohibidas y una prueba lo verifica.
Sólo un webhook
charge.paidverificado (HMAC-SHA256, tolerancia de 5 minutos, deduplicación porevt_…) puede marcar un pedido como pagado. Las capturas de pantalla nunca son prueba de pago.Los registros pasan por redacción obligatoria de PII y secretos.
Reporte vulnerabilidades sólo por GitHub private vulnerability reporting: ver SECURITY.md.
Más: SECURITY.md, PRIVACY.md, docs/threat-model.md.
Related MCP server: Enterprise Operations Hub
English
What and why
oliveratech-platform is the agentic heart of a small business that resells digital products
(productivity-suite seats, virtual cards, mobile top-ups, software subscriptions). It combines:
A CRM in PostgreSQL: leads, consents, threads and interactions, follow-ups, support cases, orders, quotes, charges, board tasks and an outbox.
An MCP server as the ONLY operating interface for AI agents. Each agent (
attention,sales,support,marketing,finance_supervisor,ceo,qa, plus the non-LLM channel bridgechannel_gateway) has its own identity and a closed tool allow-list. Channels (WhatsApp, web chat, the ElevenLabs web voice agent) are MCP clients with no business logic of their own.A deterministic money path: prices, FX, buffer, quote amounts, expiry, paid/active status and the ledger are computed and written by code, never by a language model. No MCP tool accepts amounts, prices, currencies or states as input.
A versioned knowledge base (KB): policies, FAQs, scripts and product sheets with versions, validity (
as_of), content hashes and citations. The KB never holds prices or statuses.
Humans (the board) only do what needs human judgement: approve spend, exceptions and new conditions,
outbound messages without consent, refunds and legal matters. They act through the board CLI
(pnpm board …), which is not reachable through MCP.
Architecture overview
Hexagonal (ports and adapters). Full details in ARCHITECTURE.md.
flowchart LR
subgraph Channels[MCP clients]
WA[WhatsApp bridge]
WC[Web chat]
EL[ElevenLabs web agent]
end
subgraph Core[oliveratech-platform]
MCP[POST /mcp<br/>roles + strict schemas]
APP[application services]
DOM[domain rules]
WH[POST webhook path<br/>HMAC verify + dedupe]
W[in-process payment-event worker]
end
PG[(PostgreSQL + pgvector)]
KP[Kaia Pay REST]
BOARD[board CLI - humans]
WA & WC & EL --> MCP --> APP --> DOM
APP --> PG
APP --> KP
KP -- signed events --> WH --> PG
W --> APP
BOARD --> APPQuickstart
Requirements: Node.js ≥ 20.19 and pnpm (see packageManager in package.json).
pnpm install
cp .env.example .env # review and fill in; never commit .env
# Dev run: in-memory storage, example KB, one token per role (printed to stderr)
KB_SEED_EXAMPLES=true DEV_BOOTSTRAP_AGENTS=true DNS_RESOLVER=offline pnpm dev
# stdio MCP server for a single role (memory storage, fake provider, example KB)
MCP_DEV_ROLE=sales pnpm dev:stdioCall the HTTP MCP endpoint with any Streamable HTTP MCP client, or with curl:
curl -s http://localhost:8080/mcp \
-H "Authorization: Bearer <dev-token-from-stderr>" \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'With PostgreSQL (the pgvector extension is required):
export STORAGE=postgres DATABASE_URL=postgres://<user>:<password>@localhost:5432/<db>
pnpm migrateDevelopment notes:
With
DNS_RESOLVER=offlineonly domains under the reserved.testand.exampleTLDs "exist" (e.g.my-company.test), soworkspacecan be quoted offline; any other domain answersdomain_not_resolvable. UseDNS_RESOLVER=nodefor real domains (required in production).PAYMENT_PROVIDER=fake(the default) never moves money. An order only becomespaidthrough a verified, signed webhook, so to simulate one locally setKAIA_PAY_WEBHOOK_SECRETto a test value and post a signed event (see docs/payments-kaia-pay.md).pnpm board …,pnpm kb:sync(without--dry-run) andpnpm privacy:purgerequireSTORAGE=postgres.
Configuration
All configuration comes from environment variables and is validated at boot (src/config/env.ts); any
invalid value stops the process (error messages name variables, never values). .env.example lists every
variable with comments. Summary:
Group | Main variables | Notes |
Server |
|
|
Storage |
| production requires |
MCP auth |
|
|
Payments |
|
|
Prices |
| production requires |
Business rules |
| amounts in minor units |
Limits |
| per agent / per request |
Knowledge base |
| with Postgres |
Products |
| |
Board CLI |
| only read by |
Full table with defaults and boot rules: docs/deployment.md.
Payment provider status
The Kaia Pay adapter follows a REST contract that is provisional (2026-12-01): relayed by the
provider's agent and not yet verified against the live server (marked TODO-sync-with-kaia-pay in code).
PAYMENT_PROVIDER=fake is the default for development and tests and is rejected in production. See
docs/payments-kaia-pay.md.
Running tests
pnpm test # unit + integration
pnpm test:unit
pnpm test:integration
pnpm lint # eslint + prettier --check
pnpm typecheckIntegration tests run only when DATABASE_URL points to PostgreSQL with pgvector, for example:
docker run --rm -d -p 5432:5432 -e POSTGRES_PASSWORD=dev pgvector/pgvector:pg17
DATABASE_URL=postgres://postgres:dev@localhost:5432/postgres pnpm testMCP tools
Deny by default: a tool not granted to a role is neither listed nor callable, and the executor re-checks
authorization on every call. All input schemas are strict (unknown keys rejected). Source of truth:
src/mcp/tools.ts and src/mcp/roles.ts.
Tool | Roles | Read-only |
| attention, sales, support, marketing | yes |
| attention, sales, marketing, channel_gateway | no |
| attention, sales, marketing, channel_gateway¹ | no |
| sales | no |
| attention, sales, support, marketing, channel_gateway¹ | no |
| attention, sales, support | no |
| attention, sales, support, marketing, ceo, qa | yes |
| attention, sales, support, marketing, ceo, qa | yes |
| attention, sales, support, marketing, ceo, qa | yes |
| attention, sales | yes |
| sales | no |
| sales, finance_supervisor, ceo, qa | yes |
| sales | no |
| sales | no |
| attention, sales, support, finance_supervisor, ceo, qa | yes |
| support, finance_supervisor, ceo | yes |
| sales, support | no |
| attention, support | no |
| support (not | no |
| attention, sales, support, finance_supervisor, ceo | no |
| attention, sales, support, marketing | no |
| finance_supervisor, ceo | yes |
| finance_supervisor | yes |
| finance_supervisor, ceo | yes |
¹ channel_gateway is not an LLM agent: it is the deterministic channel bridge (e.g. the WhatsApp/web-chat
webhook receiver). Only inbound messages it logs are verified; only verified inbound messages open
customer threads / reply windows (needed for auto replies) and serve as evidence for consent grants
recorded by LLM agents. Inbound text logged by an LLM agent is kept as a note but unlocks nothing.
Agent system-prompt templates: docs/agents/. Channel notes: docs/channels/elevenlabs.md.
Board CLI
Every command (except help and kaia-pay-webhook-help) requires BOARD_TOKEN (operator secret) whose
SHA-256 equals BOARD_TOKEN_SHA256 (deployment config), and STORAGE=postgres. BOARD_ACTOR labels the
actor in records.
Command | Effect |
| Open board tasks (escalations, invoice due, reviews, alerts) |
| Close a billing/refund/legal case (agents cannot) |
| Outbound drafts awaiting approval ( |
| Release an order held for caps or provider limits back to |
| Agent identities (token printed once; only its hash is stored) |
| Validate and activate a price-table version |
| Append a reversal entry (the original is never modified) |
| Data-subject rights |
| How the owner registers the provider webhook (no network call) |
Other CLIs: pnpm migrate, pnpm kb:lint, pnpm kb:sync, pnpm privacy:purge — see
docs/knowledge-base.md and docs/deployment.md.
Security notes
Agents can never mark payments, set order states, activate or provision, write or edit the ledger, set prices, refund, fund the wholesaler, configure webhooks, approve drafts, manage agents or erase data. These capabilities are forbidden and a test asserts no tool carries them.
Only a verified
charge.paidwebhook (HMAC-SHA256, 5-minute tolerance, dedupe byevt_…id) can mark an order paid. Status polls never do; screenshots are never proof of payment.Per-agent bearer tokens are stored hashed; logs pass through mandatory PII/secret redaction.
Report vulnerabilities only through GitHub private vulnerability reporting — see SECURITY.md.
More: ARCHITECTURE.md, SECURITY.md, PRIVACY.md, docs/threat-model.md, docs/products.md, docs/knowledge-base.md, docs/deployment.md, CONTRIBUTING.md, CHANGELOG.md.
Licencia / License
MIT © 2026 Carlos Olivera Terrazas. Ver / see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Run a service business from your AI agent: CRM, leads, scheduling, invoicing, jobs and more.
AI agent platform: manage leads, conversations, bots, calendar and CRM via MCP.
A lightweight, agentic CRM for growing businesses. Connect ChatGPT, Claude, Cursor, and other MCP clients to forecast cleanly, keep every account current, and give your team one place to plan the next move.
API-first CRM for LLMs - contacts, companies, deals and activities over a native MCP server.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides AI agents with operational customer context, including typed revenue objects, persistent state, scoped tools, and human-in-the-loop handoffs through MCP, REST, and CLI.14Apache 2.0
- FlicenseNot gradedqualityBmaintenanceAn MCP-native enterprise operations platform that unifies team management, product catalog, order processing, knowledge base, location intelligence, analytics, and DevOps monitoring into a single server accessible from any MCP-compatible AI agent.-
- AlicenseNot gradedqualityBmaintenanceAn agent-callable MCP server that lets autonomous AI agents find, verify, message, schedule with, and transact with small and mid-sized businesses through a single compliance-enforced tool surface.MIT
- FlicenseNot gradedqualityCmaintenanceKeplerAgents MCP server: connects ChatGPT and Claude to real business operations — WhatsApp, sales, remittances, treasury — with read-only access, per-organization permissions and traceability.-