npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@raviraj87/mongodb-mcp

v1.0.1

Published

Feature-rich MCP server for MongoDB with multi-connection support

Readme

MongoDB MCP

Feature-rich MCP server for MongoDB with multi-connection support. Connect many clusters at once — no switching, no duplicate MCP processes.

  • npm: @raviraj87/mongodb-mcp
  • GitHub: https://github.com/raviraj-ntp/mongodb-mcp
  • Runs locally via stdio (any MCP-compatible client)

Quick start

Add to your MCP client configuration (path depends on client — e.g. Claude Desktop, VS Code, Windsurf):

{
  "mcpServers": {
    "mongodb": {
      "command": "npx",
      "args": ["-y", "@raviraj87/mongodb-mcp"],
      "env": {
        "MONGODB_URI": "mongodb://localhost:27017/mydb"
      }
    }
  }
}

Option B — multiple connections (copy config.example.yaml~/.mongodb-mcp.yaml):

default_connection: local
connections:
  local:
    uri_env: MONGODB_URI
  staging:
    uri_env: MONGODB_URI_STAGING
  prod:
    uri_env: MONGODB_URI_PROD
    read_only: true

Set URIs in mcp.json env. Every tool accepts optional connection: "staging".

Extra connections via env (no YAML):

MONGODB_EXTRA_CONNECTIONS=staging:MONGODB_URI_STAGING,prod:MONGODB_URI_PROD

vs official mongodb-mcp-server

| Feature | Official | This server | |---------|----------|-------------| | Multiple clusters simultaneously | Switch or N processes | Named connection param | | Composite tools | No | explore_collection, database_overview, compare_collections | | Diagnostics | mongodb-logs | + server_status, current_ops, repl_set_status | | Knowledge search | Yes | Yes (search_knowledge, optional) | | Atlas API | Full | Core read ops (optional) | | Per-connection read_only | No | Yes |


Tools (~45)

Connection: list_connections, ping, connect

Read: find, find_one, aggregate, aggregate_db, count, explain, distinct, sample_documents, text_search, export_query

Metadata: list_databases, list_collections, collection_schema, collection_indexes, collection_storage_size, collection_stats, db_stats, validate_collection

Write: insert_many, update_many, delete_many, bulk_write, find_one_and_*

Admin: create_collection, drop_collection, rename_collection, create_index, drop_index, drop_database, coll_mod

Diagnostics: server_status, current_ops, repl_set_status, mongodb_logs, list_commands

Composite: explore_collection, database_overview, analyze_query, compare_collections, index_health

Assistant: list_knowledge_sources, search_knowledge (disable with assistant.enabled: false)

Atlas: atlas_list_*, atlas_inspect_cluster, atlas_performance_advisor (set atlas.enabled: true)


Safety

  • Global or per-connection read_only
  • index_check — reject collection scans
  • disable_server_side_js — block $where, $function
  • confirmation_required_tools — destructive ops need confirmed: true
  • max_documents_per_query, max_payload_bytes
  • connection_filter — expose only specific connections per project

Install from source

cd mongodb-mcp
npm install
npm run build

Clone from GitHub:

git clone https://github.com/raviraj-ntp/mongodb-mcp.git
{
  "command": "node",
  "args": ["/path/to/mongodb-mcp/dist/index.js"]
}

License

Copyright © 2026 Ravi Raj. Licensed under the MIT License.