Rowsafe — Claude Code MCP server: database checks and setup
Rowsafe lets an AI agent inspect database health and prepare fixes for review. Use it to investigate database issues or check a migration before running it.
claude mcp add --transport http rowsafe https://api.rowsafe.sh/mcpWhat Rowsafe does
Rowsafe exposes database operations to an agent: health checks, schema inspection, slow-query explanations, and migration checks for locks and data rewrites. An agent can apply a fix after you approve it. The server also supports recording changes and creating restore points called Marks.
For a local connection, run rowsafe mcp shop --allow-writes; shop is the database name in this example, and the flag enables writes. The database connection string supplies access. Commands work through a pooler, but fixes that execute inside the database do not. Rowsafe supports PostgreSQL, MySQL, MariaDB, MongoDB, Redis, and Valkey; available operations vary by database.
What it helps with
- check database health and identify issues
- inspect tables, columns, and indexes
- find why a SQL query is slow
- check a migration for locks and data rewrites
- review a proposed fix before applying it
Example prompts for the agent
- Check the health of
shopand suggest a fix. - Show the tables and indexes in the
shopdatabase. - Check
0042.sqlfor locks and data rewrites before I run it.
How to install Rowsafe
Platform CLI: remote server
claude mcp add --transport http rowsafe https://api.rowsafe.sh/mcpPlatform CLI: remote server
codex mcp add mcp --url https://api.rowsafe.sh/mcpConfig file
{
"mcpServers": {
"mcp": {
"url": "https://api.rowsafe.sh/mcp"
}
}
}Config file
{
"servers": {
"mcp": {
"type": "http",
"url": "https://api.rowsafe.sh/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http mcp https://api.rowsafe.sh/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Rowsafe
How do I install Rowsafe in Claude Code?
Run both commands in order: claude mcp add --transport http rowsafe https://api.rowsafe.sh/mcp, then claude mcp add --transport http mcp https://api.rowsafe.sh/mcp.
What does Rowsafe do?
It gives an agent access to database health checks, schema inspection, and query and migration analysis. Fixes require your approval before they are applied.
Does Rowsafe work through a database pooler?
Commands work through a pooler, but fixes that run inside the database do not.