Skip to content

Commit 3a20ae0

Browse files
committed
docs(readme): add Quick Start instructions for HTTP/SSE transport options
Document usage of --transportType and --port for running the server with HTTP or SSE endpoints Add example commands and clarify default port behavior Help users expose the MCP server for network-based client integration
1 parent 01b993a commit 3a20ae0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,28 @@ You can use environment variables in the config file or set them and run the ser
111111
- Connection String via environment variables in the MCP file [example](#connection-string-with-environment-variables)
112112
- Atlas API credentials via environment variables in the MCP file [example](#atlas-api-credentials-with-environment-variables)
113113

114+
#### Option 5: HTTP/SSE Transport (Custom Port)
115+
116+
You can run the MCP server using HTTP or SSE transport by specifying the `--transportType` and (optionally) `--port` arguments. The default port is `5700` if not specified.
117+
118+
**Example (HTTP):**
119+
120+
```shell
121+
npx -y mongodb-mcp-server --transportType=http --port=3000 --connectionString="mongodb://localhost:27017"
122+
```
123+
124+
**Example (SSE):**
125+
126+
```shell
127+
npx -y mongodb-mcp-server --transportType=sse --port=3000 --connectionString="mongodb://localhost:27017"
128+
```
129+
130+
- `--transportType` can be `http` or `sse`
131+
- `--port` sets the port (default: 5700)
132+
- All other configuration options (like `--connectionString`, `--apiClientId`, etc.) are supported
133+
134+
This allows you to expose the MCP server over HTTP/SSE for integration with clients that require a network endpoint.
135+
114136
## 🛠️ Supported Tools
115137

116138
### Tool List

0 commit comments

Comments
 (0)