linkit-sql
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., "@linkit-sql show me the first 10 rows from the users table in staging"
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.
linkit-dev-sql-mcp
MCP server for read-only SQL Server queries across LinkIt environments:
internal / staging / uat / preprod / prod / au.
Same UX as teamwork-mcp: connections are stored in the OS keychain
(or an AES-256-GCM encrypted file), so MCP client config files never contain secrets.
The first tool call without a configured env opens a local setup page where you
enter host + database + user + password per env (each connection is tested before saving).
Features
MCP server over stdio
Read-only by construction: only single
SELECT/WITH...SELECTstatements pass validation —INSERT/UPDATE/DELETE/MERGE, DDL, andEXECare blocked (inspect procedures withexplore/procedure_infoinstead of executing them). Still, prefer adb_datareaderlogin for defense in depth.Multi-env: every tool takes an explicit
envparam — there is no default, soprodis only touched when you sayenv="prod".Smart result guard:
maxRows(default 50, max 500), server-sideSET ROWCOUNTcap when your query has noTOP/OFFSET, long-text cell trimming, ~120 KB response byte-cap,truncatedflag + hints, opt-incountTotal.Catalog discovery for huge DBs: all
exploreactions are paginated (page/pageSize, max 100) withLIKEsearch — never dumps the whole catalog.Setup page + CLI (
auth/status/test/logout), CI overrides via env vars.
Related MCP server: MSSQL MCP Server
Install as a Claude Code / Cowork plugin (easiest, no config editing)
claude plugin marketplace add sondv5/linkit-dev-sql-mcp
claude plugin install linkit-sql@linkit-dev-sql-mcpThe first time anyone calls a SQL tool for an unconfigured env, the guided setup page opens automatically for them to enter their own per-env connections (stored locally in their OS keychain) — nothing to configure by hand.
Install / Run
npx -y linkit-dev-sql-mcp@latestThe first time you call any tool for an env with no connection, the server will:
Open your browser to a local setup page (
http://127.0.0.1:<port>/setup/<nonce>)You enter host + port + database + user + password for that env → the server tests the connection, then saves it
Retry the tool you just called — everything works, no restart needed
For local development:
npm install
npm run build
node dist/bin.jsA CLI is also available for terminal users:
npx -y linkit-dev-sql-mcp@latest auth # pick envs, enter connections, test and save
npx -y linkit-dev-sql-mcp@latest status # show configured envs
npx -y linkit-dev-sql-mcp@latest test # test connectivity (or: test prod)
npx -y linkit-dev-sql-mcp@latest logout # remove all stored connectionsMCP Client Config
{
"mcpServers": {
"linkit-sql": {
"command": "npx",
"args": ["-y", "linkit-dev-sql-mcp@latest"]
}
}
}Ready-made templates are included in this repository:
.cursor/mcp.json
.mcp.json
.codex/config.toml
opencode.json(See teamwork-mcp README for per-client instructions — same pattern, server name linkit-sql.)
Tools (3 grouped tools, action-dispatched)
Tool | Type | Actions (via |
| read |
|
| read |
|
| local |
|
Typical flow for a big unknown DB:
explore/list_databases(orsystem/statusto see what's configured)explore/search_objectswith a keyword, orexplore/list_tableswithsearchexplore/table_infofor the shortlistquery/selectwith a filteredSELECT ... WHERE ...and smallmaxRows
Environment Variables (optional, for CI)
Per-env overrides (they win over stored connections):
LINKIT_SQL_<ENV>_HOST / _PORT / _DB / _USER / _PASSWORD / _ENCRYPT / _TRUST_CERTENV is one of INTERNAL, STAGING, UAT, PREPROD, PROD, AU.
Note: env vars are plaintext — prefer the keychain for interactive use.
Security
The server is read-only at the SQL-text layer, but SQL Server cannot enforce that by itself — always connect with a read-only login (
db_datareader, nodb_owner/db_ddladmin), especially forprod.EXEC/sp_executesql/SELECT...INTOare blocked, so stored procedures can be inspected but not executed through this server.envis required on every tool — there is no implicit default env, so an agent cannot "accidentally" query prod while meaning staging.Never pass credentials via
argsinmcp.json(visible in process lists).The server only logs to stderr; stdout is reserved for JSON-RPC.
Dev
npm install
npm run build # tsc -> dist/
npm run dev # watch mode
node dist/bin.js --helpLicense
MIT
Available Tools
3 toolsexploreLinkIt SQL: exploreARead-only
Discover database objects with paginated, capped results (safe for catalogs with thousands of tables/procs): list_databases, list_tables, table_info (columns/keys/FKs/rowcount), list_views, list_procedures, procedure_info (params + definition), list_functions, function_info, search_objects.
Inputs: env (required), action (required), page, table, +6 more.
queryLinkIt SQL: queryARead-only
Run a READ-ONLY SELECT/WITH query against a LinkIt SQL Server env. INSERT/UPDATE/DELETE/DDL/EXEC are blocked. Results are auto-capped (maxRows default 50, max 500) with truncation hints; set countTotal for COUNT(*).
Inputs: env (required), sql (required), action, maxRows, +3 more.
systemLinkIt SQL: systemARead-only
Local connections: which envs are configured (status), test connectivity per env (test), remove all stored connections (logout).
Inputs: action (required), env.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools have clearly distinct purposes: query executes SQL, explore discovers schema/metadata, and system manages connections. There is no overlap in their core functions, so an agent can easily select the right tool.
Tool names are all single-word, lowercase, which is consistent in style. However, 'query' and 'explore' are verbs while 'system' is a noun, creating a minor deviation from a uniform verb-based pattern.
With only three tools, the server is well-scoped for its purpose. Each tool covers a broad but necessary area—querying, exploration, and system management—without unnecessary bloat or missing essentials.
For a read-only SQL server, the tool surface is complete: query handles data retrieval, explore provides full schema discovery (databases, tables, views, procedures, functions), and system manages connectivity. No obvious gaps exist within the stated domain.
Maintenance
Related MCP Connectors
Governed SQL access to your databases: redaction, query review and an audit log.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Ask your databases questions in plain English, run read-only SQL and set up data alerts.
Query your databases and build dashboards, Streamlit apps and reports your team logs in to.
Related MCP Servers
- AlicenseBqualityAmaintenanceEnables secure database operations on SQL Server instances through a three-tier safety system, supporting schema exploration, query execution, performance analysis, and data export with configurable security levels from read-only to full development access.216204 npm6MIT
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Microsoft SQL Server databases using Windows Authentication, enabling AI assistants to safely explore schemas and query data with built-in security controls.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Microsoft SQL Server databases through T-SQL query execution, table exploration, and schema inspection. Supports configurable write protection and row limiting for safe database operations.655 npmMIT
- FlicenseNot gradedqualityDmaintenanceProvides secure, read-only access to Microsoft SQL Server with multi-layer protection, enabling safe query execution, schema discovery, and SQL script analysis through natural language.2-