Back to Home
Bing-Xuan-Lu icon

MCP_NodeServer

by Bing-Xuan-Lu

Overview

This server acts as a coding agent providing tools to an orchestrating AI for full-stack PHP development, including file system management and direct database interaction.

Installation

Run Command
node index.js

Security Notes

CRITICAL SECURITY VULNERABILITIES DETECTED: 1. Hardcoded Root Database Credentials: The `dbConfig` object explicitly uses `user: 'root'` with an empty password. This is an extremely dangerous practice that grants full administrative access to the database if the server or its configuration is compromised, or if an attacker can trigger database operations. 2. SQL Injection Vulnerability: The `execute_sql` tool directly executes arbitrary SQL provided in `args.sql` without any apparent sanitization or validation. This allows for direct SQL injection attacks, enabling unauthorized data manipulation, schema alteration (e.g., `DROP TABLE`), or data exfiltration if an attacker can influence the tool's input. 3. Path Traversal Vulnerability: File system tools (`list_files`, `read_file`, `create_file`, `apply_diff`) construct file paths by joining a `basePath` with user-provided `relative_path` or `path`. While `path.join` helps normalize paths, it does not inherently prevent directory traversal (`../`) sequences, potentially allowing an attacker to access, create, or modify files outside the intended `D:\Develop` base directory. 4. Powerful Unrestricted Operations: The combination of arbitrary SQL execution and unrestricted file system modification (including creating/overwriting files) makes this server a high-risk component if its inputs are not meticulously validated and authenticated. Given its role as an agent's tool, it's particularly susceptible if the orchestrating AI can be subjected to prompt injection attacks. RECOMMENDATIONS: The hardcoded credentials and direct execution of arbitrary commands (SQL, file system) are critical flaws that must be addressed before deployment. Database credentials and sensitive paths should be moved to environment variables, inputs should be rigorously validated and sanitized, and operations should be restricted with strong access controls.

Similar Servers

Stats

Interest Score0
Security Score1
Cost ClassMedium
Avg Tokens1500
Stars0
Forks0
Last Update2026-01-18

Tags

Coding AgentPHP DevelopmentFile SystemMySQLTooling