logo
icon

hs-sql-agent

hs-sql-agent is an HTTP MCP server for relational databases with an integrated admin panel.

template cover
Deployed21 times
Publishertse-wei-chen
Created2026-04-08
Tags
MCPMCP ServerSQLPostgreSQLSQL Agenths-sql-agent

hs-sql-agent

Deploy your own HTTP MCP server for relational databases with a built-in administration panel. hs-sql-agent allows MCP clients such as Claude Desktop, Cursor, and Visual Studio Code to securely access relational databases while giving administrators centralized control over database connections, MCP keys, permissions, audit logs, and security policies. This Zeabur template automatically deploys:

  • hs-sql-agent — MCP server and administration panel
  • PostgreSQL — internal administration database
  • Redis — caching, rate limiting, concurrency control, and security policy synchronization

✨ Features

  • 🔌 HTTP MCP endpoint
  • 🔑 Per-client MCP access keys
  • 🗄️ Multiple database connections
  • 🔐 Per-key database mapping
  • 🧰 Per-key MCP tool permissions
  • 🚦 Configurable rate limits
  • 📋 SQL execution audit logs
  • 🛡️ Centralized security policies
  • ⚡ Redis-backed caching and concurrency control
  • 🖥️ Built-in administration panel
  • 📋 Ready-to-copy MCP client configurations

🚀 Getting Started

1. Deploy the Template

Deploy this template on Zeabur and choose a subdomain for the administration panel. Zeabur automatically provisions and connects all required services. Once deployment is complete, open the Admin Panel URL shown in the Zeabur deployment instructions.

2. Create the Administrator Account

On the first launch, create the initial administrator account and sign in to the admin panel.

3. Add a Database

Open DB Management and add the relational database you want MCP clients to access. Test the connection before issuing an MCP key.

4. Issue an MCP Access Key

Open: Runtime Admin → MCP Keys Create a new MCP key and configure its access settings, including:

  • Key name
  • Expiration
  • Database
  • Rate limit
  • Allowed MCP tools
  • Optional data-access restrictions
  • Optional CORS origins Click Test DB Connection to verify the selected database, then click Issue Key.

5. Copy Your MCP Configuration

After the key is issued, hs-sql-agent immediately displays a Save and connect dialog containing:

  • The one-time MCP key
  • Your MCP endpoint
  • Ready-to-use configuration for supported MCP clients Choose your client:
  • Claude Desktop
  • Cursor
  • Visual Studio Code
  • Generic HTTP Then click the corresponding Copy config button and paste the configuration into your MCP client.

⚠️ The MCP key is shown in plaintext only once. > > Save the key or copy the generated client configuration before closing the dialog. Once closed, the plaintext key cannot be retrieved again from the Admin UI. That's it — no manual endpoint or header configuration is required.

🔐 Security

Treat MCP keys as secrets. Do not commit generated configurations containing MCP keys to source control, paste them into public issue trackers, or share them publicly. If a key is exposed, revoke it from the MCP Keys page and issue a replacement. For production databases, use dedicated database accounts with the minimum permissions required for the intended MCP tools.

⚠️ Project Status

hs-sql-agent is currently under active development. Features and configuration options may change between releases, and bugs may still occur. If you encounter a problem or have a feature request: