Skip to content

v1.0.0

Choose a tag to compare

@jacopoc jacopoc released this 17 Nov 09:48
· 48 commits to main since this release

Overview

This project provides a prototype implementation of a Model Context Protocol (MCP) server for Apache OFBiz® that:

  • receives requests from an MCP client (usually hosted in a generative AI application such as Claude Desktop) and forwards those requests to a remote backend via RESTful API endpoints,
  • exposes a template tool that invokes the findProductById OFBiz endpoint.
    This project can be used as a platform to implement your own tools and enable generative AI applications to interact with any backend system that exposes REST API endpoints, such as Apache OFBiz or Moqui.

The server is implemented in two versions, one that runs as a local MCP server (stdio transport) and one that runs as a remote MCP server (Streamable HTTP transport).

The project includes two alternative MCP servers:

  • Local MCP server (src/server-local.ts) — communicates with the MCP client via stdio transport.
  • Remote MCP server (src/server-remote.ts) — communicates with the MCP client via MCP Streamable HTTP transport.
    The servers dynamically discover MCP tools contained in the tools directory.

Each tool is defined and implemented in its own file. For example, the sample tool tools/findProductById.ts invokes an endpoint in Apache OFBiz to retrieve product information for a given product ID. This works with an out-of-the-box (OOTB) OFBiz instance with the rest-api plugin installed.

New tools can be published by simply including their definition files in the tools folder.

The remote server:

  • is compliant with the latest MCP specifications
  • supports authorization according to the MCP recommendations (OAuth Authorization Code Flow with support for Metadata discovery, Dynamic Client Registration, etc...)
  • supports the token exchange OAuth flow in order to obtain a valid token for the backend system
  • performs token validation with configurable scopes and audience verification
  • provides rate limiting features to protect the MCP server and the backend server from denial of service attacks
    allows CORS restrictions

What's Changed

  • Folder refactoring and minor improvements to the readme file in #1
  • Correct local server path in the sample configuration file for Claude in #2
  • Add Docker configuration files including Dockerfile, .dockerignore, and compose.yaml in #3
  • Fix docker warnings in #4
  • Refactor token management in #5
  • Refactor update_token.sh to improve the token update logic for compatibility with container bind mounts in #6
  • Initial OAuth implementation in #14
  • Add settings for OAuth scopes in config.json in #15
  • Audience validation in #17
  • Merge verifyToken into validateAccessToken in #18
  • Token exchange implementation in #20
  • Improve configuration options in #22
  • Rename local server file and update README in #24
  • Improve readme.md to reflect the latest enhancements in #26

Full Changelog: https://github.com/jacopoc/mcp-server-for-apache-ofbiz/commits/v1.0.0