🤖

Enterprise Odoo ERP Model Context Protocol (MCP) Server

PythonModel Context Protocol (MCP)FastAPIOdoo ERPLangdockDocker

Architected and deployed a production Model Context Protocol (MCP) server connecting Langdock enterprise agents directly to Odoo ERP/CRM for real-time asset tracking and maintenance dispatch.

Overview

As part of the CargoBeamer AI Factory initiative, our goal was to transition from passive, conversational LLM interfaces to active, autonomous agent execution. The highest-leverage operational target was Odoo ERP/CRM, which manages wheelset tracking, ECM III railcar maintenance records, and logistics partner communications.

I designed, implemented, and deployed a custom Model Context Protocol (MCP) server that exposes Odoo’s XML-RPC / JSON-RPC business logic to enterprise agents running in Langdock with fine-grained access control.

Engineering Highlights

  1. Model Context Protocol Architecture:

    • Implemented an asynchronous MCP server implementing the JSON-RPC 2.0 protocol over stdio and Server-Sent Events (SSE).
    • Designed clean tool schemas for querying equipment master records, creating maintenance intervention tickets, and retrieving logistics order status.
    • Enforced strict authorization boundaries, parameter validation via Pydantic models, and idempotency guarantees for ERP state mutations.
  2. Enterprise Agent Workflows:

    • Integrated the MCP server with Langdock, enabling authorized operations and technical staff to query complex fleet availability in natural language.
    • Built automatic query translation from unstructured technician notes to validated Odoo domain filters.
    • Provided instant cross-referencing between rail wagon IDs, ECM III compliance deadlines, and workshop availability.
  3. Performance & Reliability:

    • Implemented connection pooling and in-memory TTL caching for high-frequency reference data (location codes, equipment taxonomies).
    • Containerized the service with lightweight Docker images running under internal systemd supervisors with zero-downtime health probes.
    • Built comprehensive automated test suites verifying tool schema serialization, error code handling, and fail-safe rollbacks.

Business Impact

  • Shifted AI from chat to action: Enabled operations staff to query and trigger ERP workflows directly through conversational interfaces, cutting lookup times by over 70%.
  • Zero data fragmentation: Eliminated manual copy-pasting between dispatch communications and ERP databases.
  • Blueprint for Enterprise MCP: Established the reusable internal pattern and security model for subsequent MCP servers across CargoBeamer systems.
← Back to projects