You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-46Lines changed: 17 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This project provides a prototype implementation of a Model Context Protocol (MC
7
7
8
8
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**](https://ofbiz.apache.org) or [**Moqui**](https://www.moqui.org).
9
9
10
-
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).
10
+
The server implements an MCP server with Streamable HTTP transport.
11
11
12
12
The project leverages the **Anthropic TypeScript SDK**, and requires:
13
13
@@ -26,27 +26,23 @@ Apache OFBiz® is a trademark of the [Apache Software Foundation](https://www.ap
26
26
2.[Configuration](#configuration)
27
27
3.[Project Structure](#project-structure)
28
28
4.[Build the Project](#build-the-project)
29
-
5.[Test the Local MCP Server](#test-the-local-mcp-server)
30
-
6.[Test the Remote MCP Server](#test-the-remote-mcp-server)
31
-
7.[Inspect the MCP servers](#inspect-the-mcp-servers)
32
-
8.[Containerization with Docker](#containerization-with-docker)
29
+
5.[Test the Remote MCP Server](#test-the-mcp-server)
30
+
6.[Inspect the MCP servers](#inspect-the-mcp-servers)
31
+
7.[Containerization with Docker](#containerization-with-docker)
33
32
34
33
---
35
34
36
35
## Features
37
36
38
-
The project includes two alternative MCP servers:
37
+
The project includes an MCP server (`src/server-remote.ts`) that communicates with the MCP client via MCP Streamable HTTP transport.
39
38
40
-
-**Local MCP server** (`src/server-local.ts`) — communicates with the MCP client via stdio transport.
41
-
-**Remote MCP server** (`src/server-remote.ts`) — communicates with the MCP client via MCP Streamable HTTP transport.
42
-
43
-
The servers dynamically discover MCP tools contained in the `tools` directory.
39
+
The server dynamically discovers MCP tools contained in the `tools` directory, whose path is specified as a command-line argument when the server is lauched.
44
40
45
41
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.
46
42
47
43
New tools can be published by simply including their definition files in the `tools` folder.
48
44
49
-
The remote server:
45
+
The server:
50
46
51
47
- is compliant with the latest MCP specifications (2025-06-18)
52
48
- supports authorization according to the MCP recommendations (OAuth Authorization Code Flow with support for Metadata discovery, Dynamic Client Registration, etc...)
@@ -102,8 +98,7 @@ mcp-server-for-apache-ofbiz/
102
98
├── config/
103
99
│ └── config.json # Server configuration (backend API base, auth token, etc.)
104
100
├── src/
105
-
│ ├── server-local.ts # Local MCP server (stdio transport)
106
-
│ ├── server-remote.ts # Remote MCP server (Streamable HTTP transport)
101
+
│ ├── server-remote.ts # MCP server (Streamable HTTP transport)
107
102
│ ├── toolLoader.ts # Loader of tool definitions from "tools/"
108
103
│ └── tools/
109
104
│ └── findProductById.ts # Example tool calling an Apache OFBiz REST endpoint
@@ -121,39 +116,7 @@ npm install
121
116
npm run build
122
117
```
123
118
124
-
## Test the Local MCP Server
125
-
126
-
You can test the local MCP server with the free version of **Claude Desktop**.
127
-
128
-
Edit or create the Claude Desktop configuration file:
0 commit comments