ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 4/5

mongo-db

Interact with a MongoDB database for persistent document storage. Supports full CRUD operations (find, insert, update, delete), aggregation pipelines, collection management, and index creation. Use when any agent needs to store or retrieve data in MongoDB — for example, persisting financial records, budgets, watchlists, or any structured data across sessions.

Why use this skill?

Integrate MongoDB with OpenClaw agents for persistent data storage. Supports full CRUD operations, aggregation pipelines, and JSON schema management.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/jithinm/mongo-db
Or

What This Skill Does

The mongo-db skill provides a robust interface for OpenClaw agents to interact with MongoDB databases. It serves as a persistent memory layer, allowing agents to perform full CRUD (Create, Read, Update, Delete) operations, manage collections, create indexes for performance optimization, and execute complex aggregation pipelines. By leveraging this skill, agents can maintain state across multiple sessions, store structured financial data, manage user watchlists, and organize logs or task history efficiently.

Installation

To begin using this skill, ensure you have a running MongoDB instance (locally or via MongoDB Atlas). Run the setup script provided in the repository from the workspace root: bash skills/mongo-db/scripts/setup.sh This command automatically provisions a virtual environment and installs necessary Python dependencies (pymongo). Once installed, you can configure your credentials via environment variables like MONGO_URI or by populating the config.json file located in the skill directory. The agent invokes the functionality using a standardized JSON payload passed to the mongo_client.py script, ensuring consistent execution and output.

Use Cases

  • Persistence: Saving agent preferences or session-based state that should survive an application restart.
  • Data Analysis: Storing and retrieving financial transaction records or budget data to perform trend analysis.
  • Content Management: Managing collections for news, watchlists, or bookmarking systems.
  • Schema Enforcement: Using MongoDB JSON schema validators to ensure incoming data meets specific requirements before storage.

Example Prompts

  1. "Store the following budget report for March: { 'period': 'March 2024', 'income': 5000, 'expenses': 3200 } in the 'financials' collection."
  2. "Retrieve all entries from the 'watchlists' collection where the category is set to 'tech'."
  3. "Create a new collection called 'tasks' with a validator requiring 'title' and 'priority' fields."

Tips & Limitations

Always prioritize environment variables for sensitive connection strings rather than hardcoding them in config files. When performing aggregation pipelines, be mindful of resource consumption on large datasets. If you encounter connectivity issues, verify that your MongoDB URI is correctly formatted and that the IP address of your hosting environment is whitelisted in your MongoDB Atlas Security settings. Always validate your input JSON structure against the expected operation schema to ensure seamless integration with the CLI client.

Metadata

Author@jithinm
Stars1947
Views0
Updated2026-03-04
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-jithinm-mongo-db": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#mongodb#database#persistence#nosql#crud
Safety Score: 4/5

Flags: network-access, file-read, code-execution