Home / Token cost / Supabase

The Supabase MCP server costs 6,349 tokens before the first call.

Connect Supabase and its 60 tool definitions are loaded into the model's context on every request — 3.2% of a 200k window spent before your agent does anything.

QUICK ANSWER The Supabase MCP server's tool definitions consume 6,349 tokens — 5.9× the median MCP server (1,075 tokens). A scoped grant exposing only the tools you use cuts that roughly in proportion.

MEASURED FROM SCHEMAS 60 tools · 6,349 tokens · 3.2% of 200k · 0.6% of 1M Method →

What that buys before your agent starts working.

Tool definitions are overhead: they occupy context on every request and compete with your code, documents and conversation history for the same window.

200K WINDOW 3.2%
1M WINDOW 0.6%

Corpus context: Supabase ranks #162 of 1,659 measured MCP servers by definition cost. The median is 1,075 tokens, p90 is 6,119, and the heaviest (Fusionauth) is 183,337 — 92% of a 200k window on its own.

Where the 6,349 tokens go.

Each row is one tool definition as a tools/list entry — name, description and input schema — counted with o200k_base. Average: 106 tokens per tool.

ToolCategoryTokens% of server
search_docs Read 425 6.7%
deploy_edge_function Execute 376 5.9%
sb_list_records Read 249 3.9%
create_project Write 212 3.3%
sb_update_user Write 206 3.2%
sb_list_objects Read 201 3.2%
sb_upsert_records Write 200 3.2%
sb_create_user Write 198 3.1%
sb_create_project Write 170 2.7%
sb_create_bucket Write 168 2.6%
sb_update_records Write 168 2.6%
sb_delete_records Destructive 155 2.4%
sb_insert_records Write 151 2.4%
sb_create_secrets Write 147 2.3%
sb_call_function Read 132 2.1%
create_branch Write 129 2.0%
get_advisors Read 119 1.9%
sb_create_signed_url Write 115 1.8%
sb_run_query Execute 114 1.8%
get_publishable_keys Read 113 1.8%
sb_delete_objects Destructive 110 1.7%
sb_list_users Read 109 1.7%
sb_delete_secrets Destructive 104 1.6%
confirm_cost Read 101 1.6%
sb_get_function Read 94 1.5%
get_logs Read 93 1.5%
sb_get_project Read 89 1.4%
sb_pause_project Read 88 1.4%
apply_migration Write 87 1.4%
execute_sql Execute 83 1.3%
sb_list_api_keys Read 81 1.3%
sb_delete_bucket Destructive 80 1.3%
sb_list_secrets Read 78 1.2%
sb_get_user Read 77 1.2%
sb_list_functions Read 76 1.2%
sb_get_typescript_types Read 75 1.2%
sb_restore_project Write 74 1.2%
sb_delete_user Destructive 73 1.1%
get_cost Read 73 1.1%
sb_list_migrations Read 72 1.1%
sb_list_projects Read 69 1.1%
list_tables Read 66 1.0%
reset_branch Destructive 65 1.0%
sb_list_buckets Read 65 1.0%
list_branches Read 58 0.9%
rebase_branch Execute 52 0.8%
get_edge_function Read 48 0.8%
list_projects Read 47 0.7%
get_organization Read 41 0.6%
get_project Read 38 0.6%
merge_branch Write 38 0.6%
list_edge_functions Read 36 0.6%
generate_typescript_types Write 36 0.6%
get_project_url Read 34 0.5%
list_migrations Read 33 0.5%
list_extensions Read 32 0.5%
list_organizations Read 32 0.5%
pause_project Read 32 0.5%
restore_project Write 32 0.5%
delete_branch Destructive 30 0.5%

Computed over 60 of 63 catalogued tools — the remainder have no published input schema, so the true total is slightly higher.

Most agents use a handful of these tools. They pay for all 60.

A PolicyLayer grant exposes only the tools you allow — ungranted definitions are filtered out of the tool list, so they never enter the context window. Estimates below assume typical-weight tools (106 tokens each).

Grant scopeDefinition costReduction
All 60 tools (no gateway) 6,349 tokens
3 granted tools ~317 tokens −95%
5 granted tools ~529 tokens −92%
10 granted tools ~1,058 tokens −83%

Supabase token-cost questions.

How many tokens does the Supabase MCP server use?+

Its 60 tool definitions total 6,349 tokens — 3.2% of a 200k context window — measured with tiktoken o200k_base over the serialised tools/list payload. Exact counts vary slightly by client and model.

Why does Supabase consume tokens before I send a message?+

MCP clients load every connected server's tool definitions — name, description, and input schema — into the model's context so it knows what it can call. That payload is charged against your context window on every request, whether or not a tool is used.

How do I reduce Supabase's token usage?+

Expose fewer tools. A PolicyLayer grant scopes Supabase to only the tools you allow — ungranted definitions are filtered out of the tool list, so they never enter the context window. A grant of 3 typical tools costs roughly 317 tokens, a 95% reduction.

Does deferred tool loading fix this?+

Partially, in some clients. Claude Code defers MCP tool schemas behind a tool-search step by default, and VS Code has experimental grouping — but you still pay tokens per search and reload, and Cursor, Windsurf and Gemini CLI load definitions upfront. Reducing the exposed tool set cuts the cost in every client.

How these numbers were measured.

01
Serialisation

Each tool is serialised as a tools/list entry — name, description, input schema — from the schemas in the PolicyLayer scan database. Clients differ slightly in framing, so treat counts as close estimates.

02
Tokeniser

tiktoken o200k_base (GPT-4o/o-series). Anthropic's current tokeniser isn't published, so Claude's exact counts will differ; for English text and JSON schemas the totals are close enough to treat these as estimates.

03
Deferred loading

Some clients now defer schema loading (Claude Code's tool search; VS Code experimental grouping). You still pay per search and reload — and Cursor, Windsurf and Gemini CLI load everything upfront.

Computed 05-06-2026 from the PolicyLayer scan database over 60 of 63 catalogued Supabase tools. Counts refresh with every site build.

Expose only the tools you use — the rest never enter your context.

A PolicyLayer grant scopes Supabase to the tools you actually allow. Ungranted definitions never load, and every call that does run is checked against policy first.

Free to start. No card required.

4,600+ MCP servers and 31,000+ tools scanned and risk-classified.

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.