Tarka

About

What is Tarka

Tarka is a free, native macOS client for PostgreSQL and Snowflake with a built-in MCP server, so coding agents such as Claude Code, Codex and Cursor can query your databases while you watch every statement and approve every write.

Tarka is a desktop query tool for builders who work with an AI coding agent. The agent connects to Tarka over the Model Context Protocol and runs the queries; Tarka shows each one live, with the agent's reasoning, the SQL, the plan and the result, and holds every write on staging or production until you approve it. There is no model inside Tarka and no API key to configure: the agent lives in your terminal or editor, Tarka is the shared workspace.

It is also a clean database client on its own: a schema explorer, query tabs with history and templates, a result grid with a row inspector, charts and a focus mode, without the clutter of the older tools.

How it works

  1. Install Tarka, sign in, and add a database connection. Tag it local, dev, staging or production; the tag decides how much an agent may do without asking.
  2. Open Settings → Agents, pick your agent, and add the Tarka MCP server with the one-step button or the command shown there. For Claude Code, Codex and Pi that is a one-line mcp add command; for Cursor an install link; for the others a snippet for their config file.
  3. Ask the agent a question about your data. Its calls appear in Tarka as steps in a session tab: the reasoning it gave, the SQL, the plan or the result. Take over by hand at any point, or let it continue.
  4. Everything runs on your Mac. The agent harness launches a small bridge that talks to the running app over a local socket; no query, credential or row leaves your machine through Tarka.

Agents it works with

Claude Code, Codex, Cursor, Pi, VS Code, Gemini CLI, opencode, and any other MCP client that can launch a stdio server. Settings → Agents has the exact command or config for each.

What an agent can do

The MCP server exposes these tools:

  • list_connections: the databases Tarka knows, with engine and tag
  • execute_query: run SQL; EXPLAIN by default, execute on request, with the agent's reasoning shown live
  • analyze_query: EXPLAIN ANALYZE with a bottleneck analysis (PostgreSQL)
  • profile_table: column and table statistics
  • get_table_ddl: the CREATE statement for a table or view
  • diff_schema: compare a schema between two connections
  • diff_query: compare a query's results between two connections
  • list_sessions: the investigation tabs, so an agent can resume one or start a new one
  • rename_session: give a session tab a short title

Guardrails

  • Explain by default. A query runs as EXPLAIN unless the agent asks to execute it.
  • Read-only until confirmed. On PostgreSQL, unconfirmed statements run in a read-only transaction. A write hidden in a function fails.
  • Writes wait for you. On staging and production, a write runs only after you approve it in Tarka.
  • No WHERE, no run. DELETE and UPDATE without a WHERE clause never execute.
  • Metadata on production. The agent gets column names, types and counts. The rows stay on your screen.
  • Privileged functions by name. pg_terminate_backend, dblink and the like need confirmation.
  • A cap on runtime. You set how long one statement may run.
  • No AI inside. Tarka has no model and needs no API keys. You bring the agent.

Platform

  • macOS 12 or later. Universal (Apple Silicon and Intel), signed and notarized by Apple.
  • PostgreSQL (and compatible databases) and Snowflake; SSL/TLS up to verify-full and SSH tunnels.
  • Free. Sign in with Google (through WorkOS) to open the app.
  • Current version 1.2.0. See the changelog.

Get it

Questions: tarkaclient@gmail.com. Made by Pavan Kulkarni.