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), a local Neo4j database
(enterprise_kb_neo4j container), and Atlassian Jira/Confluence + Bitbucket
(Atlassian Cloud).
Why MCP instead of connecting directly to these systems?
The alternative is handing every consumer — each agent, script, or notebook — its own copy of the raw MySQL password, Neo4j password, and Atlassian API token. That means:
more places a credential leak can happen (as many as there are consumers), instead of one;
no single point that sees every query/call for auditing — you'd have to aggregate logs from every caller's own environment;
access boundaries that only hold as well as whoever provisioned each consumer's credentials bothered to scope them (nothing stops someone from reusing an admin/root credential because it's convenient);
rotating a credential means finding and updating every consumer that embedded it.
This MCP server is the only thing that holds real credentials. It exposes
a small, fixed set of named tools instead of raw SQL/Cypher/API access, so
every call — from Claude Code, Claude Desktop, or any other MCP client —
flows through one process that can enforce scoping (e.g. separate
read-only vs. read-write DB users, transaction-mode access control) and be
logged/audited in one place. Full write-up, including a comparison against
scoping access at the cloud IAM layer instead (Azure Entra ID), is in
docs/why-mcp.md.
Related MCP server: mysql-mcp-server
Tools
Tool | System | Access |
| MySQL | Read-only. Runs as |
| MySQL | Read-write. Runs as |
| Neo4j | Read-only. Runs in a Neo4j |
| Neo4j | Read-write. Runs in a |
| Jira | Read-only. Search issues via JQL. |
| Jira | Read-only. Fetch a single issue. |
| Jira | Write. Create an issue. |
| Jira | Write. Comment on an issue. |
| Confluence | Read-only. Search content via CQL. |
| Confluence | Read-only. Fetch a page's body. |
| Confluence | Write. Create a page. |
| Confluence | Write. Update a page. |
| Bitbucket | Read-only. List pull requests. |
| Bitbucket | Read-only. Fetch a pull request. |
| Bitbucket | Write. Open a pull request. |
| Bitbucket | Write. Comment on a pull request. |
Jira/Confluence auth uses an Atlassian API token (email + token, HTTP
Basic auth) against JIRA_BASE_URL/CONFLUENCE_BASE_URL. Bitbucket auth
uses a separate app password (BITBUCKET_USERNAME +
BITBUCKET_APP_PASSWORD) against the Bitbucket Cloud API. See
.env.example for the full variable list.
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.
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.28 npm3MIT
- AlicenseAqualityDmaintenanceProvides read-only MySQL query execution, database/table browsing, and table structure inspection with SQL safety validation.56 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides secure, read-only access to a single MySQL database for schema inspection and querying.105 npm5MIT
- FlicenseAqualityDmaintenanceProvides read-only access to a local MySQL database, enabling SQL queries, database and table listings, and table schema descriptions.4-