You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(elicitation): add option to require user confirmation for tool calls with elicitation MCP-185 (#551)
Adds an option to require confirmation for certain tools using the new elicitation API. This is not supported by most popular clients yet, only notably VSCode.
|`apiClientId`|`MDB_MCP_API_CLIENT_ID`| <notset> | Atlas API client ID for authentication. Required for running Atlas tools. |
344
-
|`apiClientSecret`|`MDB_MCP_API_CLIENT_SECRET`| <notset> | Atlas API client secret for authentication. Required for running Atlas tools. |
345
-
|`connectionString`|`MDB_MCP_CONNECTION_STRING`| <notset> | MongoDB connection string for direct database connections. Optional, if not set, you'll need to call the `connect` tool before interacting with MongoDB data. |
346
-
|`loggers`|`MDB_MCP_LOGGERS`| disk,mcp | Comma separated values, possible values are `mcp`, `disk` and `stderr`. See [Logger Options](#logger-options) for details. |
347
-
|`logPath`|`MDB_MCP_LOG_PATH`| see note\*| Folder to store logs. |
348
-
|`disabledTools`|`MDB_MCP_DISABLED_TOOLS`| <notset> | An array of tool names, operation types, and/or categories of tools that will be disabled. |
349
-
|`readOnly`|`MDB_MCP_READ_ONLY`| false | When set to true, only allows read, connect, and metadata operation types, disabling create/update/delete operations. |
350
-
|`indexCheck`|`MDB_MCP_INDEX_CHECK`| false | When set to true, enforces that query operations must use an index, rejecting queries that perform a collection scan. |
351
-
|`telemetry`|`MDB_MCP_TELEMETRY`| enabled | When set to disabled, disables telemetry collection. |
352
-
|`transport`|`MDB_MCP_TRANSPORT`| stdio | Either 'stdio' or 'http'. |
353
-
|`httpPort`|`MDB_MCP_HTTP_PORT`| 3000 | Port number. |
354
-
|`httpHost`|`MDB_MCP_HTTP_HOST`| 127.0.0.1 | Host to bind the http server. |
355
-
|`idleTimeoutMs`|`MDB_MCP_IDLE_TIMEOUT_MS`| 600000 | Idle timeout for a client to disconnect (only applies to http transport). |
356
-
|`notificationTimeoutMs`|`MDB_MCP_NOTIFICATION_TIMEOUT_MS`| 540000 | Notification timeout for a client to be aware of diconnect (only applies to http transport). |
357
-
|`exportsPath`|`MDB_MCP_EXPORTS_PATH`| see note\*| Folder to store exported data files. |
358
-
|`exportTimeoutMs`|`MDB_MCP_EXPORT_TIMEOUT_MS`| 300000 | Time in milliseconds after which an export is considered expired and eligible for cleanup. |
359
-
|`exportCleanupIntervalMs`|`MDB_MCP_EXPORT_CLEANUP_INTERVAL_MS`| 120000 | Time in milliseconds between export cleanup cycles that remove expired export files. |
360
-
|`atlasTemporaryDatabaseUserLifetimeMs`|`MDB_MCP_ATLAS_TEMPORARY_DATABASE_USER_LIFETIME_MS`| 14400000 | Time in milliseconds that temporary database users created when connecting to MongoDB Atlas clusters will remain active before being automatically deleted. |
|`apiClientId`|`MDB_MCP_API_CLIENT_ID`| <notset> | Atlas API client ID for authentication. Required for running Atlas tools. |
344
+
|`apiClientSecret`|`MDB_MCP_API_CLIENT_SECRET`| <notset> | Atlas API client secret for authentication. Required for running Atlas tools. |
345
+
|`connectionString`|`MDB_MCP_CONNECTION_STRING`| <notset> | MongoDB connection string for direct database connections. Optional, if not set, you'll need to call the `connect` tool before interacting with MongoDB data. |
346
+
|`loggers`|`MDB_MCP_LOGGERS`| disk,mcp | Comma separated values, possible values are `mcp`, `disk` and `stderr`. See [Logger Options](#logger-options) for details. |
347
+
|`logPath`|`MDB_MCP_LOG_PATH`| see note\*| Folder to store logs. |
348
+
|`disabledTools`|`MDB_MCP_DISABLED_TOOLS`| <notset> | An array of tool names, operation types, and/or categories of tools that will be disabled. |
349
+
|`confirmationRequiredTools`|`MDB_MCP_CONFIRMATION_REQUIRED_TOOLS`| create-access-list,create-db-user,drop-database,drop-collection,delete-many | An array of tool names that require user confirmation before execution. **Requires the client to support [elicitation](https://modelcontextprotocol.io/specification/draft/client/elicitation)**. |
350
+
|`readOnly`|`MDB_MCP_READ_ONLY`| false | When set to true, only allows read, connect, and metadata operation types, disabling create/update/delete operations. |
351
+
|`indexCheck`|`MDB_MCP_INDEX_CHECK`| false | When set to true, enforces that query operations must use an index, rejecting queries that perform a collection scan. |
352
+
|`telemetry`|`MDB_MCP_TELEMETRY`| enabled | When set to disabled, disables telemetry collection. |
353
+
|`transport`|`MDB_MCP_TRANSPORT`| stdio | Either 'stdio' or 'http'. |
354
+
|`httpPort`|`MDB_MCP_HTTP_PORT`| 3000 | Port number. |
355
+
|`httpHost`|`MDB_MCP_HTTP_HOST`| 127.0.0.1 | Host to bind the http server. |
356
+
|`idleTimeoutMs`|`MDB_MCP_IDLE_TIMEOUT_MS`| 600000 | Idle timeout for a client to disconnect (only applies to http transport). |
357
+
|`notificationTimeoutMs`|`MDB_MCP_NOTIFICATION_TIMEOUT_MS`| 540000 | Notification timeout for a client to be aware of diconnect (only applies to http transport). |
358
+
|`exportsPath`|`MDB_MCP_EXPORTS_PATH`| see note\*| Folder to store exported data files. |
359
+
|`exportTimeoutMs`|`MDB_MCP_EXPORT_TIMEOUT_MS`| 300000 | Time in milliseconds after which an export is considered expired and eligible for cleanup. |
360
+
|`exportCleanupIntervalMs`|`MDB_MCP_EXPORT_CLEANUP_INTERVAL_MS`| 120000 | Time in milliseconds between export cleanup cycles that remove expired export files. |
361
+
|`atlasTemporaryDatabaseUserLifetimeMs`|`MDB_MCP_ATLAS_TEMPORARY_DATABASE_USER_LIFETIME_MS`| 14400000 | Time in milliseconds that temporary database users created when connecting to MongoDB Atlas clusters will remain active before being automatically deleted. |
361
362
362
363
#### Logger Options
363
364
@@ -418,6 +419,14 @@ Operation types:
418
419
-`metadata` - Tools that read metadata, such as list databases, list collections, collection schema, etc.
419
420
-`connect` - Tools that allow you to connect or switch the connection to a MongoDB instance. If this is disabled, you will need to provide a connection string through the config when starting the server.
420
421
422
+
#### Require Confirmation
423
+
424
+
If your client supports [elicitation](https://modelcontextprotocol.io/specification/draft/client/elicitation), you can set the MongoDB MCP server to request user confirmation before executing certain tools.
425
+
426
+
When a tool is marked as requiring confirmation, the server will send an elicitation request to the client. The client with elicitation support will then prompt the user for confirmation and send the response back to the server. If the client does not support elicitation, the tool will execute without confirmation.
427
+
428
+
You can set the `confirmationRequiredTools` configuration option to specify the names of tools which require confirmation. By default, the following tools have this setting enabled: `drop-database`, `drop-collection`, `delete-many`, `atlas-create-db-user`, `atlas-create-access-list`.
429
+
421
430
#### Read-Only Mode
422
431
423
432
The `readOnly` configuration option allows you to restrict the MCP server to only use tools with "read", "connect", and "metadata" operation types. When enabled, all tools that have "create", "update" or "delete" operation types will not be registered with the server.
0 commit comments