
DataLink
io.github.pilatPublished by GitHub account pilatv1.2.4Updated Oct 24, 2026
MCP server for secure database access (PostgreSQL, MySQL, SQLite)
Overview
A local MCP server that gives an AI assistant secure access to PostgreSQL, MySQL and SQLite databases for schema inspection, queries and writes.
- What you can do
- List configured database connections and their tables with row counts, and describe table schemas, indexes and foreign keys across PostgreSQL, MySQL and SQLite connections defined by environment variables. Run SELECT queries and view query execution plans. Run INSERT, UPDATE and DELETE statements on connections that are not marked read-only. Apply per-connection safeguards such as prepared statements, single-statement queries, blocked DDL, row and size limits, and query timeouts.
- When to use it
- Useful when an assistant needs to explore or query one or more relational databases during development or analysis, especially when you want several named connections with per-connection read-only control and built-in limits on result size and query time.
- Requirements
- Runs locally via npx with Node.js. Each database is configured with a DATALINK_ _URL environment variable (PostgreSQL, MySQL or SQLite URL or file path); optional DATALINK_ _READONLY and DATALINK_ _MAX_TIMEOUT variables control writes and timeouts. URLs may reference other environment variables with ${VAR} syntax. Network access to the database hosts is required.
Installation
In SourceWeft
- Open DataLink in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@pilat/mcp-datalink
MCP server for PostgreSQL, MySQL, and SQLite. Gives AI assistants secure database access via Model Context Protocol.
Works with Claude Desktop, Claude Code, Cursor, Cline, and any MCP-compatible client.
Installation
Add to your MCP client config file (see config locations below):
This creates three database connections: analytics (read-only), inventory, and cache.
Connection URL formats:
Environment Variable Substitution
URLs support ${VAR} syntax to reference other environment variables:
This allows reusing existing environment variables (like DATABASE_URL from your shell or .env file).
Supported syntax:
Examples:
Config File Locations
Tools
Security
- Prepared statements only (no SQL injection)
- Single statement per query (no chaining)
- DDL blocked (no DROP, ALTER, TRUNCATE)
- Readonly mode per connection
- Response size limit (100 rows, 64KB default, configurable via
DATALINK_MAX_TOTAL_SIZE) - Query timeout: 30s default, model can request up to 10min,
MAX_TIMEOUTcaps it
License
MIT
Source: README.md at commit 1a643a5
Tools
0Version history
1- v1.2.4LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts