Skip to main content
Glama
sharpjsdev

ERP-File MCP Server

by sharpjsdev

ERP & File MCP Server

A dual FastMCP (Model Context Protocol) server built with FastAPI. This application exposes two concurrent MCP servers natively routed via custom ASGI middleware to interact with backend ERP APIs and local/Google Sheets data.

Features

  • Dual MCP Endpoints:

    • /mcp: Connects to an external ERP API, caches data locally into PostgreSQL with adaptive fetching algorithms, and exposes tools for querying standard business reports.

    • /mcp-file: Loads data from a Google Sheet (if GOOGLE_CREDENTIALS provided) or a local file (Excel/CSV), exposing tools to list, search, and summarize data dynamically.

  • Adaptive Database Sync: Heavily optimizes API usage by scaling fetch windows based on historical data density. Keeps a rolling cache up-to-date automatically using background concurrency.

  • Robust Error Handling: Handles network, API, and credential failures seamlessly, preventing server crashes and falling back when sources become unreachable.

Related MCP server: erp-mcp

Endpoints / Test Paths

  • ERP Data FastMCP: http://localhost:8080/mcp

  • File / Sheets FastMCP: http://localhost:8080/mcp-file

Prerequisites

  • Python 3.11+

  • PostgreSQL

  • Valid .env configuration (see .env.example)

Environment Variables

Check .env.example for full configuration details. Key variables include:

  • DATABASE_URL: PostgreSQL connection string.

  • GOOGLE_CREDENTIALS: JSON string representation of a Google Service Account (optional, for Google Sheets integration).

Running Locally

  1. Install dependencies:

pip install -r requirements.txt
  1. Start the Uvicorn server:

uvicorn main:app --host 0.0.0.0 --port 8080

Docker

Build and run using Docker:

docker build -t erp-mcp-server .
docker run -p 8080:8080 --env-file .env erp-mcp-server

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Connects OpenXE ERP with AI assistants via MCP, enabling natural language queries to read and write ERP data locally.
    2
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Exposes ERP data (production orders, inventory, BOM, customers) to any MCP client through a backend-neutral interface, with a mock backend for testing.
    1
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Governed MCP bridge that lets AI clients query live ERP data via SuiteQL, saved searches, and records, with role-based permissions and full audit logging.
    -