Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

mongodb-mcp-setup

БесплатноБез исполняемых скриптовНе проверен

Guide users through installing and configuring the MongoDB MCP server. Use this skill when a user wants to connect their agent to MongoDB/Atlas through MCP…

mongodbот mongodb★ 210 звёзд на GitHub

Об этом скилле

MongoDB MCP Server Setup

This skill guides users through configuring the MongoDB MCP server for use with an agentic client.

Overview

The MongoDB MCP server requires authentication. Users have three options:

  1. Connection String (Option A): Direct connection to a specific cluster

    • Quick setup for single cluster
    • Requires MDB_MCP_CONNECTION_STRING environment variable
  2. Service Account Credentials (Option B): MongoDB Atlas Admin API access

    • Recommended for Atlas users - simplifies authentication and data access
    • Access to Atlas Admin API and dynamic cluster connection via atlas-connect-cluster
    • No manual DB user credential management
    • Requires MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET environment variables
  3. Atlas Local (Option C): Local development with Docker

    • Best for local testing - zero configuration required
    • Runs Atlas locally in Docker, requires Docker installed
    • No credentials or cloud cluster access

This is an interactive step-by-step guide. The agent detects the user's environment and provides tailored instructions, but never asks for or handles credentials — users add those directly to their shell profile or agentic client config in Step 5. Make this clear to the user whenever credentials come up in Steps 3a and 3b.

Step 0: Detect Client

Before anything else, determine which agentic client the user is running. This controls how credentials are configured in Step 1 and Step 5.

Run:

env | grep "^CODEX_"
  • If no CODEX_* variables are present → the user is running a shell-based client (Claude, Cursor, Gemini CLI, Copilot CLI, etc.). Credentials are configured via shell profile environment variables.
  • If any CODEX_* variables are present → the user is running Codex. Credentials are stored in ~/.codex/config.toml (macOS/Linux) or %USERPROFILE%\.codex\config.toml (Windows), not in shell environment variables. The desktop app does not inherit shell env vars when launched from Finder, Launchpad, or the Windows Start menu.

Carry this client type (Codex vs. shell-based) forward through every subsequent step.

Step 0.5: Confirm the MCP Server Is Installed

Check your own available tools for MongoDB MCP server tools such as list-databases, find, or connect (clients often prefix them with the server name, e.g. mcp__mongodb__find).

  • Tools present → the server is installed. If you are running in Codex, record the server name as it appears in the tool identifiers for use in Step 5. Continue to Step 1.

  • Tools absent → work through these checks in order, and stop at the first one that gives a clear answer:

    1. Config entry. Look for a mongodb MCP entry in the client's MCP configuration. If there isn't one and the MongoDB plugin isn't enabled, the server is not installed. Go to Not installed below.
    2. Bundled plugin. If the MongoDB plugin is enabled, the server is bundled and can't be missing because it was never added. Go to Failed to start below.
    3. Client status. If the client has a way to list MCP server status (for example, /mcp in Claude Code), check it. A server listed as failed means Failed to start. A server listed as connected, with no tools in this session, means Needs restart.
    4. Prerequisites. Confirm that node and npx are available. If either is missing, that is the likely cause of Failed to start.

    If the checks don't settle it, ask the user: "Did you add the MongoDB server to your client, and have you restarted the client since?" Use the answer to choose the branch below.

    • Needs restart: fully quit and reopen the client, then return to this step. Don't reinstall, because that can create a duplicate entry.
    • Failed to start: the server is installed but not running. Check that Node.js and npx are available, then see https://www.mongodb.com/docs/mcp-server/local-mcp/configuration/troubleshooting.md. If the plugin is bundled, don't send the user to install it.
    • Not installed: Fetch https://www.mongodb.com/docs/mcp-server/get-started.md, use only the section for the user's client (the page covers every client), and give the user those steps. Its install paths are the user's to run: plugin installs are slash commands, and npx mongodb-mcp-server@latest setup prompts for a connection string. Afterwards tell them to fully restart the client and run this skill again.

Step 1: Check Existing Configuration

Check whether credentials are already configured.

For shell-based clients — check the current environment:

env | grep "^MDB_MCP" | sed '/^MDB_MCP_READ_ONLY=/!s/=.*/=[set]/'

For Codex — search ~/.codex/config.toml (macOS/Linux) or `%USERPROFILE%.codex\co

Полный SKILL.md на GitHub

Установить mongodb-mcp-setup в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл mongodb-mcp-setup?

Guide users through installing and configuring the MongoDB MCP server. Use this skill when a user wants to connect their agent to MongoDB/Atlas through MCP, when the MongoDB MCP server is installed but its environment variables aren't configured, or when they don't have the server or credentials set up yet.

Как установить скилл mongodb-mcp-setup?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл mongodb-mcp-setup запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить mongodb-mcp-setup с