{"_id":"@yukihito/mysql-mcp-server","_rev":"3-10b5bdcbd46e6c62f0667b72e705044c","name":"@yukihito/mysql-mcp-server","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@yukihito/mysql-mcp-server","version":"1.0.0","keywords":["mcp","mysql","server","modelcontextprotocol","context"],"author":{"name":"Yukihito"},"license":"MIT","_id":"@yukihito/mysql-mcp-server@1.0.0","maintainers":[{"name":"yukihito","email":"jokyu.yukihito@gmail.com"}],"homepage":"https://github.com/yukihito-jokyu/mysql-mcp-server#readme","bugs":{"url":"https://github.com/yukihito-jokyu/mysql-mcp-server/issues"},"bin":{"mysql-mcp-server":"dist/index.js"},"dist":{"shasum":"f98c58c0a43a77c40b61bdd9afb7010a208a938f","tarball":"https://registry.npmjs.org/@yukihito/mysql-mcp-server/-/mysql-mcp-server-1.0.0.tgz","fileCount":15,"integrity":"sha512-cuDJ8vXOUkA15UKb5nX91BTsLPBmhxASHaqWwSHWlWMKWBur0qYuTA5wDoPcrv31fb40N+cmNb/tDjcpfI5KHw==","signatures":[{"sig":"MEUCIAg0Ixhrc9d4x/Y85xC8Z7U8oaj1Qh2q/IDq/KY+0RBJAiEAmz/Kv/F7u4/VQQNfBuny8N0Xx/GoBygOLnOISCat4p0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21313},"main":"dist/index.js","type":"module","_from":"file:yukihito-mysql-mcp-server-1.0.0.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"mcpName":"io.github.yukihito-jokyu/mysql-mcp-server","private":false,"scripts":{"dev":"tsc --watch","build":"tsc","start":"node dist/index.js"},"_npmUser":{"name":"yukihito","email":"jokyu.yukihito@gmail.com"},"_resolved":"/private/var/folders/0m/sd6ft4gx5v9c66gcpv2snfdc0000gn/T/87dd2fb18994993d6e2f17c6a2b3fa1f/yukihito-mysql-mcp-server-1.0.0.tgz","_integrity":"sha512-cuDJ8vXOUkA15UKb5nX91BTsLPBmhxASHaqWwSHWlWMKWBur0qYuTA5wDoPcrv31fb40N+cmNb/tDjcpfI5KHw==","repository":{"url":"git+https://github.com/yukihito-jokyu/mysql-mcp-server.git","type":"git"},"_npmVersion":"11.6.0","description":"MySQL MCP Server","directories":{},"_nodeVersion":"24.9.0","dependencies":{"zod":"^3.25.76","mysql2":"^3.15.3","commander":"^14.0.2","@modelcontextprotocol/sdk":"^1.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^24.10.1"},"_npmOperationalInternal":{"tmp":"tmp/mysql-mcp-server_1.0.0_1763748427758_0.4040795600364302","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@yukihito/mysql-mcp-server","version":"1.0.1","keywords":["mcp","mysql","server","modelcontextprotocol","context"],"author":{"name":"Yukihito"},"license":"MIT","_id":"@yukihito/mysql-mcp-server@1.0.1","maintainers":[{"name":"yukihito","email":"jokyu.yukihito@gmail.com"}],"homepage":"https://github.com/yukihito-jokyu/mysql-mcp-server#readme","bugs":{"url":"https://github.com/yukihito-jokyu/mysql-mcp-server/issues"},"bin":{"mysql-mcp-server":"dist/index.js"},"dist":{"shasum":"c6e2934540ad2de6b8df285189aef12769dd245d","tarball":"https://registry.npmjs.org/@yukihito/mysql-mcp-server/-/mysql-mcp-server-1.0.1.tgz","fileCount":15,"integrity":"sha512-hjoxQwVNntGtCqta5b62/qvTzW9ZseU3rs3MDU68i32Sp8XanvFKFtP2LJmK4d2nFXfXn5t1SGzgYOMCIOHn4g==","signatures":[{"sig":"MEQCIDOpeeywpgsxj4hZw5OKfJmw3hdvjdYw7rRWJT+H1x9OAiANtxD7Im2idgfwruChs710z9DGCeIxNKkDGoBu8SE+TA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21381},"main":"dist/index.js","type":"module","_from":"file:yukihito-mysql-mcp-server-1.0.1.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"mcpName":"io.github.yukihito-jokyu/mysql-mcp-server","private":false,"scripts":{"dev":"tsc --watch","build":"tsc && chmod 755 dist/index.js","start":"node dist/index.js"},"_npmUser":{"name":"yukihito","email":"jokyu.yukihito@gmail.com"},"_resolved":"/private/var/folders/0m/sd6ft4gx5v9c66gcpv2snfdc0000gn/T/dbae7c0e10da95b73b389592f2b17742/yukihito-mysql-mcp-server-1.0.1.tgz","_integrity":"sha512-hjoxQwVNntGtCqta5b62/qvTzW9ZseU3rs3MDU68i32Sp8XanvFKFtP2LJmK4d2nFXfXn5t1SGzgYOMCIOHn4g==","repository":{"url":"git+https://github.com/yukihito-jokyu/mysql-mcp-server.git","type":"git"},"_npmVersion":"11.6.0","description":"MySQL MCP Server","directories":{},"_nodeVersion":"24.9.0","dependencies":{"zod":"^3.25.76","mysql2":"^3.15.3","commander":"^14.0.2","@modelcontextprotocol/sdk":"^1.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3","@types/node":"^24.10.1"},"_npmOperationalInternal":{"tmp":"tmp/mysql-mcp-server_1.0.1_1763750404422_0.7603956781311811","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@yukihito/mysql-mcp-server","version":"1.0.2","mcpName":"io.github.yukihito-jokyu/mysql-mcp-server","description":"MySQL MCP Server","private":false,"publishConfig":{"access":"public"},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"bin":{"mysql-mcp-server":"dist/index.js"},"repository":{"type":"git","url":"git+https://github.com/yukihito-jokyu/mysql-mcp-server.git"},"keywords":["mcp","mysql","server","modelcontextprotocol","context"],"author":{"name":"Yukihito"},"license":"MIT","type":"module","bugs":{"url":"https://github.com/yukihito-jokyu/mysql-mcp-server/issues"},"homepage":"https://github.com/yukihito-jokyu/mysql-mcp-server#readme","dependencies":{"@modelcontextprotocol/sdk":"^1.22.0","commander":"^14.0.2","mysql2":"^3.15.3","zod":"^3.25.76"},"devDependencies":{"@types/node":"^24.10.1","typescript":"^5.9.3"},"scripts":{"build":"tsc && chmod 755 dist/index.js","dev":"tsc --watch","start":"node dist/index.js"},"_id":"@yukihito/mysql-mcp-server@1.0.2","_integrity":"sha512-foJRAesWHXhxz0oln4MY7gU4xHZw70LZ2d4lmvdMIccKnxk4yyrxuo6XWhIIFUl+KwEXICIcqkW1H+p+1tTV6g==","_resolved":"/private/var/folders/0m/sd6ft4gx5v9c66gcpv2snfdc0000gn/T/2757b98a1d987954e0552dc2b56dbea0/yukihito-mysql-mcp-server-1.0.2.tgz","_from":"file:yukihito-mysql-mcp-server-1.0.2.tgz","_nodeVersion":"24.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-foJRAesWHXhxz0oln4MY7gU4xHZw70LZ2d4lmvdMIccKnxk4yyrxuo6XWhIIFUl+KwEXICIcqkW1H+p+1tTV6g==","shasum":"77bb27ed7a57c302a877be5d0abfa96e93ef71ec","tarball":"https://registry.npmjs.org/@yukihito/mysql-mcp-server/-/mysql-mcp-server-1.0.2.tgz","fileCount":15,"unpackedSize":21509,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCHOcQE0z19czRIAGmf4LN8kHYDeo9qGcsXE2Cb5K4klwIgNfTiV1BPNmi3wM6H0TuJ1jSFRVdfC44szHdCPOI6Bnc="}]},"_npmUser":{"name":"yukihito","email":"jokyu.yukihito@gmail.com"},"directories":{},"maintainers":[{"name":"yukihito","email":"jokyu.yukihito@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mysql-mcp-server_1.0.2_1763752744164_0.4257493627364999"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-21T18:07:07.693Z","modified":"2025-11-21T19:19:04.541Z","1.0.0":"2025-11-21T18:07:08.029Z","1.0.1":"2025-11-21T18:40:04.610Z","1.0.2":"2025-11-21T19:19:04.350Z"},"bugs":{"url":"https://github.com/yukihito-jokyu/mysql-mcp-server/issues"},"author":{"name":"Yukihito"},"license":"MIT","homepage":"https://github.com/yukihito-jokyu/mysql-mcp-server#readme","keywords":["mcp","mysql","server","modelcontextprotocol","context"],"repository":{"type":"git","url":"git+https://github.com/yukihito-jokyu/mysql-mcp-server.git"},"description":"MySQL MCP Server","maintainers":[{"name":"yukihito","email":"jokyu.yukihito@gmail.com"}],"readme":"# MySQL MCP Server\n\nA Model Context Protocol (MCP) server for MySQL databases that provides **read-only** access to database schema information and sample data.\n\n## Background\n\nWhile existing MySQL MCP servers (such as [designcomputer/mysql_mcp_server](https://github.com/designcomputer/mysql_mcp_server)) allow LLMs to generate and execute arbitrary SQL queries—including INSERT, UPDATE, and DELETE operations—this approach poses risks when working on backend implementations.\n\n**This MCP server takes a different, safer approach:**\n\n- ✅ **Read-only operations**: Retrieves table lists, schema information, and sample data\n- ❌ **No write operations**: Cannot modify, add, or delete data\n- 🎯 **Backend development focused**: Provides exactly what's needed for backend implementation without the risk of data corruption\n\nWhen developing backend applications, you typically only need to understand the database structure. This server provides:\n\n1. **Table List**: Get all tables in the database\n2. **Schema Information**: Retrieve detailed schema for specific tables\n3. **Sample Data**: Fetch the first 5 rows from any table for validation\n\n## Features\n\n- 🔒 **Safe by design**: Read-only operations prevent accidental data modification\n- 🚀 **Simple setup**: Easy configuration via CLI arguments\n- 📊 **Three essential tools**:\n  - `list_tables`: Get a list of all tables in the database\n  - `get_table_schema`: Retrieve schema information for a specific table\n  - `get_table_data`: Fetch up to 5 sample rows from a table\n\n## Installation\n\n```bash\nnpm install @yukihito/mysql-mcp-server\n```\n\nor\n\n```bash\npnpm add @yukihito/mysql-mcp-server\n```\n\n## Usage\n\n### As an MCP Server\n\nConfigure your MCP client (e.g., Claude Desktop, Cline) to use this server:\n\n```json\n{\n  \"mcpServers\": {\n    \"mysql-mcp-server\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@yukihito/mysql-mcp-server@latest\",\n        \"--host\", \"localhost\",\n        \"--port\", \"3306\",\n        \"--name\", \"your_username\",\n        \"--password\", \"your_password\",\n        \"--database\", \"your_database\"\n      ]\n    }\n  }\n}\n```\n\n### CLI Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--host` | MySQL host | `localhost` |\n| `--port` | MySQL port | `8080` |\n| `--name` | Database username | `admin` |\n| `--password` | Database password | `root` |\n| `--database` | Database name | `database` |\n\n### Example Configuration for Claude Desktop\n\nEdit your Claude Desktop configuration file:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n\n**Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"mysql-mcp-server\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"@yukihito/mysql-mcp-server@latest\",\n        \"--host\", \"localhost\",\n        \"--port\", \"3306\",\n        \"--name\", \"myuser\",\n        \"--password\", \"mypassword\",\n        \"--database\", \"mydb\"\n      ]\n    }\n  }\n}\n```\n\n## Available Tools\n\n### 1. list_tables\n\nRetrieves a list of all tables in the connected database.\n\n**Input**: None\n\n**Output**: JSON array of table names\n\n**Example**:\n```json\n[\"users\", \"products\", \"orders\", \"categories\"]\n```\n\n### 2. get_table_schema\n\nGets detailed schema information for a specific table.\n\n**Input**:\n- `tableName` (string): Name of the table\n\n**Output**: JSON array containing column information (name, type, nullable, key, default, extra)\n\n**Example**:\n```json\n[\n  {\n    \"Field\": \"id\",\n    \"Type\": \"int\",\n    \"Null\": \"NO\",\n    \"Key\": \"PRI\",\n    \"Default\": null,\n    \"Extra\": \"auto_increment\"\n  },\n  {\n    \"Field\": \"name\",\n    \"Type\": \"varchar(255)\",\n    \"Null\": \"NO\",\n    \"Key\": \"\",\n    \"Default\": null,\n    \"Extra\": \"\"\n  }\n]\n```\n\n### 3. get_table_data\n\nRetrieves up to 5 rows from a specific table for validation purposes.\n\n**Input**:\n- `tableName` (string): Name of the table\n\n**Output**: JSON array of row objects (limited to 5 rows)\n\n**Example**:\n```json\n[\n  {\"id\": 1, \"name\": \"John Doe\", \"email\": \"john@example.com\"},\n  {\"id\": 2, \"name\": \"Jane Smith\", \"email\": \"jane@example.com\"}\n]\n```\n\n## Development\n\nFor development environment setup and contribution guidelines, see [DEVELOPMENT.md](./DEVELOPMENT.md).\n\n## License\n\nMIT\n\n## Author\n\nYukihito\n\n## Related Projects\n\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [designcomputer/mysql_mcp_server](https://github.com/designcomputer/mysql_mcp_server) - Alternative MySQL MCP server with full query execution capabilities\n","readmeFilename":"README.md"}