Skip to content

Commit 798d78a

Browse files
committed
Remove local version of the MCP server
1 parent 58cf632 commit 798d78a

File tree

3 files changed

+18
-88
lines changed

3 files changed

+18
-88
lines changed

README.md

Lines changed: 17 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This project provides a prototype implementation of a Model Context Protocol (MC
77

88
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).
99

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.
1111

1212
The project leverages the **Anthropic TypeScript SDK**, and requires:
1313

@@ -26,27 +26,23 @@ Apache OFBiz® is a trademark of the [Apache Software Foundation](https://www.ap
2626
2. [Configuration](#configuration)
2727
3. [Project Structure](#project-structure)
2828
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)
3332

3433
---
3534

3635
## Features
3736

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.
3938

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.
4440

4541
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.
4642

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

49-
The remote server:
45+
The server:
5046

5147
- is compliant with the latest MCP specifications (2025-06-18)
5248
- 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/
10298
├── config/
10399
│ └── config.json # Server configuration (backend API base, auth token, etc.)
104100
├── 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)
107102
│ ├── toolLoader.ts # Loader of tool definitions from "tools/"
108103
│ └── tools/
109104
│ └── findProductById.ts # Example tool calling an Apache OFBiz REST endpoint
@@ -121,39 +116,7 @@ npm install
121116
npm run build
122117
```
123118

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:
129-
130-
```sh
131-
~/Library/Application\ Support/Claude/claude_desktop_config.json
132-
```
133-
134-
Add your local MCP server configuration:
135-
136-
```json
137-
{
138-
"mcpServers": {
139-
"Apache OFBiz": {
140-
"command": "node",
141-
"args": ["PATH_TO/mcp-server-for-apache-ofbiz/build/server-local.js"]
142-
}
143-
}
144-
}
145-
```
146-
147-
After updating the configuration file, launch Claude Desktop and try the following sample prompts:
148-
149-
- _"Can you provide some information about the product WG-1111?"_
150-
- _"Create a SEO friendly description for the product with ID GZ-1000"_
151-
- _"Can you provide some information about a product?"_
152-
(Claude will ask for a product ID before invoking the tool.)
153-
- _"Can you compare two products?"_
154-
(Claude will ask for two product IDs, invoke the tool twice, and then compare the results.)
155-
156-
## Test the Remote MCP Server
119+
## Test the MCP Server
157120

158121
Start the server:
159122

@@ -181,6 +144,14 @@ Add your MCP server configuration:
181144
}
182145
}
183146
```
147+
After updating the configuration file, launch Claude Desktop and try the following sample prompts:
148+
149+
- _"Can you provide some information about the product WG-1111?"_
150+
- _"Create a SEO friendly description for the product with ID GZ-1000"_
151+
- _"Can you provide some information about a product?"_
152+
(Claude will ask for a product ID before invoking the tool.)
153+
- _"Can you compare two products?"_
154+
(Claude will ask for two product IDs, invoke the tool twice, and then compare the results.)
184155

185156
## Inspect the MCP servers
186157

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"test": "echo \"Error: no test specified\" && exit 1"
5050
},
5151
"bin": {
52-
"mcp_server_for_apache_ofbiz-local": "./build/server-local.js",
53-
"mcp_server_for_apache_ofbiz-remote": "./build/server-remote.js"
52+
"mcp_server_for_apache_ofbiz": "./build/server-remote.js"
5453
}
5554
}

src/server-local.ts

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)