Skip to content

Commit b0aeedc

Browse files
committed
feat: rename /stream to /mcp to align with common conventions
BREAKING CHANGE: /stream renamed to /mcp
1 parent 2c201eb commit b0aeedc

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ npm install mcp-proxy
2525
npx mcp-proxy --port 8080 --shell tsx server.js
2626
```
2727

28-
This starts a server and `stdio` server (`tsx server.js`). The server listens on port 8080 and `/stream` (streamable HTTP) and `/sse` (SSE) endpoints, and forwards messages to the `stdio` server.
28+
This starts a server and `stdio` server (`tsx server.js`). The server listens on port 8080 and `/mcp` (streamable HTTP) and `/sse` (SSE) endpoints, and forwards messages to the `stdio` server.
2929

3030
options:
3131

3232
- `--server`: Set to `sse` or `stream` to only enable the respective transport (default: both)
33-
- `--endpoint`: If `server` is set to `sse` or `stream`, this option sets the endpoint path (default: `/sse` or `/stream`)
33+
- `--endpoint`: If `server` is set to `sse` or `stream`, this option sets the endpoint path (default: `/sse` or `/mcp`)
3434
- `--sseEndpoint`: Set the SSE endpoint path (default: `/sse`). Overrides `--endpoint` if `server` is set to `sse`.
35-
- `--streamEndpoint`: Set the streamable HTTP endpoint path (default: `/stream`). Overrides `--endpoint` if `server` is set to `stream`.
35+
- `--streamEndpoint`: Set the streamable HTTP endpoint path (default: `/mcp`). Overrides `--endpoint` if `server` is set to `stream`.
3636
- `--port`: Specify the port to listen on (default: 8080)
3737
- `--debug`: Enable debug logging
3838
- `--shell`: Spawn the server via the user's shell

src/bin/mcp-proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const argv = await yargs(hideBin(process.argv))
6565
type: "string",
6666
},
6767
streamEndpoint: {
68-
default: "/stream",
68+
default: "/mcp",
6969
describe: "The stream endpoint to listen on",
7070
type: "string",
7171
},

src/startHTTPServer.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ it("proxies messages between HTTP stream and stdio servers", async () => {
7878
);
7979

8080
const transport = new StreamableHTTPClientTransport(
81-
new URL(`http://localhost:${port}/stream`),
81+
new URL(`http://localhost:${port}/mcp`),
8282
);
8383

8484
await streamClient.connect(transport);

src/startHTTPServer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ export const startHTTPServer = async <T extends ServerLike>({
431431
await handleStreamRequest({
432432
activeTransports: activeStreamTransports,
433433
createServer,
434-
endpoint: streamEndpoint ?? "/stream",
434+
endpoint: streamEndpoint ?? "/mcp",
435435
eventStore,
436436
onClose,
437437
onConnect,

0 commit comments

Comments
 (0)