aifordatabase-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AFD_API_KEY | Yes | Your afd_ Bearer key | |
| AFD_API_BASE | No | API base URL override | https://app.aifordatabase.com/api/v1 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_connectionsA | List the database connections available to this API key. Returns id, name, type (POSTGRES/MYSQL/MARIADB/MSSQL/MONGODB/SQLITE), host, database, isActive. Use the returned id as connectionId in other tools. |
| get_schemaA | Get the cached schema (tables, columns, relationships) of a database connection. Call this once before writing SQL — no discovery queries needed. |
| run_queryA | Run a SQL query directly against a database connection. Deterministic, no AI in the loop, no credits consumed. Returns columns, rows, rowCount, executionTime. On a SQL error the database's own message is returned — fix the SQL and retry. Rows cap at 500, so aggregate in SQL rather than pulling raw tables. |
| askA | Ask a question about a database in plain English. The API's own agent translates it to SQL, runs it, and returns the answer (content), the SQL used (sqlQuery), and the results (queryResult). For follow-up questions, pass the conversationId from the previous response. Consumes AI credits — for repeated/known queries prefer run_query. |
| list_workflowsA | List workflows (scheduled database alerts / reports). Returns each workflow with its trigger type and step/action counts. |
| create_workflowA | Create a workflow: SQL steps + EMAIL/WEBHOOK actions, run manually or on a cron schedule. To make an alert, write a step query that only returns rows when the condition fires and set stopIfEmpty=true — actions then run only when rows come back. Step results are auto-appended to the email/webhook payload. Point a WEBHOOK at a Slack incoming-webhook URL for Slack alerts. Free plan allows 3 workflows. |
| run_workflowA | Run a workflow immediately (regardless of its schedule) and return the run record with its status. |
| list_dashboardsB | List dashboards. Dashboards re-run their widget queries on schedule server-side. To create one, the fastest path is the ask tool: 'create a dashboard showing revenue by month' with a connectionId. |
| get_usageA | Get the current AI-credit budget: included, topUp, used, and remaining (in cents) for the current billing period. Check this to self-throttle ask calls before hitting a 402. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 9 tools
Every tool has a clearly distinct purpose. 'ask' and 'run_query' are differentiated by AI usage vs direct SQL. Workflow tools (create_workflow, list_workflows, run_workflow) are separate from schema, connection, dashboard, and usage tools. No overlap.
All tools use snake_case with a consistent verb_noun pattern: 'ask', 'create_workflow', 'get_schema', 'list_connections', etc. The naming is predictable and follows a clear convention.
With 9 tools, the set is well-scoped for a database management MCP server covering queries (AI-assisted and direct), schema inspection, connection listing, dashboards, workflows, and usage monitoring. Each tool earns its place.
The tool surface covers core operations: querying, schema, connections, dashboards, workflows, and usage. Minor gaps exist: no update/delete for workflows or dashboards (though creation is possible via 'ask' for dashboards). Overall, the set is largely complete for its intended purpose.