Back to Home
arielolin icon

apiiro-mongo-mcp

by arielolin

Overview

This MCP server allows users to query and manage MongoDB deployments running in Kubernetes, handling gcloud authentication, permission escalation, and Kubernetes context/namespace selection.

Installation

Run Command
npm start

Security Notes

The server uses `child_process.exec` to run `kubectl` and `gcloud` commands. It constructs shell commands by interpolating user-provided values for Kubernetes context, namespace, MongoDB credentials (`mongoAuth`), and MongoDB queries (`query`/`expression`). Although there's an attempt to escape double quotes and dollar signs in the MongoDB query, this is insufficient for comprehensive shell injection prevention. Specifically, user-provided `context` and `namespace` are not escaped when used in `kubectl` commands, and user-provided `mongoAuth` (username/password) are interpolated into `mongosh` command-line arguments using simple double quotes, which are vulnerable if the credentials themselves contain malicious characters (e.g., `"$(evil_command)"`). This allows for potential arbitrary command execution on the host where the MCP server runs, or within the target MongoDB pod.

Similar Servers

Stats

Interest Score0
Security Score3
Cost ClassMedium
Avg Tokens1500
Stars0
Forks0
Last Update2025-11-26

Tags

MongoDBKuberneteskubectlgcloudMCPDatabase