-
Notifications
You must be signed in to change notification settings - Fork 2
FAQ
hs-sql-agent is a high-performance MCP (Model Context Protocol) server that bridges AI agents with relational databases. It provides deterministic SQL generation, enterprise governance (access control, audit logging, rate limiting), and a built-in Admin Panel.
SQLite, PostgreSQL, MySQL, SQL Server, Oracle, and FireBird.
No. The AI agent handles SQL generation through structured parameters. The agent discovers database schemas via MCP tools and constructs queries deterministically.
- Run
docker compose up -dwith a configured.envfile - Open the Admin Panel at
http://localhost:8080 - Create an admin account
- Add a database connection in DB Management
- Issue an MCP key in MCP Keys
- Configure your AI client with the MCP key
Yes, for local development. See the Development guide.
-
8080: Main application (Admin Panel + MCP endpoint) -
3000: Frontend dev server (local development only)
Claude Desktop, VS Code (Cline/Roo), Cursor, and any MCP-compatible client.
Add the MCP server configuration with the URL http://localhost:8080/mcp and X-MCP-Server-Key header.
You'll need to issue a new key. Keys can be revoked from the Admin Panel at any time.
Database connection strings are encrypted at rest using AesGcm encryption.
All SQL is generated through SqlKata, which enforces automatic parameterization. LLM inputs are never concatenated into raw SQL.
Yes. The Table Whitelist feature in the Admin Panel lets you control which tables each key can access.
The project is in alpha stage but includes production guardrails like rate limiting, audit logging, and access control. Evaluate based on your requirements.
The backend uses:
- ASP.NET Core on .NET 10.0 for high throughput
- SHA256-hashed cache keys with stripe locking
- Background services for non-blocking audit writes
# Backend unit tests
dotnet test backend/src/UnitTest/Admin.Test/Admin.Test.csproj
# Backend integration tests (requires Docker)
dotnet test backend/src/UnitTest/SqlAgent.Test/SqlAgent.Test.csproj
# Frontend tests
cd frontend && pnpm testYes. Use the Custom SQL Tools feature in the Admin Panel to define parameterized SQL operations that are automatically exposed as MCP tools.
See the Contributing guide.
Check that:
-
HMAC_KEYandJWT_KEYare at least 32 bytes - The SQLite data directory has write permissions
- Port 8080 is not in use
Verify:
- Database server is reachable from the container
- Connection string is correct
- Firewall allows the connection
Check:
- The API key is valid and not revoked
- The key has allowed tools configured
- The MCP URL is correct (
http://host:8080/mcp) - The
X-MCP-Server-Keyheader is set
Audit logs are only written when MCP tools are executed. Try running a query first.
hs-sql-agent — GitHub | Apache License 2.0