Getting started
Configure an AI provider
Connect Anthropic, OpenAI, Gemini, Ollama, or a custom endpoint without routing keys or database credentials through mongoui.
AI is optional. A MongoDB connection is enough to browse, edit, query, compare, export, and run the manual maintenance tools. Configure a provider only when you want natural-language drafting, provider-backed explanations, cleanup drafting, or the AI Database Operator.

Choose a provider
The connection screen and Settings expose the same provider configuration:
| Provider | Authentication | Notes |
|---|---|---|
| Anthropic | API key | Claude Opus 4.8 is the qualified Operator model in the current release. |
| OpenAI | API key | Choose a listed model or enter a model ID. |
| Google Gemini | API key | Choose a listed model or enter a model ID. |
| Ollama | None | Restricted to localhost, 127.x, or [::1]. Tunnel a remote server to loopback first. |
| Custom endpoint | API key when required | Uses an OpenAI-compatible HTTP(S) base URL. |
Hosted-provider keys can also come from ANTHROPIC_API_KEY, OPENAI_API_KEY, or
GEMINI_API_KEY when no saved or session key is present.
Test before using AI
- Select the provider and model.
- Enter the API key, or set the local Ollama URL.
- For a custom provider, enter a base URL without credentials, query parameters, or fragments.
- Choose Test AI.
The test is independent of MongoDB. Test DB verifies the database path; Test AI verifies the selected provider, endpoint, model, and credentials. Either test can be canceled.
Keys stay under OS encryption
When OS credential encryption is available, mongoui stores provider keys through
Electron safeStorage. The renderer retains only the newly typed session value and
whether a saved key exists. If secure storage is unavailable, the key is session-only.
A custom-provider key is bound to the normalized base URL. Changing that endpoint invalidates the key and requires it again. This prevents a key saved for one service from being sent to another endpoint by accident.
Keys go directly from this machine to the selected provider. mongoui has no AI proxy or synchronization service.
Know what each AI action sends
- Local explanations make no provider call.
- Query and pipeline drafting sends your request, namespace, bounded field names and types, and index definitions. Sampled document values and credentials stay local.
- Cleanup drafting sends the request plus bounded structural context. Documents stay local.
- Operator Structure only sends the request, available typed tools, namespaces, and bounded schema and index structure. No document values are sent.
- Operator Masked shapes converts up to three documents to type-preserving masks locally. Raw values are not sent.
The provider produces a proposal, not trusted database code. mongoui validates the response locally and keeps execution behind the normal review and approval gates.
Continue with natural-language queries or the AI Database Operator.