connect
Establish a new connection to a MongoDB instance and receive a connectionId for use with other MongoDB tools. Each call creates a separate, independent connection.
Instructions
Connect to a MongoDB instance and get back a connectionId to pass to the other MongoDB tools. Each call establishes a new, independent connection — multiple connections can be active at the same time. A connection with the id "preconfigured" already exists for the connection string the server was configured with — there is no need to call this tool to use it.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"connectionString": "<connectionString>"
},
"name": "connect"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectionName | No | Optional short label for the connection (stored slugified with a short suffix, e.g. "staging" becomes staging-<suffix>). Shown in connection listings; helpful for telling multiple connections apart. | |
| connectionString | Yes | MongoDB connection string (in the mongodb:// or mongodb+srv:// format) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectionId | Yes |