Querk's MCP (Model Context Protocol) server exposes the same Postgres review pipeline you see at querk.io/analyze — but inside your editor. Wire it into Claude Desktop, Cursor, or Claude Code; ask the agent to review a query; get a senior-DBA-grade Markdown report back inline. No browser round-trip, no copy-paste shuffle.
| Surface | Name | What it does |
|---|---|---|
| Tool | review_query | Reviews a SQL query, EXPLAIN ANALYZE plan, or pgBadger log excerpt. Returns Markdown with the bottleneck, concrete CREATE INDEX DDL, query rewrites, and a verification command. |
| Resource | querk://review-spec | Quick reference for the tool, accessible from your IDE's resource browser. |
Download or clone the launcher, set up the venv, and drop the querk-mcp binary on your $PATH:
git clone https://github.com/medina-digital/querk-mcp-server.git cd querk-mcp-server python3 -m venv .venv .venv/bin/pip install -r requirements.txt sudo install -m 0755 ./bin/querk-mcp /usr/local/bin/querk-mcp
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) / %APPDATA%\Claude\claude_desktop_config.json (Windows) / ~/.config/Claude/claude_desktop_config.json (Linux):
{
"mcpServers": {
"querk": {
"command": "/usr/local/bin/querk-mcp"
}
}
}
Restart Claude Desktop. The querk server appears in the MCP panel.
Edit ~/.cursor/mcp.json (or per-project .cursor/mcp.json):
{
"mcpServers": {
"querk": {
"command": "/usr/local/bin/querk-mcp"
}
}
}
claude mcp add querk /usr/local/bin/querk-mcp
Or hand-edit ~/.claude.json with the same shape as above.
In any of those clients, ask:
Use the querk review_query tool to review this query: SELECT * FROM orders WHERE created_at > now() - interval '7 days' AND user_id = 42 ORDER BY created_at DESC LIMIT 50;
The agent calls the tool; the tool returns a Markdown review; the review lands in your conversation. Token-counted, with the same critic gate as the web pipeline.
Most Postgres slow-query reviews die at the copy-paste step. You spot a slow query in the dashboard, paste into a browser tab, paste the report back into your IDE, lose context. Pulling the review pipeline directly into the editor closes that loop. Same engine, same review quality, zero context-switching.
Backend keys stay server-side, on the host running the MCP launcher. Your IDE config never holds an API key — the launcher reads them from a local .env at startup.
Open source, MIT-style. Repo: github.com/medina-digital/querk-mcp-server (mirror of /var/www/querk-mcp-server).