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.
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 |