ERP Lite Server
БесплатноНе проверенMCP server that exposes ERP functionalities to AI agents, enabling read-only queries for sales orders and inventory, and human-in-the-loop purchase requisition
Описание
MCP server that exposes ERP functionalities to AI agents, enabling read-only queries for sales orders and inventory, and human-in-the-loop purchase requisition creation and approval.
README
An enterprise-ready Model Context Protocol (MCP) server that exposes ERP functionalities to AI agents. Built as a portfolio project to demonstrate AI/ML maturity, this project features a realistic data schema and a critical human-in-the-loop workflow for write actions.
Overview
As enterprise AI adoption accelerates, providing LLMs with direct read/write access to ERPs is becoming essential. However, autonomous agents should not execute consequential operations (like creating purchase orders or altering system configurations) without human oversight.
This server demonstrates a robust "human-in-the-loop" pattern:
- The AI agent can query open sales orders, check inventory levels, and identify low-stock items using its read-only tools.
- When an agent decides to replenish stock, it can only propose a purchase requisition in a
pending_approvalstate. - The agent cannot approve its own requisition. When it creates the requisition, a secure
approval_tokenis generated and saved to the database, but is not returned to the agent. - A human administrator can view pending requisitions and their tokens via a dedicated, authenticated REST endpoint (
GET /admin/pending-requisitions). - The human must intervene to approve the requisition by providing the correct token to the agent (or an approval mechanism) to satisfy the gate.
Architecture
graph TD
Client[Claude Desktop / Custom Client] -- "MCP (stdio or Streamable HTTP)" --> FastMCP[FastMCP Server]
FastMCP -- "SQLAlchemy" --> DB[(PostgreSQL Database)]
DB --> Seed[Seed Data]
Quick Start (Docker)
To get started quickly, run the entire stack with Docker Compose.
First, create your .env file to set a secure Admin API key:
cp .env.example .env
# Edit .env and set your ADMIN_API_KEY to a secure value
Then start the containers:
docker compose up
This spins up:
- A PostgreSQL database (pre-seeded with realistic enterprise data for sales orders, inventory, and requisitions), with health checks configured.
- The MCP server exposing the Streamable HTTP transport on port 8000.
⚠️ Upgrading from a previous version? The
seed_data.sqlscript only runs viadocker-entrypoint-initdb.don a fresh, empty Postgres volume. If you already have apgdatavolume from a prior run, new tables (likeaudit_log) won't be created automatically. To pick up schema changes, wipe the volume and rebuild:docker compose down -v docker compose up --build
Tools Exposed
get_open_orders(status="open", limit=20): Retrieves a list of sales orders by status.check_inventory(material_id): Checks the inventory level and computes if it's below the reorder point.get_low_stock_items(): Intelligent query that identifies all inventory items below their reorder threshold.create_requisition(material_id, quantity, requested_by): WRITE TOOL. Creates a new purchase requisition in apending_approvalstate and silently records anapproval_token.approve_pending_requisition(requisition_id, approved_by, approval_token): WRITE TOOL. Approves a pending requisition. Must be explicitly triggered by human confirmation using the token retrieved from the admin endpoint.
All tool calls (both successful and failed) are automatically recorded in the append-only audit log for SOX-style compliance. Sensitive arguments like approval_token are redacted before persistence.
Admin Endpoints
GET /admin/pending-requisitions: Lists all pending requisitions with their approval tokens.GET /admin/audit-log?limit=50: Returns the most recent audit log entries (newest first). Supports?limit=N(default 50, max 500).
Both endpoints require the X-Admin-Key header matching the ADMIN_API_KEY environment variable.
Demo
Testing Locally
Using the Custom Python Client
To prove that this server supports remote transport via HTTP, you can use the built-in client script:
python client.py
Using Claude Desktop (Stdio transport)
To test with Claude Desktop, configure your claude_desktop_config.json to use the uv run command:
{
"mcpServers": {
"erp-lite": {
"command": "C:\\Absolute\\Path\\To\\erp-lite-mcp\\.venv\\Scripts\\python.exe",
"args": [
"-m",
"src.server"
],
"env": {
"PYTHONUNBUFFERED": "1",
"PYTHONIOENCODING": "utf-8",
"PYTHONPATH": "C:\\Absolute\\Path\\To\\erp-lite-mcp"
}
}
}
}
Note for Windows Users: Claude Desktop runs in a sandboxed environment on Windows. Using
uv rundirectly inside the config often fails to resolve relative module paths correctly. It is highly recommended to provide the absolute path to the.venv\Scripts\python.exeand explicitly pass your project directory as thePYTHONPATHenvironment variable as shown above.
Running Unit Tests
To run the pytest suite testing the tool logic, requisition lifecycle, and audit logging:
uv run pytest
Note: All tests run against an in-memory SQLite database — no Postgres container or Docker is needed. The
SessionLocalis monkeypatched in the test fixture. CI (GitHub Actions) uses the same approach, so no database service is configured in the workflow.
Future Enhancements
- Token Security: Currently, the
approval_tokenis stored as plaintext in the database so the admin endpoint can serve it. In a fully-fledged system with email or Slack integration, the token should be sent directly to the approver's inbox and stored as a cryptographic hash in the database, preventing it from ever being exposed via an API route. - Authentication & RBAC: Implement Role-Based Access Control to ensure the
approved_byidentity has the actual rights to approve the specific value/material in the requisition. The admin route currently uses a simple shared-secretADMIN_API_KEY, which is sufficient for a demo but needs proper IAM in production. Audit Logging:✅ Implemented. Every tool call is recorded in an append-onlyaudit_logtable with tool name, redacted arguments, result (including failures), and timestamp. Accessible viaGET /admin/audit-log.- Policy Search Resource: A RAG-like capability to expose procurement policy documents to the agent as MCP resources.
Установка ERP Lite Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/josephkamau32/erp-lite-mcpFAQ
ERP Lite Server MCP бесплатный?
Да, ERP Lite Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для ERP Lite Server?
Нет, ERP Lite Server работает без API-ключей и переменных окружения.
ERP Lite Server — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить ERP Lite Server в Claude Desktop, Claude Code или Cursor?
Открой ERP Lite Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzMCP-Agent
A simple, composable framework to build agents using Model Context Protocol by [LastMile AI](https://www.lastmileai.dev)
автор: lastmile-aiSpring AI MCP Client
Provides auto-configuration for MCP client functionality in Spring Boot applications.
mcp.natoma.ai
A Hosted MCP Platform to discover, install, manage and deploy MCP servers by [Natoma Labs](https://www.natoma.ai)
MCPHub
Website to list high quality MCP servers and reviews by real users. Also provide online chatbot for popular LLM models with MCP server support.
MCP Servers Rating and User Reviews
Website to rate MCP servers, write authentic user reviews, and [search engine for agent & mcp](http://www.deepnlp.org/search/agent)
mkinf
An Open Source registry of hosted MCP Servers to accelerate AI agent workflows.
Compare ERP Lite Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
