{"_id":"@ahmad3244/sql-mcp-server","_rev":"2-bf5c1f6a9fd029296e51fe7f74434ef7","name":"@ahmad3244/sql-mcp-server","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@ahmad3244/sql-mcp-server","version":"1.0.0","keywords":["mcp","model-context-protocol","mysql","mariadb","postgres","postgresql","sqlite","sql","database","ai","llm","copilot","vscode"],"author":{"name":"Ahmad","email":"ahmad5599@github.com"},"license":"MIT","_id":"@ahmad3244/sql-mcp-server@1.0.0","maintainers":[{"name":"ahmad1711","email":"ahmadhamid3244@gmail.com"}],"homepage":"https://github.com/ahmad5599/mysql-mcp-server#readme","bugs":{"url":"https://github.com/ahmad5599/mysql-mcp-server/issues"},"bin":{"mysql-mcp-server":"server.js"},"dist":{"shasum":"34880b3f90d5b6b2669230d4efc2159d130b06c7","tarball":"https://registry.npmjs.org/@ahmad3244/sql-mcp-server/-/sql-mcp-server-1.0.0.tgz","fileCount":21,"integrity":"sha512-S6l91nnWZpTNJgZXMFwzJEYrh7RdzSP2OHjJBOnHh6RcBARmEGxGCRpXgfFQXhrWUmSNRwxWeOepM0XHM8mdVQ==","signatures":[{"sig":"MEQCIDYNagFoKoAKrNmqXWBMfIOI0lQWb8m3QQu6wupiMighAiBAUVsJPYyte0gr0zaouWF2UI2XgmMu1kZCGU1m5r4yhg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":53111},"main":"server.js","engines":{"node":">=20.19.0"},"gitHead":"77cac12d32198a619d216e3ef0604a1d7457d3f1","scripts":{"test":"node scripts/integration-sqlite.js","start":"node server.js"},"_npmUser":{"name":"ahmad1711","email":"ahmadhamid3244@gmail.com"},"repository":{"url":"git+https://github.com/ahmad5599/mysql-mcp-server.git","type":"git"},"_npmVersion":"10.9.3","description":"MCP server for SQL databases (MySQL, PostgreSQL, SQLite)","directories":{},"_nodeVersion":"22.20.0","dependencies":{"pg":"^8.16.3","knex":"^3.1.0","uuid":"^9.0.1","yargs":"^17.7.2","dotenv":"^16.4.5","mysql2":"^3.11.0","express":"^4.19.2","sqlite3":"^5.1.7","pg-format":"^1.0.4","@modelcontextprotocol/sdk":"^1.18.2"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/sql-mcp-server_1.0.0_1763856000818_0.8609076371412083","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@ahmad3244/sql-mcp-server","version":"1.0.2","description":"MCP server for SQL databases (MySQL, PostgreSQL, SQLite)","main":"server.js","bin":{"mysql-mcp-server":"server.js"},"scripts":{"start":"node server.js","test":"node scripts/integration-sqlite.js"},"keywords":["mcp","model-context-protocol","mysql","mariadb","postgres","postgresql","sqlite","sql","database","ai","llm","copilot","vscode"],"author":{"name":"Ahmad","email":"ahmad5599@github.com"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.18.2","dotenv":"^16.4.5","express":"^4.19.2","knex":"^3.1.0","mysql2":"^3.11.0","pg":"^8.16.3","pg-format":"^1.0.4","sqlite3":"^5.1.7","uuid":"^9.0.1","yargs":"^17.7.2"},"repository":{"type":"git","url":"git+https://github.com/ahmad5599/mysql-mcp-server.git"},"bugs":{"url":"https://github.com/ahmad5599/mysql-mcp-server/issues"},"homepage":"https://github.com/ahmad5599/mysql-mcp-server#readme","engines":{"node":">=20.19.0"},"_id":"@ahmad3244/sql-mcp-server@1.0.2","gitHead":"307bd7d0634eb1578843a74f0baee1e6d48571f4","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-NTByaXlHm6pG/RY1qLjbIi4ln15iIQ8mDxU77VGCz5d9HRS+omA35lIzKnyOMpCxzN2D6Zhe8k6AWO/6ucXdpQ==","shasum":"4f3e40c4306fc0ae6e6c635fc088150ba6b8b43d","tarball":"https://registry.npmjs.org/@ahmad3244/sql-mcp-server/-/sql-mcp-server-1.0.2.tgz","fileCount":21,"unpackedSize":53851,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDcMorzEzghRl1+JoG5cGx0oiNZhqhZQZHzdPQkZ2oJwgIhANODu5cPOvxVnmY2OOQZzSNPJT4XoS4WXnxLl9zYD0Iv"}]},"_npmUser":{"name":"ahmad1711","email":"ahmadhamid3244@gmail.com"},"directories":{},"maintainers":[{"name":"ahmad1711","email":"ahmadhamid3244@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sql-mcp-server_1.0.2_1763856813369_0.5107230504591855"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-23T00:00:00.731Z","modified":"2025-11-23T00:13:33.823Z","1.0.0":"2025-11-23T00:00:01.009Z","1.0.2":"2025-11-23T00:13:33.624Z"},"bugs":{"url":"https://github.com/ahmad5599/mysql-mcp-server/issues"},"author":{"name":"Ahmad","email":"ahmad5599@github.com"},"license":"MIT","homepage":"https://github.com/ahmad5599/mysql-mcp-server#readme","keywords":["mcp","model-context-protocol","mysql","mariadb","postgres","postgresql","sqlite","sql","database","ai","llm","copilot","vscode"],"repository":{"type":"git","url":"git+https://github.com/ahmad5599/mysql-mcp-server.git"},"description":"MCP server for SQL databases (MySQL, PostgreSQL, SQLite)","maintainers":[{"name":"ahmad1711","email":"ahmadhamid3244@gmail.com"}],"readme":"# SQL MCP Server\n\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.19.0-brightgreen.svg)](https://nodejs.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n[![MCP Protocol](https://img.shields.io/badge/MCP-1.18.2-blue.svg)](https://modelcontextprotocol.io/)\n\nA production-ready Model Context Protocol (MCP) server with VS Code extension that enables AI assistants to interact with SQL databases (MySQL, MariaDB, PostgreSQL, SQLite) through natural language queries.\n\n## 🌟 Features\n\n- **🎯 MCP SDK Integration** – Built on `@modelcontextprotocol/sdk` v1.18.2 with full JSON-RPC support\n- **🔌 Multi-Database Support** – Unified interface for MySQL/MariaDB, PostgreSQL, and SQLite\n- **🛡️ Security First** – Read-only mode by default, prepared statements, identifier sanitization\n- **🚀 VS Code Extension** – Interactive configuration wizard with profile management\n- **📊 Structured Logging** – Multi-channel logging (stderr, disk, MCP console)\n- **🐳 Docker Ready** – Production-optimized containerized deployment\n- **🧪 Tested** – Comprehensive integration tests for all drivers\n\n## 📋 Table of Contents\n\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Quick Start](#quick-start)\n- [VS Code Extension](#vs-code-extension)\n- [Configuration](#configuration)\n- [Available Tools](#available-tools)\n- [Docker Deployment](#docker-deployment)\n- [Testing](#testing)\n- [Troubleshooting](#troubleshooting)\n- [Security](#security)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Prerequisites\n\n- **Node.js** ≥ 20.19.0\n- One of the following databases:\n  - MySQL ≥ 5.7 or MariaDB ≥ 10.3\n  - PostgreSQL ≥ 12\n  - SQLite ≥ 3.x (bundled `test.db` included for quick trials)\n- **VS Code** ≥ 1.80.0 (optional, for extension usage)\n\n## Installation\n\n### Server Installation\n\n**Option 1: Install from npm (Recommended)**\n\\`\\`\\`bash\nnpm install -g @ahmad3244/sql-mcp-server\n# Or use without installing\nnpx @ahmad3244/sql-mcp-server\n\\`\\`\\`\n\n**Option 2: Install from GitHub Release**\n\\`\\`\\`bash\nnpm install https://github.com/ahmad5599/mysql-mcp-server/releases/download/v1.0.0/mysql-mcp-server-1.0.0.tgz\n\\`\\`\\`\n\n**Option 3: Clone and build from source**\n\\`\\`\\`bash\ngit clone https://github.com/ahmad5599/mysql-mcp-server.git\ncd mysql-mcp-server\nnpm install\nnpm test\n\\`\\`\\`\n\n### VS Code Extension Installation\n\n**Option 1: Download from GitHub Release (Recommended)**\n\\`\\`\\`bash\n# Download the VSIX\nwget https://github.com/ahmad5599/mysql-mcp-server/releases/download/v1.0.0/sql-mcp-extension-1.0.0.vsix\n\n# Install the extension\ncode --install-extension sql-mcp-extension-1.0.0.vsix\n\\`\\`\\`\n\n**Option 2: Build from source**\n\\`\\`\\`bash\ncd extension\nnpm install\nnpx vsce package\ncode --install-extension mysql-mcp-extension.vsix\n\\`\\`\\`\n\n## Quick Start\n\n### 1. Using SQLite (No Setup Required)\n\n\\`\\`\\`bash\n# If installed globally\nMYSQL_MCP_CONNECTION_STRING=\"sqlite:///path/to/database.db\" mysql-mcp-server\n\n# Using npx\nMYSQL_MCP_CONNECTION_STRING=\"sqlite:///path/to/database.db\" npx @ahmad3244/sql-mcp-server\n\n# From source\nMYSQL_MCP_CONNECTION_STRING=\"sqlite://\\$(pwd)/test.db\" node server.js\n\\`\\`\\`\n\n### 2. Using MySQL/MariaDB\n\n\\`\\`\\`bash\nMYSQL_MCP_CONNECTION_STRING=\"mysql://user:password@localhost:3306/database\" npx @ahmad3244/sql-mcp-server\n\\`\\`\\`\n\n### 3. Using PostgreSQL\n\n\\`\\`\\`bash\nMYSQL_MCP_CONNECTION_STRING=\"postgres://user:password@localhost:5432/database\" npx @ahmad3244/sql-mcp-server\n\\`\\`\\`\n\n### 4. Using Docker\n\n\\`\\`\\`bash\ndocker run --rm \\\\\n  -e MYSQL_MCP_CONNECTION_STRING=\"mysql://user:pass@host.docker.internal:3306/db\" \\\\\n  ahmad5599/sql-mcp-server:latest\n\\`\\`\\`\n\n## VS Code Extension\n\n### Setup Wizard\n\n1. Open Command Palette: \\`Ctrl+Shift+P\\` (Windows/Linux) or \\`Cmd+Shift+P\\` (Mac)\n2. Type: **\"Configure SQL MCP Connection\"**\n3. Follow the wizard:\n   - Select database type (SQLite, MySQL, PostgreSQL)\n   - Enter profile name (e.g., \"my-production-db\")\n   - Enter connection string\n\n### Connection String Formats\n\n**SQLite:**\n\\`\\`\\`\nsqlite:///absolute/path/to/database.db\n\\`\\`\\`\n\n**MySQL/MariaDB:**\n\\`\\`\\`\nmysql://username:password@host:port/database\n\\`\\`\\`\n\n**PostgreSQL:**\n\\`\\`\\`\npostgres://username:password@host:port/database\n\\`\\`\\`\n\n### Using in Chat\n\nOnce configured, use the MCP tools in your AI chat:\n\n\\`\\`\\`\n#mcp_ahmad_sql-gat_list-tables\n\\`\\`\\`\n\n\\`\\`\\`\n#mcp_ahmad_sql-gat_query query: SELECT * FROM users LIMIT 10\n\\`\\`\\`\n\nFor complete documentation, see the full README.\n\n## Testing\n\n\\`\\`\\`bash\nnpm test\n\\`\\`\\`\n\n## Security\n\n- ✅ Read-only mode by default\n- ✅ Prepared statements\n- ✅ Identifier sanitization\n- ✅ Automatic row limits\n\n## License\n\nMIT License - see [LICENSE](./LICENSE) file for details.\n","readmeFilename":"README.md"}