ERP-lite MCP Server

ERP-lite MCP 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 creation and approval.

Category
Visit Server

README

ERP-lite MCP Server

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_approval state.
  • The agent cannot approve its own requisition. A human must intervene to approve it.

Architecture

graph TD
    Client[Claude Desktop / Custom Client] -->|MCP (stdio or SSE 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:

docker compose up

This spins up:

  • A PostgreSQL database (pre-seeded with realistic enterprise data for sales orders, inventory, and requisitions).
  • The MCP server exposing SSE transport at http://localhost:8000/sse.

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 a pending_approval state.
  • approve_pending_requisition(requisition_id, approved_by): WRITE TOOL. Approves a pending requisition. Must be explicitly triggered by human confirmation.

Testing Locally

Using the Custom Python Client

To prove that this server supports remote transport via HTTP (Server-Sent Events), 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 run directly 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.exe and explicitly pass your project directory as the PYTHONPATH environment variable as shown above.

Running Unit Tests

To run the pytest suite testing the tool logic and requisition lifecycle:

uv run pytest

Future Enhancements

  • Authentication & RBAC: Implement Role-Based Access Control to ensure the approved_by identity has the actual rights to approve the specific value/material in the requisition.
  • Audit Logging: Maintain a strict append-only audit trail of who/what queried and executed which tool, crucial for compliance (e.g. SOX).
  • Policy Search Resource: A RAG-like capability to expose procurement policy documents to the agent as MCP resources.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured