mysql-neo4j-mcp
Provides scoped read-only and read-write access to a MySQL database. Includes mysql_query for SELECT-only queries and mysql_execute for SELECT/INSERT/UPDATE/DELETE operations against the contoso_claims database, with permissions enforced by dedicated database users.
Provides scoped read-only and read-write access to a Neo4j graph database. Includes neo4j_query for read transactions and neo4j_write for write transactions, with read/write separation enforced by Neo4j transaction access modes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mysql-neo4j-mcpshow unpaid claims from MySQL and their related Neo4j entities"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mysql-neo4j-mcp
MCP server exposing scoped read/write tools over a local MySQL database
(contoso-mysql container, db contoso_claims) and a local Neo4j database
(enterprise_kb_neo4j container).
See docs/why-mcp.md for the rationale behind this
architecture vs. connecting directly or scoping access at the cloud IAM
layer (Azure).
Tools
Tool | DB | Access |
| MySQL | Read-only. Runs as |
| MySQL | Read-write. Runs as |
| Neo4j | Read-only. Runs in a Neo4j |
| Neo4j | Read-write. Runs in a |
Why Neo4j only has one DB user
Neo4j Community edition (what's running here) has no role-based access
control at all — CREATE ROLE / GRANT ROLE commands are Enterprise-only,
and every authenticated user has full read/write access. Creating a second
"reader" user would be theater: it would have identical permissions to the
writer user.
Instead, read/write separation for Neo4j is enforced by the transaction
mode (execute_read vs execute_write), which the Neo4j server honors
independent of RBAC/edition — verified directly: a write query issued
inside a read transaction is rejected server-side with
Neo.ClientError.Statement.AccessMode, even on this single Community
instance with no roles configured.
Related MCP server: mysql-mcp-server
Setup
Copy
.env.exampleto.envand fill in credentials (see "Provisioning DB users" below for how they were created).python3.12 -m venv .venv && .venv/bin/pip install -r requirements.txt(needs Python 3.10+; themcpSDK doesn't support older versions).Run standalone:
.venv/bin/python3 server.pyRegister with an MCP client (e.g. Claude Code):
claude mcp add mysql-neo4j-mcp -- /Users/tarunsachdeva/dev/mysql-neo4j-mcp/.venv/bin/python3 /Users/tarunsachdeva/dev/mysql-neo4j-mcp/server.py
Provisioning DB users
MySQL (connect as root to contoso-mysql):
CREATE USER 'contoso_ro'@'%' IDENTIFIED BY '<password>';
GRANT SELECT ON contoso_claims.* TO 'contoso_ro'@'%';
CREATE USER 'contoso_rw'@'%' IDENTIFIED BY '<password>';
GRANT SELECT, INSERT, UPDATE, DELETE ON contoso_claims.* TO 'contoso_rw'@'%';
FLUSH PRIVILEGES;Neo4j (connect via cypher-shell as neo4j to enterprise_kb_neo4j):
CREATE USER kb_app SET PASSWORD '<password>' CHANGE NOT REQUIRED;(No role grants — see "Why Neo4j only has one DB user" above.)
This server cannot be deployed
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Generate, fix, explain and run read-only SQL on PostgreSQL, MySQL and SQL Server
Sandbox workspace tools: search, file read, DB queries, integrations. Returns synthetic data.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables safe querying and optional writing to MySQL databases via MCP tools, with support for schema inspection, connection management, and read-only mode.16 npm3MIT
- AlicenseAqualityDmaintenanceProvides read-only MySQL query execution, database/table browsing, and table structure inspection with SQL safety validation.57 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides secure, read-only access to a single MySQL database for schema inspection and querying.72 npm5MIT
- FlicenseAqualityDmaintenanceProvides read-only access to a local MySQL database, enabling SQL queries, database and table listings, and table schema descriptions.4-