Back to Home
sparsh3104 icon

MCP-SERVER

by sparsh3104

Overview

A stateless, multi-tenant Model Context Protocol (MCP) server that exposes MySQL database operations as callable tools over various transports.

Installation

Run Command
python server.py --transport http

Environment Variables

  • MCP_API_KEYS
  • MYSQL_HOST
  • MYSQL_PORT
  • MYSQL_USER
  • MYSQL_PASSWORD
  • MYSQL_DB
  • TENANT_{ID}_DB
  • MCP_HOST
  • MCP_PORT

Security Notes

CRITICAL SQL INJECTION VULNERABILITIES: The `run_select_impl` function directly executes user-provided SQL queries, allowing for arbitrary SQL injection. Furthermore, `get_table_schema_impl` and `insert_row_impl` construct SQL queries using f-strings with user-provided `table_name` and `row` dictionary keys (for column names) without proper escaping for identifiers, which could also lead to SQL injection. This makes the server highly vulnerable to malicious database operations.

Similar Servers

Stats

Interest Score0
Security Score2
Cost ClassMedium
Avg Tokens1000
Stars0
Forks0
Last Update2025-12-05

Tags

MySQLMulti-tenantAPIStatelessPython