1. Conduid
  2. Data
  3. DataLink
MCP server · Data

DataLink

MCP server for secure database access (PostgreSQL, MySQL, SQLite)

Unclaimed data
37Low

Scored 6 months ago · breakdown

About DataLink

DataLink is an MCP server published by pilat in the Data category: mCP server for secure database access (PostgreSQL, MySQL, SQLite).

The repository has 5 stars and 2 forks, with the last commit 12 hours ago. Recent commit activity is the strongest signal that reported issues will get attention.

Install

Claude Code
claude mcp add datalink -- npx -y @pilat/mcp-datalink
npx
npx -y @pilat/mcp-datalink

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (6)

describe_tableGet schema, indexes, foreign keys

Parameters not published.

executeRun INSERT/UPDATE/DELETE

Parameters not published.

explainShow query execution plans

Parameters not published.

list_databasesList configured database connections

Parameters not published.

list_tablesList tables with row counts

Parameters not published.

queryRun SELECT queries

Parameters not published.

Ask AI

✦

Ask AI about DataLink

Powered by Claude · Grounded in docs

I know everything about DataLink. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

@pilat/mcp-datalink

MCP server for PostgreSQL, MySQL, and SQLite. Gives AI assistants secure database access via Model Context Protocol.

npx @pilat/mcp-datalink

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):

{
  "mcpServers": {
    "datalink": {
      "command": "npx",
      "args": ["-y", "@pilat/mcp-datalink"],
      "env": {
        "DATALINK_ANALYTICS_URL": "postgresql://user:password@localhost:5432/analytics",
        "DATALINK_ANALYTICS_READONLY": "true",

        "DATALINK_INVENTORY_URL": "mysql://user:password@localhost:3306/inventory",

        "DATALINK_CACHE_URL": "sqlite:///path/to/cache.db"
      }
    }
  }
}

This creates three database connections: analytics (read-only), inventory, and cache.

Variable Description
DATALINK_{NAME}_URL Connection URL (creates database named {name})
DATALINK_{NAME}_READONLY Set to true to block writes
DATALINK_{NAME}_MAX_TIMEOUT Max query timeout in ms (caps model requests)

Connection URL formats:

# PostgreSQL
postgresql://user:password@localhost:5432/dbname
postgresql://user:password@localhost:5432/dbname?sslmode=require

# MySQL
mysql://user:password@localhost:3306/dbname
mysql://user:password@localhost:3306/dbname?ssl=true

# SQLite
sqlite:///path/to/database.db
sqlite:///Users/me/data/app.sqlite
sqlite://../relative/path/data.db

Environment Variable Substitution

URLs support ${VAR} syntax to reference other environment variables:

{
  "mcpServers": {
    "datalink": {
      "command": "npx",
      "args": ["-y", "@pilat/mcp-datalink"],
      "env": {
        "DATALINK_MAIN_URL": "${DATABASE_URL}"
      }
    }
  }
}

This allows reusing existing environment variables (like DATABASE_URL from your shell or .env file).

Supported syntax:

Syntax Description
${VAR} Expands to value of VAR, or keeps ${VAR} if unset
${VAR:-default} Expands to value of VAR, or default if unset

Examples:

# Reference existing DATABASE_URL
DATALINK_MAIN_URL="${DATABASE_URL}"

# Build URL from parts
DATALINK_MAIN_URL="postgresql://${DB_USER}:${DB_PASS}@${DB_HOST}:5432/mydb"

# With default values
DATALINK_MAIN_URL="postgresql://localhost:${DB_PORT:-5432}/mydb"

Config File Locations

Client Config file
Claude Code ~/.claude.json (global) or .mcp.json (project)
Claude Desktop (macOS) ~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows) %APPDATA%\Claude\claude_desktop_config.json
Cursor ~/.cursor/mcp.json or Settings → Features → MCP Servers
Cline cline_mcp_settings.json or VS Code settings cline.mcpServers

Tools

Tool Description
list_databases List configured database connections
list_tables List tables with row counts
describe_table Get schema, indexes, foreign keys
query Run SELECT queries
execute Run INSERT/UPDATE/DELETE
explain Show query execution plans

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_TIMEOUT caps it

License

MIT

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About DataLink

How do I install DataLink?

Run claude mcp add datalink -- npx -y @pilat/mcp-datalink, then add the server to your MCP client's configuration.

Is DataLink safe to use with an AI agent?

Its trust score is 37 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is DataLink still maintained?

Yes — the last commit was 12 hours ago. The repository has 5 stars and 2 forks.