> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/2023-04-25/configuring-your-connections/connections/mongo-db/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.
# MongoDB
Supports:
* ✅ Models
* ✅ Model sync destination
* ✅ Bulk sync source
## Connection
### Configuration
| Name | Type | Description | Required |
change_detection |
boolean |
Use change stream for bulk syncs |
false |
database |
string |
Auth database |
false |
hosts |
string |
Hostname(s) |
true |
params |
string |
Additional parameters
Additional connection parameters, formatted as a query string |
false |
password |
string |
Password |
false |
srv |
boolean |
Connect using SRV record? |
false |
ssl |
boolean |
Use TLS/SSL |
false |
username |
string |
Username |
false |
#### Example
```json
{
"name": "MongoDB connection",
"type": "mongodb",
"configuration": {
"change_detection": false,
"database": "",
"hosts": "mongodb.example.net",
"params": "",
"password": "password",
"srv": false,
"ssl": false,
"username": "admin"
}
}
```
## Model Sync
### Source
#### Configuration
| Name | Type | Description | Required |
aggregation |
string |
|
false |
collection |
string |
Collection |
true |
database |
string |
Database |
true |
query |
string |
|
false |
#### Example
```json
{
...
"configuration": {
"aggregation": "",
"collection": "users",
"database": "public",
"query": "db.users.find({\"name.family\": \"Smith\"})"
}
}
```
### Target
MongoDB connections may be used as the destination in a model sync.
### Target creation
MongoDB connections may be used to create a new target for a model sync. The
following parameters are required to create a new target:
| NAME |
DESCRIPTION |
ENUM |
| name |
Collection name |
false |
## Bulk Sync
### Source
MongoDB connections may be used as a bulk sync source. No additional configuration options are required.