MongoDB Connector for Openclaw

An advanced MongoDB connector skill for AI agents to query collections, run aggregation pipelines, manage indexes, and execute Atlas Vector Search for RAG workflows.

agentpmt
v1.0.0
Jun 10, 2026
0
477
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install mongodb-connector

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install mongodb-connector using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is MongoDB Connector?

The MongoDB Connector is a powerful, remote-gated database integration tool designed for AI agents to interact directly with MongoDB Atlas and other publicly accessible cloud-hosted databases. By utilizing this skill, agents can safely perform up to 24 separate operations, ranging from basic read and write queries to complex administrative actions. Discovering this capability among Openclaw Skills empowers developers to build agentic workflows that securely manage live databases, perform vector searches, and run aggregation pipelines.

Built with a strict four-level permission structure (read, write, delete, and admin), the tool ensures absolute control over what tasks an AI agent can execute. Results can be processed inline or exported directly to downloadable CSV or JSON formats, making it easy to seamlessly pipe database outputs into downstream analytics or document generation pipelines.

MongoDB Connector Use Cases

  • Connect AI agents to MongoDB Atlas for real-time document querying and updates
  • Perform Atlas Vector Search and full-text queries to power custom Retrieval-Augmented Generation (RAG) workflows
  • Run complex multi-stage aggregation pipelines including joins ($lookup), grouping ($group), and geospatial queries
  • Export database query and aggregation results directly to downloadable CSV or JSON formats for data analysis
  • Execute safe atomic updates, batch mixed-write operations via bulk write, and manage dynamic schema validations

How MongoDB Connector Works

  1. Initialization & Auth: The AI agent initiates a connection to the MongoDB Connector through the AgentPMT-hosted remote tool framework.
  2. Permission Check: The platform verifies the request's permission level (read, write, delete, or admin) before forwarding the query to the cloud-hosted MongoDB instance.
  3. Execution: The database executes the requested action, such as executing a custom aggregation pipeline or performing an Atlas Vector Search.
  4. Output Processing: Results are formatted based on the output configuration (inline JSON arrays or exported to a CSV/JSON file).
  5. Secure Return: The formatted dataset is returned to the agent, enabling subsequent workflow decisions or document processing while keeping credentials strictly secured.

MongoDB Connector Setup

To use this MongoDB Connector tool, ensure you have set up the core AgentPMT connection skills. You can install these necessary dependencies via Openclaw Skills using the following CLI commands:

# Install the required AgentPMT core skills
openclaw skills install what-is-agentpmt
openclaw skills install agentpmt-account-mcp-rest-api-setup

Alternatively, you can add them via skills.sh:

npx skills add AgentPMT/agent-skills --skill what-is-agentpmt
npx skills add AgentPMT/agent-skills --skill agentpmt-account-mcp-rest-api-setup

Once the account setup is completed, configure your MongoDB instance credentials in your Agent Group environment.

MongoDB Connector Data Schema & Taxonomy

The MongoDB Connector organizes its interactions using distinct permissions levels and action-specific JSON schemas.

Permission Matrix

Permission Level Allowed Database Actions
read (default) find_documents, count_documents, estimated_count, list_databases, list_collections, aggregate, distinct, list_indexes, list_search_indexes
write insert_documents, update_documents, replace_document, find_one_and_update, bulk_write
delete delete_documents, find_one_and_delete
admin create_index, drop_index, create_search_index, update_search_index, drop_search_index, create_collection, drop_collection, run_command

Payload Formats

All query parameters use standard MongoDB syntax, accepting operators like $eq, $gt, $set, and $unset. Custom exports can be generated by configuring:

  • output: Array containing "inline" and/or "export".
  • export_format: String, either "json" or "csv".

MongoDB Connector Advanced Features

  • Atlas Vector Search: Build semantic similarity and recommendation engines directly into AI workflows with vector index generation and queries.
  • Bulk Writes: Execute atomic mixed-batch databases writes (bulk_write) to combine insert, update, replace, and delete commands in a single round-trip.
  • Admin Level Database Commands: Execute low-level administration commands such as database statistics (dbStats) and collection diagnostics (collStats) natively via the agent.
  • Geospatial & Wildcard Indexes: Create 2dsphere, text, hashed, or wildcard indexes dynamically depending on data structures.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*