Skip to content

Commit 1a3e488

Browse files
committed
docs: add gateways and proxies section to README
1 parent 7572ec5 commit 1a3e488

File tree

1 file changed

+41
-8
lines changed

1 file changed

+41
-8
lines changed

README.md

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ A Model Context Protocol server for interacting with MongoDB Databases and Mongo
2222
- [Environment Variables](#environment-variables)
2323
- [Command-Line Arguments](#command-line-arguments)
2424
- [MCP Client Configuration](#mcp-configuration-file-examples)
25-
- [Proxy Support](#proxy-support)
25+
- [Gateways and Proxies](#gateways-and-proxies)
2626
- [🤝 Contributing](#contributing)
2727

2828
<a name="getting-started"></a>
@@ -262,6 +262,46 @@ npx -y mongodb-mcp-server@latest --transport http --httpHost=0.0.0.0 --httpPort=
262262

263263
> **Note:** The default transport is `stdio`, which is suitable for integration with most MCP clients. Use `http` transport if you need to interact with the server over HTTP.
264264
265+
### Gateways and Proxies
266+
267+
When deploying the MongoDB MCP as a Remote MCP Server to production, you should place it behind an authentication gateway or reverse proxy.
268+
269+
#### Pomerium (Open Core Identity-Aware Proxy)
270+
271+
[Pomerium](https://www.pomerium.com/) is an identity-aware access proxy designed for zero-trust access that [supports MCP](https://www.pomerium.com/docs/capabilities/mcp) out of the box.
272+
273+
**Key Benefits:**
274+
- Identity verification on every request
275+
- Fine-grained access control
276+
- Enterprise identity provider support (Microsoft Entra ID, Google Identity, Okta, Auth0, GitHub, Keycloak, etc.)
277+
- Built-in audit logging and monitoring
278+
279+
For complete setup instructions and configuration examples, see the [Pomerium MCP documentation](https://www.pomerium.com/docs/capabilities/mcp).
280+
281+
#### Add Your Gateway/Proxy Solution
282+
283+
Help us expand this section. We welcome community contributions for additional gateway and proxy solutions. If you've successfully deployed the MongoDB MCP Server with authentication gateways or reverse proxies, please share your suggestions by [opening an issue](https://github.com/mongodb-js/mongodb-mcp-server/issues/new).
284+
285+
#### Outbound Proxy Support
286+
287+
The MCP Server will detect typical PROXY environment variables and use them for connecting to the Atlas API, your MongoDB Cluster, or any other external calls to third-party services like OIDC Providers. The behavior is the same as what `mongosh` does, so the same settings will work in the MCP Server.
288+
289+
This is useful when the MCP Server needs to connect through corporate firewalls or network restrictions to reach MongoDB Atlas or other external services.
290+
291+
**Supported environment variables:**
292+
- `HTTP_PROXY` / `http_proxy` - HTTP proxy for non-SSL connections
293+
- `HTTPS_PROXY` / `https_proxy` - HTTPS proxy for SSL connections
294+
- `NO_PROXY` / `no_proxy` - Comma-separated list of hosts to bypass proxy
295+
296+
**Example:**
297+
```bash
298+
export HTTPS_PROXY=http://corporate-proxy.company.com:8080
299+
export NO_PROXY=localhost,127.0.0.1,*.company.com
300+
npx -y mongodb-mcp-server@latest --transport http
301+
```
302+
303+
> **Note:** This proxy support is for **outbound connections** from the MCP server to MongoDB/Atlas. For **inbound authentication** (securing access to your MCP server), use the gateway examples above.
304+
265305
## 🛠️ Supported Tools
266306

267307
### Tool List
@@ -575,13 +615,6 @@ npx -y mongodb-mcp-server@latest --apiClientId="your-atlas-service-accounts-clie
575615
}
576616
```
577617

578-
### Proxy Support
579-
580-
The MCP Server will detect typical PROXY environment variables and use them for
581-
connecting to the Atlas API, your MongoDB Cluster, or any other external calls
582-
to third-party services like OID Providers. The behaviour is the same as what
583-
`mongosh` does, so the same settings will work in the MCP Server.
584-
585618
## 🤝Contributing
586619

587620
Interested in contributing? Great! Please check our [Contributing Guide](CONTRIBUTING.md) for guidelines on code contributions, standards, adding new tools, and troubleshooting information.

0 commit comments

Comments
 (0)