Skip to content

Commit 94432f8

Browse files
committed
rename to work directly with npx
1 parent 517124c commit 94432f8

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

README.md

+10-14
Original file line numberDiff line numberDiff line change
@@ -2,40 +2,36 @@
22

33
As long as Claude Desktop does not support connecting to remote servers, you can use this script to run a bridge from stdio to HTTP SSE (Server-Sent Events) endpoint.
44

5-
## Install claude_gateway
6-
7-
You can install the package globally or use it directly with npx:
5+
## Install mcp-server-and-gw
86

97
```shell
10-
# install
8+
# 1. install
119
npm install -g mcp-server-and-gw
12-
13-
# Run with npx
14-
npx claude_gateway http://localhost:8808/
15-
16-
# Using environment variables
17-
MCP_HOST=localhost MCP_PORT=8808 npx claude_gateway
10+
# 2. Or run directly with npx
11+
npx mcp-server-and-gw http://localhost:8808/
12+
# ...you can use environment variables too
13+
MCP_HOST=localhost MCP_PORT=8808 npx mcp-server-and-gw
1814
```
1915

2016
## Add Configuration into Claude
2117

2218
> The bridge script is node javasscript, but your server code can be whatever you use.
2319
24-
A [Model Context Protocol](https://www.anthropic.com/news/model-context-protocol) gateway [src/claude_gateway.ts](src/claude_gateway.ts) from [stdio](https://spec.modelcontextprotocol.io/specification/basic/transports/#stdio) to [HTTP SSE](https://spec.modelcontextprotocol.io/specification/basic/transports/#http-with-sse) transport.
20+
A [Model Context Protocol](https://www.anthropic.com/news/model-context-protocol) gateway [src/mcp-server-and-gw.ts](src/mcp-server-and-gw.ts) from [stdio](https://spec.modelcontextprotocol.io/specification/basic/transports/#stdio) to [HTTP SSE](https://spec.modelcontextprotocol.io/specification/basic/transports/#http-with-sse) transport.
2521

2622
```shell
2723
## 1. Build
2824
yarn install
2925
yarn build
3026

3127
## 2. Copy the code or update the claude_desktop_config.json
32-
## NOTE: Ensure that npx is in the PATH, os use full path.
28+
## NOTE: Ensure that npx is in the PATH, or use full path like /opt/homebrew/bin/npx
3329
echo '{
3430
"mcpServers": {
3531
"Claude Gateway Example": {
36-
"command": "/opt/homebrew/bin/npx",
32+
"command": "npx",
3733
"args": [
38-
"claude_gateway", "http://localhost:8808/"
34+
"mcp-server-and-gw", "http://localhost:8808/"
3935
]
4036
}
4137
}

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "An MCP stdio to http sse gateway with example server and MCP client",
55
"type": "module",
66
"bin": {
7-
"claude_gateway": "./build/claude_gateway.js"
7+
"mcp-server-and-gw": "./build/mcp-server-and-gw.js"
88
},
99
"files": [
1010
"build"
@@ -13,7 +13,7 @@
1313
"build": "rm -rf build && tsc",
1414
"prepare": "yarn run build",
1515
"watch": "tsc --watch",
16-
"inspector": "npx @modelcontextprotocol/inspector node build/claude_gateway.js",
16+
"inspector": "npx @modelcontextprotocol/inspector node build/mcp-server-and-gw.js",
1717
"release:patch": "npm version patch && git push && git push --tags",
1818
"release:minor": "npm version minor && git push && git push --tags",
1919
"release:major": "npm version major && git push && git push --tags"
File renamed without changes.

0 commit comments

Comments
 (0)