MongoDB Agent Skills

Collection of official MongoDB agent skills for use in agentic workflows.

Installation

Claude

Install the plugin from the Claude marketplace.

Cursor

Install the plugin from the Cursor marketplace.

Gemini

Install the extension from the Gemini marketplace.

GitHub Copilot CLI

Add this repository as a marketplace (copilot plugin marketplace add with the GitHub repo or a local clone path), then install the mongodb plugin using the marketplace name from copilot plugin marketplace list (for example copilot plugin install mongodb@my-marketplace). See Creating a plugin marketplace for GitHub Copilot CLI.

Local install from repository

  1. Clone the repository:

    git clone https://github.com/mongodb/agent-skills.git
    
  2. Install the skills for your platform:

    Supported platforms (Claude Code, Cursor, Copilot CLI, Gemini CLI)

    Copy the appropriate plugin directory to your project root:

    • For Claude Code: Copy the .claude-plugin/ directory
    • For Cursor: Copy the .cursor-plugin/ directory
    • For GitHub Copilot CLI: Copy the .github/plugin/ directory
    • For Gemini CLI: Copy the skills/ directory

    Other platforms

    Copy the skills/ directory to the location where your coding agent reads its skills or context files. Refer to your agent's documentation for the correct path.

  3. Copy mcp.json to your project root (if using MCP Server).

  4. Configure the MCP Server with your MongoDB connection details.

Configuration

MCP server environment variables

The MongoDB MCP server requires authentication. Set one of the following:

Option A - Connection string (direct MongoDB connection):

export MDB_MCP_CONNECTION_STRING="mongodb+srv://user:password@cluster.mongodb.net/"

Option B - API credentials (MongoDB Atlas Admin API):

export MDB_MCP_API_CLIENT_ID="your-client-id"
export MDB_MCP_API_CLIENT_SECRET="your-client-secret"

Add these to your shell profile (~/.zshrc, ~/.bashrc, or equivalent) so they are available when your IDE starts. For a complete list of configuration options, see the MongoDB MCP server documentation.

S
Description
mongodb-query-optimizer: Help with MongoDB query optimization and indexing. Use only when the user asks for optimization or performance: "How do I optimize this query?", "How do I…; mongodb-schema-design: MongoDB schema design patterns and anti-patterns. Use when designing data models, reviewing schemas, migrating from SQL, or troubleshooting performance issues…; mongodb-connection: Optimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language. U…
Readme Apache-2.0 1.5 MiB
Languages
TypeScript 48.2%
JavaScript 42.4%
Shell 9.4%