Skip to content

Conversation

@mattrossman
Copy link
Contributor

@mattrossman mattrossman commented Oct 8, 2025

Follow-up from #38797

Implements DebuggingOperations for the self-hosted remote MCP endpoint.

Refactors common logic:

  • /api/platform/projects/[ref]/analytics/endpoints/[name] -> lib/api/self-hosted/logs.ts
  • /api/platform/projects/[ref]/run-lints -> lib/api/self-hosted/lints.ts

Fixes a couple Logflare environment variables and bumps CLI dep for local dev (see Slack context). Note you may need to pnpm install and pnpm supabase stop --no-backup before pnpm dev:studio-local for this to take effect in containers.

To test run pnpm dev:studio-local, open MCP tab in Connect dialog and install to your MCP client then ask it to call the tools (e.g. "get my postgres logs", "get my security advisors", "get my performance advisors" etc.). You should also see "debugging" features as one of the groups you can select in the URL builder.

Notes:

Resolves AI-160

@vercel
Copy link

vercel bot commented Oct 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
design-system Ready Ready Preview Comment Oct 20, 2025 4:48pm
docs Ready Ready Preview Comment Oct 20, 2025 4:48pm
studio-self-hosted Ready Ready Preview Comment Oct 20, 2025 4:48pm
studio-staging Ready Ready Preview Comment Oct 20, 2025 4:48pm
ui-library Ready Ready Preview Comment Oct 20, 2025 4:48pm
zone-www-dot-com Ready Ready Preview Comment Oct 20, 2025 4:48pm
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
cms Ignored Ignored Oct 20, 2025 4:48pm
studio Ignored Ignored Oct 20, 2025 4:48pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

@supabase
Copy link

supabase bot commented Oct 8, 2025

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@mattrossman mattrossman marked this pull request as ready for review October 10, 2025 21:21
@mattrossman mattrossman requested a review from a team as a code owner October 10, 2025 21:21
@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2025

Studio E2E Results

  • Total: 1
  • Passed: 1
  • Failed: 0
  • Skipped: 0
  • Timed out: 0
  • Interrupted: 0
  • Flaky: 0
  • Duration: 2.5s

Artifacts: https://github.com/supabase/supabase/actions/runs/18418850578

Last updated: Thursday 16, October, 2025 16:33:41 (UTC)

mattrossman and others added 3 commits October 20, 2025 12:11
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
@coveralls
Copy link

coveralls commented Oct 20, 2025

Coverage Status

coverage: 68.57% (-2.0%) from 70.606%
when pulling c8a5a21 on feat/mcp-debugging-tools
into 5c5371d on master.

@mattrossman
Copy link
Contributor Author

Fix for the edge function logs is included in logflare v1.23.0 and CLI v2.50.8

See also update to the self-hosted compose file #39468 (comment).

Updating this PR accordingly.

@mattrossman
Copy link
Contributor Author

Verifying that I can see edge function logs now with logflare v1.23.0 from latest CLI and updated query.

CleanShot 2025-10-20 at 12 38 36@2x

@mattrossman mattrossman merged commit 9f5620c into master Oct 20, 2025
21 of 22 checks passed
@mattrossman mattrossman deleted the feat/mcp-debugging-tools branch October 20, 2025 17:11
dshukertjr pushed a commit that referenced this pull request Oct 22, 2025
* feat: stub `getDebuggingOperations`

* fix: logflare variables in `generateLocalEnv.js`

* chore: upgrade `supabase`, `@supabase/mcp-server-supabase`

* feat: shared `retrieveAnalyticsData`, implement `getLogs` for MCP

* feat: shared `getLints`, implement MCP security/performance advisors with filter

* chore: update lockfile

* fix: prefer `??`

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>

* docs: comment origin of `LINT_SQL`

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>

* chore: bump `supabase` devDependency for latest images

Changes rely on fix from loglare v1.23.0

* fix: edge function logs query

Based on https://github.com/supabase/supabase/pull/39388/files#diff-b4e9726d34a406fa1a6133a18bdb972c90be9df0c89598de0695592514e22941R199-R206

---------

Co-authored-by: Greg Richardson <greg.nmr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants