{"versions":{"0.1.0":{"name":"@f4ww4z/mcp-mysql-server","version":"0.1.0","description":"A Model Context Protocol server for MySQL database operations","type":"module","bin":{"mcp-mysql":"build/index.js"},"scripts":{"build":"tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"","prepare":"npm run build","watch":"tsc --watch","inspector":"npx @modelcontextprotocol/inspector build/index.js"},"keywords":["mcp","model-context-protocol","mysql","database","claude","anthropic"],"author":{"name":"f4ww4z"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"0.6.0","dotenv":"^16.4.7","mysql2":"^3.11.5"},"devDependencies":{"@types/node":"^20.11.24","typescript":"^5.3.3"},"repository":{"type":"git","url":"git+https://github.com/f4ww4z/mcp-mysql-server.git"},"publishConfig":{"access":"public"},"_id":"@f4ww4z/mcp-mysql-server@0.1.0","gitHead":"efea601640526e0bcef07b4d096e83a1ff1e189e","bugs":{"url":"https://github.com/f4ww4z/mcp-mysql-server/issues"},"homepage":"https://github.com/f4ww4z/mcp-mysql-server#readme","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-WEbLZpFEQ0gjCQO/T3Xzobb5wzq5VvSE98WH509ke82/Me81+yeNN9iHBswzO3pQsXBHEIhRHUzex0RcIQsYIw==","shasum":"b8000cb2a278e3edf81be3825c04bcb9c3790c68","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@f4ww4z/mcp-mysql-server/-/mcp-mysql-server-0.1.0.tgz","fileCount":4,"unpackedSize":15656,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGf11rfhZJaj4rDCujd41GvVUWox2IY5pQknpvZI1PT7AiA9jntXQN9+sN8YdeDEmbyC9dkfeKP1UNPuX3TuglurGQ=="}],"size":4011},"_npmUser":{"name":"anonymous","email":"fawwazyusran@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"fawwazyusran@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-mysql-server_0.1.0_1734083361564_0.40027810420570553"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2024-12-13T09:49:21.735Z","publish_time":1734083361735,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"0.1.0"},"name":"@f4ww4z/mcp-mysql-server","time":{"created":"2024-12-13T11:13:09.442Z","modified":"2024-12-13T11:13:10.594Z","0.1.0":"2024-12-13T09:49:21.735Z"},"readme":"# @f4ww4z/mcp-mysql-server\n\nA Model Context Protocol server that provides MySQL database operations. This server enables AI models to interact with MySQL databases through a standardized interface.\n\n## Installation\n\n```bash\nnpx @f4ww4z/mcp-mysql-server\n```\n\n## Configuration\n\nThe server requires the following environment variables to be set in your MCP settings configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"mysql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@f4ww4z/mcp-mysql-server\"],\n      \"env\": {\n        \"MYSQL_HOST\": \"your_host\",\n        \"MYSQL_USER\": \"your_user\",\n        \"MYSQL_PASSWORD\": \"your_password\",\n        \"MYSQL_DATABASE\": \"your_database\"\n      }\n    }\n  }\n}\n```\n\n## Available Tools\n\n### 1. connect_db\nEstablish connection to MySQL database using provided credentials.\n\n```typescript\nuse_mcp_tool({\n  server_name: \"mysql\",\n  tool_name: \"connect_db\",\n  arguments: {\n    host: \"localhost\",\n    user: \"your_user\",\n    password: \"your_password\",\n    database: \"your_database\"\n  }\n});\n```\n\n### 2. query\nExecute SELECT queries with optional prepared statement parameters.\n\n```typescript\nuse_mcp_tool({\n  server_name: \"mysql\",\n  tool_name: \"query\",\n  arguments: {\n    sql: \"SELECT * FROM users WHERE id = ?\",\n    params: [1]\n  }\n});\n```\n\n### 3. execute\nExecute INSERT, UPDATE, or DELETE queries with optional prepared statement parameters.\n\n```typescript\nuse_mcp_tool({\n  server_name: \"mysql\",\n  tool_name: \"execute\",\n  arguments: {\n    sql: \"INSERT INTO users (name, email) VALUES (?, ?)\",\n    params: [\"John Doe\", \"john@example.com\"]\n  }\n});\n```\n\n### 4. list_tables\nList all tables in the connected database.\n\n```typescript\nuse_mcp_tool({\n  server_name: \"mysql\",\n  tool_name: \"list_tables\",\n  arguments: {}\n});\n```\n\n### 5. describe_table\nGet the structure of a specific table.\n\n```typescript\nuse_mcp_tool({\n  server_name: \"mysql\",\n  tool_name: \"describe_table\",\n  arguments: {\n    table: \"users\"\n  }\n});\n```\n\n## Features\n\n- Secure connection handling with automatic cleanup\n- Prepared statement support for query parameters\n- Comprehensive error handling and validation\n- TypeScript support\n- Automatic connection management\n\n## Security\n\n- Uses prepared statements to prevent SQL injection\n- Supports secure password handling through environment variables\n- Validates queries before execution\n- Automatically closes connections when done\n\n## Error Handling\n\nThe server provides detailed error messages for common issues:\n- Connection failures\n- Invalid queries\n- Missing parameters\n- Database errors\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request to https://github.com/f4ww4z/mcp-mysql-server\n\n## License\n\nMIT","users":{}}