Mysql MCP Server (mshddev)
MySQL and MariaDB data access for AI agents with configurable PII masking features.
Data last scanned today · Reviewed today
Overview
This MCP server enables AI agents to execute SQL queries against MySQL or MariaDB databases. It is designed to function either as a shared HTTP service for team environments or as a local stdio process, allowing models to inspect schemas and retrieve query results directly as JSON objects. The server emphasizes data safety by defaulting to read-only access and providing an explicit PII masking configuration. By requiring individual bearer tokens for different users, it ensures that query logs accurately record which agent or team member initiated specific database operations.
Our verdict
This project carries a high risk level with a security score of 30/100. It is a community-maintained repository without editorial review and lacks independent security verification for its authentication and read-only implementation. Given the high-stakes nature of providing an AI model direct database access, it is currently intended only for users who can verify the codebase independently and manage the configuration of access controls and PII masking.
- Zero direct dependencies reduce the supply-chain attack surface.
- Built-in PII masking functionality protects sensitive data.
- Stateless HTTP transport supports shared multi-user team deployments.
- High risk level due to lack of independent editorial review.
- Bus-factor risk exists with only one contributor.
- Authentication methods and read-only modes remain unverified.
Tools
| Tool | Description | Risk |
|---|---|---|
| query | Runs the SQL you send, and returns rows as JSON objects. | low |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| ChatGPT | ||||
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf |
Frequently asked questions
›Can I use this server to write data to my database?
The server defaults to read-only mode, which blocks all writes at the session level. You can opt-in to full access, but it is recommended to keep production instances in read-only mode.
›Does PII masking provide an airtight security boundary?
PII masking is intended for hygiene to prevent personal data from entering agent transcripts, but it is not an airtight security boundary.
›What happens if I use complex SQL that the PII masking logic cannot verify?
If the server cannot parse or verify the query for masking purposes, such as in certain sub-queries or joins, it will refuse the query and instruct the agent to simplify it.
›How does the server differentiate between different users?
The server uses bearer tokens configured in the settings. Each token is associated with a caller name, which is then recorded in the query logs for every database call made.
›Can this server be run without a network connection?
Yes, you can run the server as a subprocess over stdio using the --stdio flag, which is suitable for a single user with a database on the same machine.
Alternatives
Changelog
Badge
Maintain this server? Add the live badge to your README.