ADR-014: Evaluation of Heng Sin's idempiere-mcp Project for MCP Data Tools

Status

Accepted

Context

We evaluated Heng Sin's idempiere-mcp project to understand if components could be adopted for AI integration in idempiere-cli.

Our AI Strategy

idempiere-cli uses LangChain4j with @Tool annotations (ADR-013) for AI integration:

> Note: ADR-010 (External MCP Server) has been superseded by ADR-013.

Project Reference

Heng Sin's idempiere-mcp Project Overview

The idempiere-mcp project is a proof-of-concept MCP server that:

Key Architectural Differences

Aspect idempiere-cli (LangChain4j) Heng Sin's idempiere-mcp
Approach LangChain4j @Tool annotations External MCP server
Deployment Embedded in CLI OSGi bundle in iDempiere
Backend Direct DB (JDBC) iDempiere REST API
Transport N/A (embedded) SSE, Streamable HTTP
Dependencies LangChain4j (~5MB) MCP SDK + iDempiere-rest + OSGi
iDempiere Required No (just PostgreSQL) Yes (full server)
Local LLM Yes (Ollama) No

Decision

We will NOT adopt Heng Sin's idempiere-mcp because we have a different architectural approach (LangChain4j embedded tools vs. external MCP server).

Rationale

Why Not Adopt Heng Sin's idempiere-mcp Directly

  1. Different Architectural Philosophy

    • idempiere-mcp runs INSIDE iDempiere as an OSGi bundle
    • idempiere-cli MCP runs OUTSIDE iDempiere as a standalone tool
    • These are fundamentally different deployment models
  2. Heavy Dependencies

    • Requires full iDempiere server running
    • Requires iDempiere-rest project (additional OSGi bundle)
    • Not suitable for developer workstations without iDempiere
  3. Transport Limitations

    • Only HTTP-based transports (SSE, Streamable HTTP)
    • No stdio support = Claude Desktop integration issues
    • stdio is the preferred transport for local AI tools
  4. Proof of Concept Status

    • Author notes "use with care"
    • Known issues with Claude Desktop compatibility
    • Not production-ready
  5. Coupling to iDempiere Server

    • Requires running iDempiere for any MCP operation
    • Cannot work in "offline" or "design-time" scenarios
    • Heavier footprint for AI-assisted development

What We Can Learn/Adopt from Heng Sin's Work

  1. REST API Data Access Pattern

    • Heng Sin's approach of using iDempiere REST API for data access is valid
    • We already support this via RestApiBackend in ADR-010
    • Could expose REST-based data tools for production scenarios
  2. Multi-Tenant Token Authentication

    • The Rest Auth Token pattern is useful for multi-tenant scenarios
    • Can be adopted when implementing SSE transport for remote access
  3. Exposed Capabilities Reference (from Heng Sin's demos)

    • Search operations (Business Partner queries)
    • Process execution
    • Record creation via Message windows
    • Server job management

Implementation Path

We continue with our LangChain4j-based AI integration (ADR-013):

┌─────────────────────────────────────────────────────────────────┐
│                    User (CLI or IDE)                             │
└──────────────────────────┬──────────────────────────────────────┘
                           │ idempiere-cli ask "..."
┌──────────────────────────▼──────────────────────────────────────┐
│              idempiere-cli (LangChain4j Integration)             │
│  ┌────────────────────────────────────────────────────────────┐ │
│  │ LangChain4j @Tool Annotations:                             │ │
│  │  - RegistryToolLogic (listTables, describeTable, etc.)     │ │
│  │  - QueryToolLogic (executeQuery, explainQuery)             │ │
│  │  - TableToolLogic (createTable, syncTable)                 │ │
│  │  - GeneratorToolLogic (generateModel, generatePlugin)      │ │
│  └────────────────────────────────────────────────────────────┘ │
│  ┌────────────────────────────────────────────────────────────┐ │
│  │ LLM Providers:                                              │ │
│  │  - Ollama (local, offline)                                 │ │
│  │  - Claude API (cloud)                                      │ │
│  │  - OpenAI API (cloud)                                      │ │
│  └────────────────────────────────────────────────────────────┘ │
│  ┌────────────────────────────────────────────────────────────┐ │
│  │ Data Access:                                                │ │
│  │  - Direct DB (JDBC) - default                              │ │
│  │  - REST API (OpenAPI client) - optional                    │ │
│  └────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘

Comparison Matrix

Feature idempiere-cli (LangChain4j) Heng Sin's idempiere-mcp Winner
Local LLM support Yes (Ollama) No idempiere-cli
No iDempiere needed Yes (DB only) No idempiere-cli
Offline capability Yes No idempiere-cli
Multi-tenant Via config Native Heng Sin's
OSGi integration None Full Heng Sin's
REST API data access Via OpenAPI client Native Heng Sin's
Development UX Lightweight Heavy idempiere-cli
Maturity Implemented PoC idempiere-cli

Consequences

Positive

Negative

Neutral

References

Path: /docs/developers/architecture/idempiere-hub/014-idempiere-mcp-evaluation