{"id":44026,"library":"talk-sql","title":"talk-sql","description":"MCP (Model Context Protocol) server providing SQL database access for AI assistants like Cursor, Claude, and Copilot. Supports PostgreSQL, MySQL, SQL Server, SQLite, and IBM DB2 via unified tools (query, select, create table, etc.). Version 1.1.2 is current; released in 2025. Configuration via connection strings or JSON config files, with SSH tunnel support. Ships TypeScript types. Requires Node.js 18+. Differentiator: eliminates need for Docker or shell commands for AI database interaction; supports multiple database types and connections.","status":"active","version":"1.1.2","language":"javascript","source_language":"en","source_url":"https://github.com/Edavi11/talk-sql-mcp-server","tags":["javascript","mcp","sql","database","postgresql","mysql","sqlserver","sqlite","typescript"],"install":[{"cmd":"npm install talk-sql","lang":"bash","label":"npm"},{"cmd":"yarn add talk-sql","lang":"bash","label":"yarn"},{"cmd":"pnpm add talk-sql","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Native binding for SQLite support; optional — SQLite can be ignored if not used.","package":"better-sqlite3","optional":true}],"imports":[{"note":"Run directly without installing via npx; configure env TALK_SQL_CONFIG for multiple connections.","wrong":"npm run talk-sql","symbol":"talk-sql (CLI)","correct":"npx talk-sql"},{"note":"talk-sql is primarily a CLI server; if programmatic API exists, it's not documented. Use CLI or spawn child process.","wrong":"import talkSql from 'talk-sql'","symbol":"Programmatic use","correct":"import { Server } from '@modelcontextprotocol/sdk/server/index.js'; // then use talk-sql's Server subclass if exported"},{"note":"Config file must be a JSON array, even for one connection.","wrong":"// Single connection object without array","symbol":"Config file","correct":"// ~/talk-sql.config.json with array of connection objects"}],"quickstart":{"code":"// Create a config file ~/talk-sql.config.json:\n[\n  {\n    \"name\": \"local\",\n    \"connectionString\": \"postgresql://user:password@localhost:5432/mydb\"\n  },\n  {\n    \"name\": \"prod\",\n    \"connectionString\": \"postgresql://user:password@prod:5432/mydb\"\n  }\n]\n\n// Then run:\nTALK_SQL_CONFIG=~/talk-sql.config.json npx talk-sql\n\n// In your MCP client (e.g., Claude Desktop), configure:\n{\n  \"mcpServers\": {\n    \"talk-sql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"talk-sql\"],\n      \"env\": {\n        \"TALK_SQL_CONFIG\": \"/absolute/path/to/talk-sql.config.json\"\n      }\n    }\n  }\n}\n\n// AI tools: db_list_connections, db_ping, db_query, etc.","lang":"typescript","description":"Shows setup for multiple database connections using a config file and npx run, plus AI client configuration."},"warnings":[{"fix":"If SQLite not needed, no fix required. Otherwise install Windows Build Tools or use WSL.","message":"better-sqlite3 native binding may fail installation on Windows if missing build tools. You can safely ignore the error if not using SQLite.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set connectionString host to the internal host (e.g., localhost) accessible from the SSH server.","message":"Connection string host must be the host as seen from the SSH server when using SSH tunnel; use localhost if DB is on same machine as SSH endpoint.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Wrap your connection object in an array: [{...}].","message":"Config file must be a JSON array, not a single object. Providing a single object will cause errors.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use absolute path (e.g., /home/user/talk-sql.config.json).","message":"The TALK_SQL_CONFIG environment variable path must be absolute. Relative paths may not resolve correctly.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.1.2':39 '18':62 '2025':44 'access':12 'ai':14,72 'assist':15 'claud':18 'command':70 'config':51 'configur':45 'connect':47,80 'context':6 'copilot':20 'creat':35 'current':41 'cursor':17 'databas':11,73,77,84 'db2':29 'differenti':63 'docker':67 'elimin':64 'etc':37 'file':52 'ibm':28 'interact':74 'javascript':81 'json':50 'like':16 'mcp':4,82 'model':5 'multipl':76 'mysql':23,86 'need':65 'node.js':61 'postgresql':22,85 'protocol':7 'provid':9 'queri':33 'releas':42 'requir':60 'select':34 'server':8,25 'shell':69 'ship':57 'sql':3,10,24,83 'sqlite':26,88 'sqlserver':87 'ssh':54 'string':48 'support':21,56,75 'tabl':36 'talk':2 'talk-sql':1 'tool':32 'tunnel':55 'type':59,78 'typescript':58,89 'unifi':31 'version':38 'via':30,46","created_at":"2026-06-05T17:02:37.546966+00:00","updated_at":"2026-06-05T17:02:37.546966+00:00","problems":[{"fix":"Ignore if not using SQLite, or install prebuilt binaries with: npm install better-sqlite3 --build-from-source","cause":"Native binding not installed, often due to missing build tools on Windows.","error":"Error: Cannot find module 'better-sqlite3'"},{"fix":"Wrap the connection object in an array: [{ \"name\": \"...\", \"connectionString\": \"...\" }]","cause":"Config file is a single JSON object instead of an array of connections.","error":"Invalid configuration: expected array, got object"},{"fix":"Check SSH tunnel configuration and ensure connectionString host is correct from the SSH server's perspective.","cause":"Database host not reachable (e.g., SSH tunnel not set up or wrong host in connectionString).","error":"Connection refused: connect ECONNREFUSED"},{"fix":"Use npx talk-sql (without global install) or install globally: npm install -g talk-sql","cause":"Package not installed globally or npx not available.","error":"Error: talk-sql: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/Edavi11/talk-sql-mcp-server#readme","github":"https://github.com/Edavi11/talk-sql-mcp-server","docs":null,"changelog":null,"pypi":null,"npm":"talk-sql","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}