Back to Home
M0hitMehra icon

mcp-server

by M0hitMehra

Overview

This server acts as a Model Context Protocol (MCP) provider, exposing MongoDB database operations (CRUD, listing databases/collections, and advanced identifier-aware search) as callable tools for AI agents.

Installation

Run Command
tsx server.ts

Environment Variables

  • MONGODB_URI
  • MONGO_DB_NAME
  • GEMINI_API_KEY
  • TRANSPORT
  • HTTP_PORT
  • DANGEROUSLY_OMIT_AUTH

Security Notes

CRITICAL: Hardcoded production MongoDB connection URI with username and password (`finconic-dev:f0WW8QlcQxZwErVq`) is present in both `dserver.js` and `server.ts`. The server exposes an unauthenticated HTTP API (if `TRANSPORT=http` or `HTTP_PORT` is set) with permissive CORS (`*`), allowing any client to invoke MongoDB CRUD and query tools with arbitrary arguments, directly leveraging these hardcoded, high-privileged credentials. The 'query-documents' tool's filter parameter accepts `z.record(z.any())`, enabling arbitrary MongoDB filter objects, which is extremely dangerous without robust authentication and authorization.

Similar Servers

Stats

Interest Score0
Security Score1
Cost ClassMedium
Avg Tokens1000
Stars0
Forks0
Last Update2025-11-24

Tags

MCPMongoDBAI ToolsDatabase InterfaceLLM Integration