
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@nam088/mcp-mongodb
Advanced tools
MongoDB plugin for Model Context Protocol (MCP) server.
npm install @nam088/mcp-mongodb
Configure your MongoDB connection using environment variables:
# Required
MONGODB_URI=mongodb://localhost:27017
MONGODB_DATABASE=your_database
# Optional
MONGODB_MODE=READONLY # Plugin mode: READONLY or FULL
import { MongoDBPlugin } from '@nam088/mcp-mongodb';
const plugin = new MongoDBPlugin({
uri: 'mongodb://localhost:27017',
database: 'your_database',
mode: 'READONLY', // or 'FULL'
options: {
// MongoDB client options
maxPoolSize: 10,
minPoolSize: 0,
}
});
For MongoDB Atlas (cloud):
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net
MONGODB_DATABASE=your_database
Create mcp-config.json:
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"@nam088/mcp-mongodb"
],
"env": {
"MONGODB_URI": "mongodb://localhost:27017",
"MONGODB_DATABASE": "your_database",
"MONGODB_MODE": "READONLY"
}
}
}
}
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { PluginRegistry } from '@nam088/mcp-core';
import { MongoDBPlugin } from '@nam088/mcp-mongodb';
const server = new McpServer(
{ name: 'my-server', version: '1.0.0' },
{ capabilities: { tools: {} } }
);
const registry = new PluginRegistry(server);
await registry.registerPlugin(MongoDBPlugin);
const transport = new StdioServerTransport();
await server.connect(transport);
Only read operations are allowed. Safe for production use.
MONGODB_MODE=READONLY
All operations including writes are allowed. Use with caution.
MONGODB_MODE=FULL
// Tool: mongodb_find
{
"collection": "users",
"filter": {
"age": { "$gte": 18 },
"status": "active"
},
"projection": {
"name": 1,
"email": 1,
"_id": 0
},
"sort": {
"name": 1
},
"limit": 10
}
// Tool: mongodb_insert_one
{
"collection": "users",
"document": {
"name": "John Doe",
"email": "john@example.com",
"age": 30,
"status": "active"
}
}
// Tool: mongodb_update_many
{
"collection": "users",
"filter": {
"status": "inactive"
},
"update": {
"$set": {
"status": "archived"
}
}
}
// Tool: mongodb_aggregate
{
"collection": "orders",
"pipeline": [
{
"$match": {
"status": "completed"
}
},
{
"$group": {
"_id": "$userId",
"totalSpent": { "$sum": "$amount" },
"orderCount": { "$sum": 1 }
}
},
{
"$sort": {
"totalSpent": -1
}
},
{
"$limit": 10
}
]
}
// Tool: mongodb_create_index
{
"collection": "users",
"keys": {
"email": 1
},
"options": {
"unique": true,
"name": "email_unique"
}
}
// Tool: mongodb_list_collections
{
"database": "mydb"
}
// Tool: mongodb_collection_stats
{
"collection": "users",
"database": "mydb"
}
mongodb+srv:// or configure SSL/TLS$where can be dangerousThis plugin is fully typed with TypeScript. All query results and configurations use proper types from the mongodb library, ensuring type safety throughout your application.
import type {
MongoDBPluginConfig,
MongoDBQueryResult,
MongoDBInsertResult,
MongoDBUpdateResult,
MongoDBDeleteResult
} from '@nam088/mcp-mongodb';
MIT
nam088
For issues and questions, please visit the GitHub repository.
FAQs
MongoDB plugin for MCP server
We found that @nam088/mcp-mongodb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.