Mini-ERP 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., "@Mini-ERP MCP What's the current stock level for product 123?"
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.
Mini-ERP MCP — learning project
A Model Context Protocol (MCP) server built on a simulated ERP domain (products, customers, sales), to understand end to end how a language model can discover and use external tools and data in a standardized way, instead of through custom integrations per LLM provider.
Context: this is a personal technical exploration project, not a production product or a client project. The ERP domain is deliberately minimal (a JSON file as the "database") — the goal is not business logic, but understanding the protocol.
What it does
It simulates the flow of an incoming message (for example, from WhatsApp) that arrives at an ERP-like system. The system assembles the relevant context for the model, offers it a set of tools, and the model autonomously decides which action to take to respond — including an action with a real effect (recording a sale), which requires human confirmation before being executed.
Related MCP server: OdooSurface MCP
Concepts this project puts into practice
MCP defines three primitives, and this project uses all three with an explicit design criterion for each:
Element | Type | Why |
| Resource | Stable data; the inbound host decides to inject it, without the model asking for it. |
| Resource (URI with parameter) | The host already knows the ID of the sender (it would come from the webhook); it builds the URI and injects it. |
| Tool | The model decides, in the middle of the conversation, whether it needs it. |
| Destructive tool | Action with a real effect; requires human confirmation before being executed. |
| Prompt | Reusable template for a recurring task. |
The central distinction this project lets you verify in practice: with a tool, the host hands the model the decision to invoke it; with a resource, the host keeps that decision for itself.
Architecture
┌───────────────────────┐ stdio ┌───────────────────────┐
│ Host (host_demo.py) │◄────────►│ Servidor MCP │
│ - Arma el contexto │ │ (server.py, FastMCP) │
│ - Ofrece tools al LLM │ │ - Resources │
│ - Ejecuta el loop de │ │ - Tools │──► data/erp.json
│ tool-calling │ │ - Prompts │
│ - Pide confirmación │ └───────────────────────┘
│ humana en acciones │
│ destructivas │
└──────────┬────────────────┘
│ API compatible OpenAI (router de HF) o API de Anthropic
▼
┌─────────────┐
│ LLM │
└─────────────┘host_demo.py plays, in this project, both the role of host and MCP client (in a real integration, the MCP client is usually a module inside the host, not a separate piece).
Stack
mcp[cli](FastMCP) — official Python SDK for MCP servers.Hugging Face Inference Providers — open source models, via the OpenAI API-compatible router (
openaiSDK pointing tohttps://router.huggingface.co/v1).Anthropic SDK — alternative support, maintained in parallel to compare the same MCP server working with two different providers.
MCP Inspector — development tool for testing the server without needing a real client.
How to run it locally
cp .env.example .env # completar HF_TOKEN (y opcionalmente ANTHROPIC_API_KEY)
uv syncTest the server in isolation (without LLM)
uv run mcp dev server.pyOpen the MCP Inspector in the browser, where you can invoke the tools and read the resources manually.
Run the full flow (host + real LLM)
uv run host_demo.pyBy default it uses Hugging Face (procesar_mensaje_huggingface). The code for using Anthropic (procesar_mensaje) remains available in the same file, commented out in the if __name__ == "__main__": block.
Environment variables
HF_TOKEN=tu_token_de_huggingface
HF_MODEL=openai/gpt-oss-120b
# Opcional, si se quiere probar con Anthropic en vez de Hugging Face
ANTHROPIC_API_KEY=tu_api_key_de_anthropicWhat I learned building this
The real mechanism for discovering and invoking tools in MCP: the model never talks directly to the MCP server; the host mediates every
list_tools()/call_tool()/read_resource().The difference between native function calling in each LLM provider (different formats between Anthropic and OpenAI-compatible APIs) and how MCP standardizes the exposure of tools without depending on those particular formats.
That not all models served by an inference provider support tool-calling reliably, and how to verify it before integrating.
Where the responsibility for human control over actions with effects lies (it is not something the protocol resolves automatically; it is a host design decision).
Real portability: the same
server.py, without modifications, works the same with two different LLM providers.
Project status
Learning project, complete and functional for the defined scope. Pending as a possible future extension: connecting the same server to Claude Desktop to verify portability against a real client (not just the host_demo.py script).
Available Tools
2 toolsconsultar_stockA
Consulta el stock disponible de un producto específico por su ID.
Usar esta herramienta cuando el cliente pregunte por disponibilidad de un producto puntual.
Inputs: producto_id (required). Returns: result
registrar_ventaADestructive
Registra una venta: descuenta stock y crea el registro de la operación.
ACCIÓN CON EFECTO REAL sobre el estado del sistema. Usar solo cuando
el cliente confirmó explícitamente que quiere comprar.
Inputs: cantidad (required), cliente_id (required), producto_id (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are unambiguously distinct: consultar_stock is a read-only stock lookup and registrar_venta is a state-changing sale registration. Descriptions explicitly frame the boundary (read vs. real-effect write), so an agent cannot confuse them.
Both names follow the same Spanish verb_noun pattern (consultar_stock, registrar_venta) with consistent snake_case and imperative verbs. There is no mixed convention.
Two tools is far too thin for a server scoped as a 'Mini-ERP' handling inventory and sales; even a minimal ERP needs product listing, restock/adjustment, and sales history. The surface only covers a single narrow checkout flow.
Only a read-stock plus create-sale pair exists, with no product catalog/listing, no inventory update or restock, no sale retrieval or cancellation, and no reporting. Agents will hit dead ends for any operation beyond checking one product and recording one sale.
Maintenance
Related MCP Connectors
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
Give AI agents 30,000+ safe, token-optimized actions across Workday, SAP, Oracle + hundreds more.
Connect AI to Odoo ERP 14-20: search, create, update and manage records in natural language.
Malaysian SME accounting, e-Invoice and payroll for your AI. 77 tools; writes are approved drafts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Odoo ERP systems through 17+ business tools covering sales, purchasing, inventory, and accounting operations. Supports both Claude Desktop integration and web deployment with dual transport modes.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to interact with Odoo ERP as the authenticated user, with tools for discovery, planning, and mutations bounded by user permissions.3665 npm2Apache 2.0
- FlicenseNot gradedqualityDmaintenanceEnables LLM agents to interact with Odoo 17 ERP via external API, providing tools for inventory management, sales order processing, and customer management through natural language.-

ERPipeofficial
AlicenseNot gradedqualityBmaintenanceEnables AI agents to interact with Odoo ERP through natural language, providing tools and prompts for data operations and record management.MIT