924ec49796
A unified virtual filesystem for AI agents. Mount S3, Google Drive, Slack, Gmail, GitHub, Linear, Notion, Postgres, MongoDB, SSH, and more behind one filesystem so agents read, write, and pipe across services with familiar shell commands. Ships Python (mirage-ai) and TypeScript (@struktoai/mirage-*) SDKs, a CLI, FUSE mounts, and adapters for OpenAI Agents SDK, Vercel AI SDK, LangChain deepagents, Pydantic AI, CAMEL, OpenHands, Mastra, Pi Coding Agent, plus FUSE-based integration with Claude Code and Codex. Apache 2.0 licensed.
41 lines
816 B
Plaintext
41 lines
816 B
Plaintext
---
|
|
title: MongoDB
|
|
icon: database
|
|
description: Set up a MongoDB connection for the MongoDB resource.
|
|
---
|
|
|
|
## Credentials
|
|
|
|
### 1. Get Your Connection URI
|
|
|
|
#### Local MongoDB
|
|
|
|
```bash
|
|
# Default local instance
|
|
MONGODB_URI=mongodb://localhost:27017
|
|
```
|
|
|
|
#### MongoDB Atlas (Cloud)
|
|
|
|
1. Go to https://cloud.mongodb.com
|
|
1. Select your cluster -> **Connect** -> **Drivers**
|
|
1. Copy the connection string:
|
|
```
|
|
mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/
|
|
```
|
|
|
|
#### Self-hosted with Authentication
|
|
|
|
```bash
|
|
MONGODB_URI=mongodb://username:password@host:27017/?authSource=admin
|
|
```
|
|
|
|
### 2. Set Environment Variables
|
|
|
|
```bash
|
|
# .env.development
|
|
MONGODB_URI=mongodb+srv://user:pass@cluster0.xxxxx.mongodb.net/
|
|
```
|
|
|
|
For Python configuration, see the [Python MongoDB Setup](/python/setup/mongodb) guide.
|