# ERP-lite MCP Server

A demonstration Model Context Protocol server that exposes ERP-style sales, inventory and purchasing data to AI agents, with a genuinely enforced human-in-the-loop approval gate on write actions and a full audit trail.

ERP-lite MCP Server lets an AI agent query open sales orders, check inventory levels and identify low-stock items through read-only tools, then propose a purchase requisition that starts in a pending-approval state. The agent cannot approve its own requisition: a secure approval token is generated and stored but never returned to the agent.

A human administrator views pending requisitions and their tokens through a dedicated, authenticated REST endpoint that sits entirely outside the MCP tool surface, so no agent can reach it, then supplies the token back to approve the requisition through a constant-time comparison rather than a naming convention. Every tool call, successful or failed, is written to an append-only audit log with sensitive values such as the approval token redacted before persistence.

It is built with FastAPI and FastMCP on the backend, SQLAlchemy over PostgreSQL for storage, supports stdio or Streamable HTTP transport with bearer-token authentication, ships as a Docker deployment, and is covered by a pytest test suite. It is described as a portfolio project demonstrating AI and ML engineering practice.

Website: https://github.com/josephkamau32/erp-lite-mcp
