claw-factory/truss-db-mcp
Database query MCP server — natural language SQL, schema exploration, query optimization, migration generation
Platform-specific configuration:
{
"mcpServers": {
"truss-db-mcp": {
"command": "npx",
"args": [
"-y",
"truss-db-mcp"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
[](https://www.npmjs.com/package/truss-db-mcp) [](https://opensource.org/licenses/MIT)
Database query MCP server for Claude Code. Connect to SQLite, PostgreSQL, or MySQL databases directly from your AI assistant.
Run with npx (no install needed):
npx -y truss-db-mcpAdd to your claude_desktop_config.json or .claude/settings.json:
{
"mcpServers": {
"db-query": {
"command": "npx",
"args": ["-y", "truss-db-mcp"]
}
}
}Add to your Cursor MCP settings:
{
"mcpServers": {
"db-query": {
"command": "npx",
"args": ["-y", "truss-db-mcp"]
}
}
}---
| Tool | Description | |------|-------------| | connect | Connect to a SQLite database file | | list_tables | List all tables with row counts and column info | | describe_table | Detailed schema: columns, types, indexes, foreign keys | | query | Execute read-only SQL queries (SELECT) |
| Tool | Description | |------|-------------| | natural_language_query | Ask questions in plain English, get SQL + results | | optimize_query | EXPLAIN analysis with index suggestions | | generate_migration | Generate up/down SQL migrations from descriptions | | export_data | Export query results as CSV or JSON |
| Variable | Required | Description | |----------|----------|-------------| | TRUSS_LICENSE_KEY | No | Pro license key | | ANTHROPIC_API_KEY | Pro | For AI-powered features (natural language query, migration generation) | | OPENAI_API_KEY | Pro | Alternative AI provider | | DATABASE_URL | No | Connection URL for PostgreSQL/MySQL (Pro) |
Use the connect tool with path: "./my-app.db"``
Loading reviews...