Skip to content
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,12 @@ Create or edit your OpenCode config file (`~/.config/opencode/opencode.json` or

For more information about configuring OpenCode as an MCP client, including the expected syntax and options, see the [OpenCode MCP servers documentation](https://opencode.ai/docs/mcp-servers/).

#### Option 8: Connect to the Remote MCP Server

@gagik gagik Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we mention this already? since it's not out yet it could be confusing to have this here.


To connect to the hosted MongoDB Atlas Remote MCP server, use the [`mongodb-atlas-mcp-remote`](packages/mongodb-atlas-mcp-remote/README.md) package with your Atlas service account credentials.
Comment thread
maastha marked this conversation as resolved.
Outdated

See the [package README](packages/mongodb-atlas-mcp-remote/README.md) for setup and client-specific configuration examples.

## 🛠️ Supported Tools

### Tool List
Expand Down
70 changes: 65 additions & 5 deletions packages/mongodb-atlas-mcp-remote/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,81 @@
# mongodb-atlas-mcp-remote

> [!NOTE]
> This package is work in progress.
`mongodb-atlas-mcp-remote` lets your MCP client connect to the **MongoDB Atlas Remote MCP server** using your Atlas service account credentials.

Use this for MCP clients that don't yet natively support service-account (OAuth client-credentials) authentication.

## Prerequisites
Comment thread
maastha marked this conversation as resolved.
Outdated

- Node.js v20.19.0 or newer.
Comment thread
maastha marked this conversation as resolved.
Outdated
- An Atlas service account **Client ID** and **Client Secret**. See [Atlas API Access](../../README.md#atlas-api-access) in the main README for how to create a service account and assign the minimum required permissions.
Comment thread
maastha marked this conversation as resolved.
Outdated

## Configuration

The wrapper is configured with two environment variables:

| Variable | Description |
| --------------------------- | ----------------------------------------- |
| `MDB_MCP_API_CLIENT_ID` | Your Atlas service account Client ID. |
| `MDB_MCP_API_CLIENT_SECRET` | Your Atlas service account Client Secret. |

> **🔒 Tip:** Provide credentials via environment variables rather than inline command-line arguments, since command-line arguments can be visible in process lists and logs.
Comment thread
maastha marked this conversation as resolved.
Outdated

## Usage

Add the server to your MCP client's configuration. The file location and format vary by client — examples for common clients are below. In each case, replace the placeholder credentials with your own.

### Claude Code

Add to `.mcp.json`:

```json
{
"mcpServers": {
"MongoDB": {
"mongodb": {
"command": "npx",
"args": ["-y", "mongodb-atlas-mcp-remote@latest"],
Comment thread
maastha marked this conversation as resolved.
"env": {
"MDB_MCP_API_CLIENT_ID": "atlas-mcp-sa-client-id",
"MDB_MCP_API_CLIENT_SECRET": "atlas-mcp-sa-client-secret"
"MDB_MCP_API_CLIENT_ID": "your-atlas-service-account-client-id",
"MDB_MCP_API_CLIENT_SECRET": "your-atlas-service-account-client-secret"
}
}
}
}
```

### Cursor

Add to `.cursor/mcp.json`:

```json
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": ["-y", "mongodb-atlas-mcp-remote@latest"],
"env": {
Comment thread
Copilot marked this conversation as resolved.
"MDB_MCP_API_CLIENT_ID": "your-atlas-service-account-client-id",
"MDB_MCP_API_CLIENT_SECRET": "your-atlas-service-account-client-secret"
}
}
}
}
```

### Codex

Add to `~/.codex/config.toml`:

```toml
[mcp_servers.mongodb]
command = "npx"
args = ["-y", "mongodb-atlas-mcp-remote@latest"]

[mcp_servers.mongodb.env]
MDB_MCP_API_CLIENT_ID = "your-atlas-service-account-client-id"
Comment thread
maastha marked this conversation as resolved.
Outdated
MDB_MCP_API_CLIENT_SECRET = "your-atlas-service-account-client-secret"
```

## Contributing

This package is part of the [`mongodb-mcp-server`](https://github.com/mongodb-js/mongodb-mcp-server) monorepo. See the [Contributing Guide](../../CONTRIBUTING.md) for development setup.
Comment thread
maastha marked this conversation as resolved.
Loading