A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.npmjs.com/package/mongo-mongoose-mcp below:

mongo-mongoose-mcp - npm

An MCP (Model Context Protocol) server that enables Claude to interact with MongoDB databases, with optional Mongoose schema support.

Integrating with Claude Desktop

To add the MCP server to Claude Desktop:

  1. Go to Settings > Developer > Edit config
  2. Add the following to your claude_desktop_config.json file:
{
  "mcpServers": {
    "mongodb-mongoose": {
      "command": "npx",
      "args": [
        "-y", 
        "mongo-mongoose-mcp",
      ],
      "env": {
        "MONGODB_URI": "<your mongodb uri>",
        "SCHEMA_PATH" : "<path to the root folder of all your mongoose schema objects>"
      }
    }
  }
}

When integrated with Claude, the following commands become available:

Once integrated with Claude Desktop, you can use natural language to interact with your MongoDB database:

# Clone the repository
git clone https://github.com/nabid-pf/mongo-mongoose-mcp.git
cd mongo-mongoose-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Test with the MCP inspector
npx @modelcontextprotocol/inspector node dist/index.js
Creating Mongoose Schemas

Place your Mongoose schema object files in the a directory and specify that path in SCHEMA_PATH var Make sure file names reflect the collection name

// models/users.js (for users collection)
export default {
  name: { type: String, required: true },
  email: { type: String, required: true, unique: true },
  age: Number,
  createdAt: { type: Date, default: Date.now },
  isDeleted: { type: Boolean, default: false },
  deletedAt: Date
};

This project uses:

MIT


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4