1Password-enabled MySQL MCP Server
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., "@1Password-enabled MySQL MCP Servershow the users table schema"
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.
1Password-enabled MySQL MCP Server
A Model Context Protocol (MCP) server that provides secure MySQL database access using credentials stored in 1Password. This server allows AI assistants and other MCP clients to query MySQL databases while maintaining security best practices by keeping database credentials in 1Password rather than in configuration files. By combining this into a single tool, the AI model does not ever see any passwords.
Requirements
Python 3.10+
uv (Python package manager)
1Password Desktop App and 1Password CLI
MySQL server access
Related MCP server: MySQL MCP Server
Installation
MacOS
# Install dependencies
brew install uv 1password-cli
# Install Python dependencies
uv syncOther Platforms
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install 1Password CLI
# Visit: https://developer.1password.com/docs/cli/get-started/
# Install Python dependencies
uv syncSetup
1. 1Password Configuration
Ensure 1Password CLI access is enabled. Can be enabled by going to Settings -> Developer -> "Integrate with 1Password CLI". You can verify this is installed correctly by running:
op vault listCreate database items in 1Password using the database type with the following fields:
hostname: MySQL server hostnameusername: MySQL usernamepassword: MySQL passworddatabase: Database nameport: MySQL port (optional, defaults to 3306)
2. Environment Configuration
Configure the following environment variables:
RO_DB_ENTRIES: Comma-separated list of 1Password item names for read-only databasesRW_DB_ENTRIES: Comma-separated list of 1Password item names for read-write databases
3. MCP Server Configuration
Add this to your MCP Server configuration file:
{
"mcpServers": {
"mysql": {
"command": "[PATH_TO]/uv",
"args": [
"--directory",
"[CODE_PATH]",
"run",
"main.py"
],
"env": {
"RO_DB_ENTRIES": "Dev Auth DB",
"RW_DB_ENTRIES": "Dev Dashboard DB,Dev Library DB"
}
}
}
}Replace [PATH_TO]/uv with the actual path to your uv installation and [CODE_PATH] with the path to this project directory.
This server cannot be deployed
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Query your Postgres from ChatGPT or Claude without exposing the database or handing over credentials. Run npx boltschema connect next to your database and it dials out over HTTPS — no inbound firewall rule, no open port, works with localhost and VPC-private databases. Read-only is enforced by a SQL guard, a Postgres READ ONLY transaction, and a scoped role generated for you.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables secure interaction with MySQL databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.-
- AlicenseNot gradedqualityDmaintenanceProvides secure access to MySQL databases for AI assistants, enabling safe SQL queries, table information retrieval, and data insertion with built-in security protections.317 npm2MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to safely query MySQL databases with read-only access, featuring SQL injection protection, connection pooling, and automatic query limits for secure database exploration.472 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to securely connect to and manage MySQL databases with support for multiple database connections, complete CRUD operations, schema inspection, and dynamic connection management through natural language.7 npm81MIT