QUERY FORESIGHT FOR AI AGENTS

Good query.
But at what cost?

Anumana is an open-source MCP server for coding agents and developers who write SQL and vector searches. Inspect database query plans and estimated cost before execution.

Anumana reads the planner’s estimates, surfaces expensive patterns, and helps your agent refine its query. EXPLAIN only. The query stays unexecuted.

Open-source MCPRuns locallyMIT licensed
anumana / preflight01
THE AGENT’S QUERY
SELECT *
FROM orders
WHERE customer_id = 42;
Worth a second look.EXPENSIVE

A sequential scan can do a lot of work to find a few matching rows.

Plan signalSEQ_SCAN_LARGE
Next stepReview the filter & indexes
Query not executed Illustrative example
Built for the moment before execution. PostgreSQL & pgvector Offline DDL checksv0.2.1 on PyPI ↗

01 / THE FEEDBACK LOOP

From plausible SQL
to a grounded decision.

The agent writes the query. Anumana brings the database’s own planning signals into the conversation.

01

Read the real schema.

Start with the tables, columns and indexes that actually exist. Give the agent context before it writes SQL.

describe_schema_tool
02

Ask the planner.

Inspect estimated work, scan strategy and risk. Catch large scans, excessive top-k and unbounded results.

preflight_query
03

Refine with evidence.

Review proposed changes, preserve the intended results, and check the candidate again before recommending it.

suggest_query · rewrite_query

02 / WHAT THE AGENT SEES

Make hidden work visible.

A query can look small and still ask the database to do something expensive.

preflight_queryINPUT
SELECT *
FROM orders
WHERE customer_id = 42;

A customer lookup without a supporting index.

What to investigateILLUSTRATIVE

A selective lookup.
A sequential scan.

The planner may choose sequential access when no suitable index serves this filter. Check the scan estimate and selectivity before proposing an index.

SEQ_SCAN_LARGESELECT_STAR_WIDEUNBOUNDED_RESULT

Next: inspect the plan, project required columns, and review index options.

Example scenarios, not live database results. This page sends no SQL to a database.

03 / CAPABILITY + WORKFLOW

Give your agent
the playbook, too.

The MCP provides the tools. The skill teaches the agent when to reach for them, how to interpret the findings, and when a rewrite changes the answer.

Explore Agensi

Anumana’s marketplace listing is coming soon.
This link opens the Agensi marketplace.

anumana-query-preflightAgent skill · 12 engine profiles
.md

Schema-first workflowGround every candidate in real tables and indexes.

Bounded refinementCheck, refine and recheck, without an endless loop.

Semantic guardrailsReview LIMIT, projection and recall trade-offs.

Setup includedEngine profiles, readiness states, templates and test checklists.

THE MCPConnects the agent to Anumana’s planner tools.

THE SKILLMakes using those tools a repeatable workflow.

THE RESULTBetter-informed query decisions before execution.

04 / GET CONNECTED

Local tools.
Your database. Your agent.

Start with the free MCP server. Add the skill when available. No hosted database service is included or required.

01 / CONNECT THE MCP

A small config.
A useful feedback loop.

Install uv, then merge this template into your agent’s MCP configuration. It launches Anumana locally using uvx.

Replace the DSN placeholder locally with your own read-only PostgreSQL connection. Keep credentials out of source control.

Python 3.10+. The first launch downloads the pinned PyPI package. Clients using another config format need the same command, arguments and environment settings.

MCP configuration template
{
  "mcpServers": {
    "anumana": {
      "command": "uvx",
      "args": ["anumana-mcp==0.2.1"],
      "env": {
        "ANUMANA_DSN": "REPLACE_WITH_READ_ONLY_POSTGRES_DSN",
        "ANUMANA_ENGINE": "postgres"
      }
    }
  }
}
02 / ADD THE SKILL

Turn the tools into a habit.

Once you have the skill package, keep all its supporting files together. Installing a skill does not register the MCP server.

  1. Get the package.

    When the Anumana listing is live, get it through Agensi and follow its installation flow. The package contains SKILL.md, setup instructions, engine profiles, templates and test checklists.

  2. Load it in your agent.

    For a local-folder installation, extract the package into a folder named anumana-query-preflight in the client’s skill directory.

    .claude/skills/anumana-query-preflight/SKILL.mdClient skill documentation ↗
  3. Reconnect and ask.

    Check that Anumana’s tools are available, then ask your agent to use the skill for your next query. Start offline if you don’t want to connect a database.

