JM

jacopoc/mcp-server-for-apache-ofbiz

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

8 stars 9 forks Качество 76 Тренд 24Apache-2.0

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

Обзор

This project provides an implementation of a Model Context Protocol (MCP) server that runs custom tools to invoke remote services through API endpoints, based on requests from an MCP client (usually hosted in a generative AI application such as Claude Desktop). The project is implemented with the , and requires as runtime environment. By leveraging the sample configuration and tool files contained in the examples folder, the MCP server can be easly configured, e.g., to point to specific backend systems and to use OAuth2.0 authorization flows, and new tools can be developed to address specific use cases. In short, 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 API endpoints, such as or . This software is licensed under the Apache License, Version 2.0. Apache OFBiz® is a trademark of the Apache Software Foundation.

README

Показан фрагмент оригинального README. Открыть оригинал.

MCP Server for Apache OFBiz®

This project provides an implementation of a Model Context Protocol (MCP) server that runs custom tools to invoke remote services through API endpoints, based on requests from an MCP client (usually hosted in a generative AI application such as Claude Desktop).

The project is implemented with the Anthropic TypeScript SDK, and requires Node.js as runtime environment.

By leveraging the sample configuration and tool files contained in the examples folder, the MCP server can be easly configured, e.g., to point to specific backend systems and to use OAuth2.0 authorization flows, and new tools can be developed to address specific use cases.

In short, 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 API endpoints, such as Apache OFBiz® or Moqui.

This software is licensed under the Apache License, Version 2.0.

Apache OFBiz® is a trademark of the Apache Software Foundation.


Table of Contents

  1. Quick-start guide
  2. Features
  3. Configuration
  4. Project Structure
  5. Build the Project
  6. Test the Remote MCP Server
  7. Inspect the MCP server
  8. Containerization with Docker

Quick-start guide

> git clone https://github.com/jacopoc/mcp-server-for-apache-ofbiz.git mcp-server
> cd mcp-server
mcp-server> npm install
mcp-server> cd examples/tools
mcp-server/examples/tools> npm install
mcp-server/examples/tools> npm run build
mcp-server/examples/tools> cd ..
mcp-server/examples> ./get_api_access_token.sh admin ofbiz ./config/config.json
mcp-server/examples> cd ..
mcp-server> node build/server.js ./examples/config ./examples/tools

To test the MCP server, start the MCP Inspector from another shell:

> npx @modelcontextprotocol/inspector

This command will open a browser window for the Inspector application. Click Add Servers and select Add manually. Choose a Server ID, select streamable-http as the transport, and specify the MCP server URL as http://localhost:3000/mcp. Click Add, then connect to the server using the toggle in the top-right corner.

Once connected, you can execute the findProductById tool, which fetches data from one of the public demo instances of Apache OFBiz. Select the Tools tab at the top of the page, select findProductById, and enter a valid product ID, such as GZ-1000.

Features

The MCP server communicates with the MCP client via MCP Streamable HTTP transport.

The server dynamically discovers custom tools contained in a directory, whose path is specified as a command-line argument when the server is lauched.

Открыть полный README на GitHub

Установка

npx -y mcp-remote http://localhost:3000/mcp --allow-http
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "Apache OFBiz": { "command": "npx", "args": ["-y", "mcp-remote", "http://localhost:3000/mcp", "--allow-http"] } } }