Schema Aware
Inspect tables, columns, keys, relationships, and referenced columns without leaving your MCP client.
Run a multi-dialect SQL MCP server over stdio with guarded queries, schema discovery, and structured tool outputs for AI workflows.
Install:
npm install -g ajan-sqlRun:
DATABASE_DIALECT=postgres \
DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/DB ajan-sqlMySQL:
DATABASE_DIALECT=mysql \
DATABASE_URL=mysql://USER:PASSWORD@HOST:PORT/DB ajan-sqlSQLite:
DATABASE_DIALECT=sqlite \
DATABASE_URL=file:/absolute/path/to/database.sqlite ajan-sqlDATABASE_DIALECT defaults to postgres. Supported values today are postgres, mysql, and sqlite.
Add ajan-sql to your MCP client as a stdio server:
{
"mcpServers": {
"ajan-sql": {
"command": "ajan-sql",
"env": {
"DATABASE_DIALECT": "postgres",
"DATABASE_URL": "postgres://USER:PASSWORD@HOST:PORT/DB"
}
}
}
}If your client should run a repository-local build instead of a globally installed binary, use:
{
"mcpServers": {
"ajan-sql": {
"command": "node",
"args": ["/absolute/path/to/ajan-sql/dist/index.js"],
"env": {
"DATABASE_DIALECT": "postgres",
"DATABASE_URL": "postgres://USER:PASSWORD@HOST:PORT/DB"
}
}
}
}For MySQL, set DATABASE_DIALECT to mysql. For SQLite, set DATABASE_DIALECT to sqlite and use a file URL such as file:/absolute/path/to/database.sqlite.
list_tablesdescribe_tablelist_relationshipsserver_infosearch_schemarun_readonly_queryexplain_querysample_rowsschema://snapshotschema://table/{name}Detailed resource payload examples are available in Resources.