TRY THIS WITH YOUR AGENT

Use the anumana-query-preflight skill to review this query before execution. Inspect the schema first, check estimated cost, and explain any risks. Preserve the intended results and do not execute the query.

The skill includes profiles for all 12 adapter families and every readiness state. Use connected runners for live/provisional checks; use preparation mode for unwired engines. The MCP works independently of the skill.

No credentials? Try an offline check.

Give your agent this DDL and query, then ask it to call preflight_schema_only. Expect heuristic findings, not live row counts or measured savings.

DDL: CREATE TABLE orders (
  id bigint PRIMARY KEY,
  customer_id bigint,
  total numeric
);

SQL: SELECT * FROM orders;

05 / FIND YOUR DATABASE

Every engine.
Every readiness state.

All 12 adapter families are listed below. Check the connection and testing columns before choosing your setup.

12 adapters implemented7 MCP runners connected2 engines live-tested

Development-checkout status, not a guarantee of support in published v0.2.1. Connected means a server connection path exists. Live-tested means real-engine evidence is recorded for tested paths. Not wired means the adapter cannot yet be called live through the MCP server.

12 of 12 database families

Current adapter, live-connection and verification coverage
DatabaseQuery formatCost / access signalAdapterMCP runnerLive tests
PostgreSQLRelational SQLSQLEXPLAIN JSONImplementedConnectedLive-tested
pgvectorVector / RAGSQLPostgreSQL EXPLAIN + vector flagsImplementedConnectedPending
SQLiteEmbedded SQLSQLEXPLAIN QUERY PLANImplementedConnectedLive-tested
MySQL / MariaDBRelational SQLSQLEXPLAIN FORMAT=JSONImplementedConnectedPending
MongoDBDocumentJSON find requestexplain with queryPlanner verbosityImplementedConnectedPending
DynamoDBKey-value / serverlessJSON Query/Scan requestRequest-shape rules; metadata discoveryImplementedConnectedPending
Amazon RedshiftMPP warehouseSQLText EXPLAINImplementedConnectedPending
Google BigQueryServerless warehouseSQLDry-run byte estimates (adapter contract)ImplementedNot wiredPending
SnowflakeCloud warehouseSQLEXPLAIN USING JSON (adapter contract)ImplementedNot wiredPending
ClickHouseColumnar OLAPSQLEXPLAIN ESTIMATE (adapter contract)ImplementedNot wiredPending
FalkorDBProperty graph / CypherCypherGRAPH.EXPLAIN (adapter contract)ImplementedNot wiredPending
Cassandra / ScyllaDBWide-column / CQLCQL + actual key schemaPartition-key request-shape rulesImplementedNot wiredPending

The skill covers all 12. It includes native-format workflows, setup for connected runners, and preparation guides for adapters awaiting live wiring. Prepared guidance does not activate a missing integration.

No database connection? Use the generic SQL DDL checker for heuristic SQL findings. JSON requests, Cypher and CQL use their own prepared review workflows.

Not listed? Plain Redis and managed vector APIs such as Pinecone have no Anumana adapter in this checkout. See engine details ↗

A FEW GOOD QUESTIONS

Before you connect.

Useful estimates.
Clear boundaries.

Does Anumana execute my query?

The SQL preflight tools ask the planner with EXPLAIN, never EXPLAIN ANALYZE. Anumana does not provide a query-execution tool. Live setup still requires access to your database for planning and schema discovery.

Why use a skill if the MCP already exists?

The MCP provides capabilities. The skill supplies a consistent workflow: inspect schema, check the candidate, review caveats, then refine. The server can be used without the skill; the skill needs access to the server’s tools for live planner checks.

Does “cost” mean runtime or a database bill?

For PostgreSQL, cost is the planner’s unitless estimate. It is not milliseconds or dollars. Offline checks are heuristic. Replanning can compare estimates, but cannot guarantee runtime or prove two queries return the same result.

What am I paying for on Agensi?

Any paid listing covers the packaged skill workflow and setup resources. The Anumana MCP server remains free and MIT licensed. Pricing will appear on the marketplace listing when it is published; no hosted service or exclusive server feature is included.

Will the skill and server update automatically?

The setup template pins server version 0.2.1. Upgrading requires a configuration change. Locally installed skill files also need updating; marketplace-delivered updates depend on Agensi’s installation and update flow.

A little foresight.
A better query.