• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / mcp
96%

Build:
DEFAULT BRANCH: main
Repo Added 04 Jun 2026 09:07PM UTC
Token uvMUPKDvl4PRk4vi50UQ1IHvKAHoFiZeF regen
Build 57 Last
Files 32
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH main
branch: main
CHANGE BRANCH
x
Reset
Sync Branches
  • main
  • barryroodt/ai-178-improve-mcp-db-tool-error-for-wrong-organization-selection
  • barryroodt/ai-651-support-edge-function-logs-in-supabase-mcp
  • ci/force-publish-workflow
  • ci/management-api-type-sync
  • feat/hide-tools
  • feat/mcp-structured-output
  • fix/repo-transfer-urls
  • mattrossman/ai-900-document-strategy-for-mcp-server-breaking-changes
  • prodrigues/add-agents-md
  • raulb/add-code-owners
  • raulb/minor-doc-update
  • raulb/minor-readme-update
  • raulb/spike-mcp-v2
  • release-please--branches--main

17 Jul 2026 09:19PM UTC coverage: 96.336% (+0.004%) from 96.332%
29614297311

push

github

web-flow
fix(pg-meta): pair composite FK columns positionally to avoid cartesi… (#317)

### What kind of change does this PR introduce?

Bug fix: data-integrity issue in `list_tables` (verbose) foreign-key
output.

### What is the current behavior?

For any composite (multi-column) foreign key, `list_tables` (verbose)
returns the **cartesian product** of the source and target columns. An
N-column FK produces N² `foreign_key_constraints` entries instead of N :
reporting column pairings that do not exist in the schema.

Repro:

```sql
create table public.parent (a int not null, b int not null, primary key (a, b));
create table public.child (
  a int not null, b int not null,
  constraint child_parent_fk foreign key (a, b) references public.parent (a, b)
);
```

`list_tables` with `verbose: true` returns 4 constraints for
`child_parent_fk`:

```
public.child.a => public.parent.a
public.child.a => public.parent.b   <- does not exist
public.child.b => public.parent.a   <- does not exist
public.child.b => public.parent.b
```

Only `a=>a` and `b=>b` are real. Because this tool exists so an AI agent
can reason about database structure, the fabricated relationships are
silently trusted - an agent could infer key relationships that don't
exist.

Root cause is in `pg-meta/tables.sql`. The FK subquery joins source and
target columns independently:

```sql
... on sa.attrelid = c.conrelid  and sa.attnum = any (c.conkey)
... on ta.attrelid = c.confrelid and ta.attnum = any (c.confkey)
```

`any(conkey)` against `any(confkey)` cross-joins every source column
with every target column, instead of pairing them positionally.

### What is the new behavior?

Each foreign key is now returned as **one constraint object** with the
grouped shape discussed in the review below:

```json
{
  "name": "child_parent_fk",
  "source_table": "public.child",
  "source_columns": ["a", "b"],
  "target_table": "public.parent",
  "target_columns": ["a", "b"]
}
```

- Columns are walked in lockstep w... (continued)

326 of 360 branches covered (90.56%)

Branch coverage included in aggregate %.

12 of 12 new or added lines in 2 files covered. (100.0%)

2803 of 2888 relevant lines covered (97.06%)

47.18 hits per line

Relevant lines Covered
Build:
Build:
2888 RELEVANT LINES 2803 COVERED LINES
47.18 HITS PER LINE
Source Files on main
  • Tree
  • List 32
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
29614297311 main fix(pg-meta): pair composite FK columns positionally to avoid cartesi… (#317) ### What kind of change does this PR introduce? Bug fix: data-integrity issue in `list_tables` (verbose) foreign-key output. ### What is the current behavior? For an... push 17 Jul 2026 09:20PM UTC web-flow github
96.34
29614200241 main feat: hide tools from tools/list (#334) Adds a `hidden: true` flag to tool definitions that will hide the tool from `tools/list` calls but allow it to still be callable via `tools/call`. Needed for the [expand+contract](https://github.com/supabas... push 17 Jul 2026 09:18PM UTC web-flow github
96.33
29608229483 main ci: management api type sync (#335) Adds a daily CI job that syncs management API types and opens a PR. This can help us keep `main` up to date with the latest types and reduce noise on unrelated PRs needing to update management API types. push 17 Jul 2026 07:38PM UTC web-flow github
96.32
29568803252 main chore: release main (#332) :robot: I have created a release *beep* *boop* --- <details><summary>mcp-server-supabase: 0.9.0</summary> ## [0.9.0](https://github.com/supabase/mcp/compare/mcp-server-supabase-v0.8.3...mcp-server-supabase-v0.9.0) (2... push 17 Jul 2026 09:08AM UTC web-flow github
96.32
29496062367 main feat: support edge function runtime logs in get_logs (#326) ## Problem The `get_logs` MCP tool only exposes edge function **invocation** logs (`function_edge_logs`). Edge function **runtime** logs — `console.log` output, the dashboard's per-func... push 16 Jul 2026 11:54AM UTC web-flow github
96.32
29411396363 main chore: release main (#331) :robot: I have created a release *beep* *boop* --- <details><summary>mcp-server-supabase: 0.8.3</summary> ## [0.8.3](https://github.com/supabase/mcp/compare/mcp-server-supabase-v0.8.2...mcp-server-supabase-v0.8.3) (2... push 15 Jul 2026 11:23AM UTC web-flow github
96.29
29405443353 main fix: actionable error for wrong-org permission failures on database tools (#329) ## Problem Authenticating to the wrong organization (e.g. selecting the wrong org during OAuth login) makes database tools (`list_tables`, `execute_sql`, migrations... push 15 Jul 2026 09:43AM UTC web-flow github
96.29
29371236576 main docs: breaking change strategy (#330) Documents a breaking change strategy for the MCP server in `CONTRIBUTING.md`, as we prepare for various tool changes and strict output schemas. The main risk is our ChatGPT Plugin (previously App) submission... push 14 Jul 2026 09:56PM UTC web-flow github
96.24
29009006598 main docs: add AGENTS.md with CLAUDE.md symlink (#315) Add AGENTS.md pointing contributors to CONTRIBUTING.md, with CLAUDE.md as a symlink. Also ran `pnpm generate:management-api-types` to generate the mgmt-api types. Close [AI-877]( https://linear.... push 09 Jul 2026 09:41AM UTC web-flow github
96.24
28805622770 main chore: add codeowners (#320) ## What kind of change does this PR introduce? Make sure every PR need to be reviewed by the AI team. Working on https://github.com/supabase/mcp/pull/319 I realized that this is not the default behavior. ## What is... push 06 Jul 2026 04:09PM UTC web-flow github
96.24
See All Builds (57)

Badge your Repo: mcp

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc