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
+25-17Lines changed: 25 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,14 +58,16 @@ The server:
58
58
59
59
Server configuration is managed via `config/config.json`, which defines:
60
60
61
-
-**`MCP_SERVER_BASE_URL`** — the base URL of the MCP server (Protected Resource Server in OAuth)
62
61
-**`SERVER_PORT`** — the port on which the MCP server listens for client connections (required only for the remote server)
63
62
-**`TLS_CERT_PATH`** — path to the file containing the certificate for TLS
64
63
-**`TLS_KEY_PATH`** — path to the file containing the private key for TLS
65
64
-**`TLS_KEY_PASSPHRASE`** — (optional) passphrase for the **`TLS_KEY_PATH`** file
66
65
-**`MCP_SERVER_CORS_ORIGINS`** — CORS origin allowed
66
+
-**`MCP_SERVER_DNS_REBINDING_PROTECTION_ALLOWED_HOSTS`** - list of allowed values for request header `Host` for DNS rebinding protection
67
+
-**`MCP_SERVER_DNS_REBINDING_PROTECTION_ALLOWED_ORIGINS`** - list of allowed values for request header `Origin` for DNS rebinding protection
67
68
-**`RATE_LIMIT_WINDOW_MS`** — time window in ms for the requests rate limiting feature
68
69
-**`RATE_LIMIT_MAX_REQUESTS`** — max number of requests allowed in the time window
70
+
-**`MCP_SERVER_BASE_URL`** — the base URL of the MCP server used to get OAuth metadata (Protected Resource Server in OAuth)
69
71
-**`AUTHZ_SERVER_BASE_URL`** — the base URL of the Authorization (Authz) server (OAuth)
70
72
-**`SCOPES_SUPPORTED`** — the scopes that the MCP client can request
71
73
-**`BACKEND_API_BASE`** — the base URL for backend REST API calls
@@ -83,11 +85,7 @@ If either **`MCP_SERVER_BASE_URL`** or **`AUTHZ_SERVER_BASE_URL`** are not set,
83
85
84
86
If authorization is enabled, but either **`MCP_SERVER_CLIENT_ID`** or **`MCP_SERVER_CLIENT_SECRET`** are not set, token exchange is disabled.
85
87
86
-
If token exchange is not enabled, the access token for the OFBiz API can be set **`BACKEND_AUTH_TOKEN`** and can be easily generated and set by running the script:
87
-
88
-
`update_token.sh <user> <password>`
89
-
90
-
This script retrieves a JWT for an OOTB OFBiz instance, as specified by **`BACKEND_API_AUTH`** (e.g., `https://demo-stable.ofbiz.apache.org/rest/auth/token`).
88
+
If token exchange is not enabled, the access token for the OFBiz API can be set in **`BACKEND_AUTH_TOKEN`**.
91
89
92
90
---
93
91
@@ -118,7 +116,16 @@ npm run build
118
116
119
117
## Test the MCP Server
120
118
121
-
Start the server:
119
+
With the configuration file provided (`./config/config.json`) the MCP server operates over a plain HTTP connection at `http://localhost:3000/mcp`, with authorization and token exchange disabled, and invokes the APIs of one of the Apache OFBiz demo instances.
120
+
121
+
The access token required for the OFBiz APIs can be generated and set in **`BACKEND_AUTH_TOKEN`** by running the utility script
122
+
123
+
`update_token.sh <user> <password>`
124
+
125
+
with, e.g., `admin` and `ofbiz`, as user and password, respectively.
126
+
This script retrieves a JWT for an OOTB OFBiz instance from `https://demo-stable.ofbiz.apache.org/rest/auth/token`, as specified in **`BACKEND_API_AUTH`**.
127
+
128
+
Start the server specifying the paths to the configuration and tools folders:
122
129
123
130
```sh
124
131
node ./build/server.js ./config ./build/tools
@@ -144,6 +151,7 @@ Add your MCP server configuration:
144
151
}
145
152
}
146
153
```
154
+
147
155
After updating the configuration file, launch Claude Desktop and try the following sample prompts:
148
156
149
157
-_"Can you provide some information about the product WG-1111?"_
@@ -153,9 +161,9 @@ After updating the configuration file, launch Claude Desktop and try the followi
153
161
-_"Can you compare two products?"_
154
162
(Claude will ask for two product IDs, invoke the tool twice, and then compare the results.)
155
163
156
-
## Inspect the MCP servers
164
+
## Inspect the MCP server
157
165
158
-
You can use Anthropic’s **Inspector** to easily test interactions with the local and remote MCP servers. You can do this also when a remote server is executed in your local host or private network, without requiring valid certificates or deploying the server on a publicly accessible host.
166
+
You can use Anthropic’s **Inspector** to easily test interactions with the MCP server.
159
167
160
168
Run (and install) the Inspector with:
161
169
@@ -167,36 +175,36 @@ This will open a browser window ready to test your MCP servers.
167
175
168
176
## Containerization with Docker
169
177
170
-
The following instructions describe how to containerize the application using Docker.
178
+
The following instructions describe how to containerize the MCP server using Docker and the Dockerfile provided.
171
179
172
-
First, build a Docker image:
180
+
First, build a Docker image named, e.g., `mcp4ofbiz-image`:
173
181
174
182
```sh
175
-
docker build -t mcp-server-for-apache-ofbiz.
183
+
docker build -t mcp4ofbiz-image.
176
184
```
177
185
178
186
If your target environment uses a different CPU architecture than your development machine (for example, if you're working on an Apple M1 but deploying to an amd64 platform), make sure to build the image for the correct target architecture:
0 commit comments