Get the FREE Ultimate OpenClaw Setup Guide →

mcp -for-apache-ofbiz

A Model Context Protocol (MCP) server platform for Apache OFBiz

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio jacopoc-mcp-server-for-apache-ofbiz node build/server.js ./examples/config ./examples/tools

How to use

This MCP server implements a Model Context Protocol (MCP) server that runs custom tools to invoke remote services via API endpoints, enabling generative AI applications to interact with backend systems such as Apache OFBiz. It is built with the Anthropic TypeScript SDK and runs on Node.js. The server dynamically discovers tools located under the configured tools directory and exposes them to MCP clients through the MCP Streamable HTTP transport. To try it out, clone the repository, install dependencies, and start the server using the included example configuration and tools. You can also launch the MCP Inspector in a separate shell to connect to the running server and execute the sample tools that fetch data from OFBiz endpoints.

The repository includes an examples/tools directory with a sample tool (for example, findProductById.ts) that calls an OFBiz REST API to retrieve product information for a given product ID. New tools can be added by implementing them in their own files and pointing the server to their location via the configuration. The server supports OAuth2/OIDC flows, token exchange, TLS, rate limiting, and CORS/origin restrictions to secure access in production deployments.

How to install

Prerequisites:

  • Node.js (and npm or pnpm) installed on your system
  • Git to clone the repository

Step-by-step installation:

  1. Clone the MCP server repository git clone https://github.com/jacopoc/mcp-server-for-apache-ofbiz.git mcp-server cd mcp-server

  2. Install server dependencies npm install

  3. Install and build the example tools (from the repository root) cd examples/tools npm install npm run build cd ../..

  4. Start the MCP server using the provided example config and tools node build/server.js ./examples/config ./examples/tools

  5. (Optional) Start the MCP Inspector in a separate shell for testing npx @modelcontextprotocol/inspector // In Inspector, set Transport Type to Streamable HTTP and URL to http://localhost:3000/mcp

Prerequisites recap: ensure you have network access to any backend APIs you plan to call (such as OFBiz), and configure TLS, OAuth, and backend endpoints in the examples/config as needed.

Additional notes

Tips and considerations:

  • The server uses the MCP Streamable HTTP transport to communicate with clients. Ensure your client is configured to use the same transport.
  • Authorization and token exchange are configurable via environment and config files. If MCP_SERVER_BASE_URL or AUTHZ_SERVER_BASE_URL are not set, authorization is disabled (server is public); if enabled, ensure MCP_SERVER_CLIENT_ID and MCP_SERVER_CLIENT_SECRET are provided when token exchange is required.
  • TLS is optional. If you configure TLS_CERT_PATH and TLS_KEY_PATH, the server will run over HTTPS; otherwise it uses HTTP.
  • You can restrict CORS origins and DNS rebinding protections using the environment variables described in the configuration documentation.
  • The server discovers tools dynamically from the directory specified at launch; to add new capabilities, implement a new tool file under the tools directory and reference it via your config.
  • If you encounter token or API authorization issues, you may need to update BACKEND_API_BASE, BACKEND_API_AUDIENCE, BACKEND_API_RESOURCE, and related tokens as shown in the configuration guide.

Related MCP Servers

Sponsor this space

Reach thousands of developers