Server data from the Official MCP Registry
Query any database in plain English or SQL through a guardrailed, read-only data layer.
Query any database in plain English or SQL through a guardrailed, read-only data layer.
Well-structured MCP server with proper authentication, clear scope management, and good error handling. The server correctly requires an API key, validates it on startup, and passes scope information through to the backend API for fine-grained permission control. Code quality is high with appropriate input validation and no dangerous patterns detected. Minor observations around logging and input sanitization do not materially impact security. Supply chain analysis found 3 known vulnerabilities in dependencies (0 critical, 3 high severity). Package verification found 1 issue.
3 files analyzed · 8 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: AFD_API_KEY
Environment variable: AFD_API_BASE
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-dann26parr69-aifordatabase-mcp": {
"env": {
"AFD_API_KEY": "your-afd-api-key-here",
"AFD_API_BASE": "your-afd-api-base-here"
},
"args": [
"-y",
"aifordatabase-mcp"
],
"command": "npx"
}
}
}From the project's GitHub README.
Give your AI agent safe, plain-English access to any database — via MCP.
An MCP (Model Context Protocol) server for AI for Database. Ask questions in natural language and get SQL + results back, run read-only queries against Postgres/MySQL/MariaDB/MongoDB/SQL Server/SQLite, set up scheduled database alerts (email or webhook, including Slack), and check dashboards — all through scoped API keys instead of raw connection strings.
Why not a raw DB connection string? An agent with your connection string can drop tables, sees bare column names with no business meaning, and leaves no audit trail. This goes through scoped afd_ API keys instead: read-only guardrails, every query logged, canonical metric definitions.
You need an AFD_API_KEY — free at app.aifordatabase.com/signup: add a database connection (Connections → Add), then create an API key (Settings → API Keys) with the scopes you need (query, chat, connections, dashboards, workflows, usage — or *).
claude mcp add aifordatabase --env AFD_API_KEY=afd_your_key -- npx aifordatabase-mcp
{
"mcpServers": {
"aifordatabase": {
"command": "npx",
"args": ["aifordatabase-mcp"],
"env": { "AFD_API_KEY": "afd_your_key" }
}
}
}
| Variable | Required | Default | Purpose |
|---|---|---|---|
AFD_API_KEY | yes | — | Your afd_ Bearer key |
AFD_API_BASE | no | https://app.aifordatabase.com/api/v1 | API base URL override |
| Tool | What it does |
|---|---|
list_connections | List database connections (id, name, type, host, database) |
get_schema | Tables, columns, and relationships for a connection — one call, no discovery queries |
run_query | Run SQL directly. Deterministic, audited, no AI credits consumed |
ask | Plain-English question → SQL generated, executed, answer + results returned. Conversational via conversationId |
list_workflows | List scheduled alerts/reports |
create_workflow | SQL condition steps + EMAIL/WEBHOOK actions on a cron schedule (stopIfEmpty turns a query into an alert condition) |
run_workflow | Trigger a workflow immediately |
list_dashboards | List auto-refreshing dashboards |
get_usage | Remaining AI-credit budget — self-throttle before hitting a 402 |
Ask your agent: "List my database connections and show me the schema of the first one." It should call list_connections, then get_schema, and describe your tables — without you writing any SQL.
| HTTP | Meaning | What the server tells your agent |
|---|---|---|
| 401 | Bad/missing key | Check AFD_API_KEY starts with afd_ |
| 402 | AI credits exhausted | Fall back to run_query (no credits) or top up |
| 403 | Missing scope / plan limit | Names the missing scope |
| 422 | SQL error | The database's own error message, verbatim — fix and retry |
| 429 | Rate limited | 60 req/min free, 300 req/min Pro — back off |
Rows cap at 500 per response — aggregate in SQL rather than pulling raw tables.
Product: aifordatabase.com · API docs: app.aifordatabase.com/api/v1/docs · OpenAPI: /api/v1/openapi.json · Agent manifest: aifordatabase.com/api/agents
MIT © Dhrumil Barot
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Modelcontextprotocol · Developer Tools
Read, search, and manipulate Git repositories programmatically
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.