Skip to content

Add supabase docs#2030

Merged
jlowin merged 3 commits intomainfrom
supabase-docs
Dec 4, 2025
Merged

Add supabase docs#2030
jlowin merged 3 commits intomainfrom
supabase-docs

Conversation

@jlowin
Copy link
Copy Markdown
Member

@jlowin jlowin commented Oct 9, 2025

Fast follow to #1997 to add integration docs

@marvin-context-protocol marvin-context-protocol Bot added documentation Updates to docs, examples, or guides. Primary change is documentation-related. auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. labels Oct 9, 2025
@Arjun-A-I
Copy link
Copy Markdown

Hey guys when can we expect the integration to be out...super excited to use supabase in ma mcp auth

@jlowin
Copy link
Copy Markdown
Member Author

jlowin commented Oct 16, 2025

I think we will hold this until we either confirm #1997 works or it comes out of beta, see https://github.com/orgs/supabase/discussions/38022

@jlowin jlowin added the DON'T MERGE PR is not ready for merging. Used by authors to prevent premature merging. label Oct 17, 2025
@jlowin jlowin removed the DON'T MERGE PR is not ready for merging. Used by authors to prevent premature merging. label Dec 4, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 4, 2025

Walkthrough

A new Supabase authentication integration documentation page was added to the FastMCP documentation. This includes creating docs/integrations/supabase.mdx with configuration instructions, code examples, and testing guidance for using Supabase as a Remote OAuth provider. The navigation configuration in docs.json was updated to include a reference to the new page under the Integrations > Authentication section.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks required sections from the template, including a detailed description of changes, issue reference, testing confirmation, and completion of the contributors checklist. Complete the PR description using the provided template: add a clear description of changes, reference the related issue (#1997), confirm testing and documentation updates, and check off all checklist items.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add supabase docs' is concise and directly reflects the main change: adding Supabase documentation. It clearly identifies what was added without unnecessary detail.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch supabase-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
docs/integrations/supabase.mdx (1)

97-123: Subsection headings should use H3 markdown markup for proper hierarchy.

"Provider Selection" (line 97) and "Supabase-Specific Configuration" (line 107) are subsection labels within the main "Environment Variables" section, but they are not formatted as H3 headings. Per the MDX guidelines on heading hierarchy, subsections should use ### markdown syntax.

Apply this diff to add proper H3 heading markup:

 ### Provider Selection
 
 Setting this environment variable allows the Supabase provider to be used automatically without explicitly instantiating it in code.

And:

 ### Supabase-Specific Configuration
 
 These environment variables provide default values for the Supabase provider, whether it's instantiated manually or configured via `FASTMCP_SERVER_AUTH`.

This improves consistency and helps with documentation hierarchy and SEO.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9ea76e8 and fe3bf5f.

📒 Files selected for processing (2)
  • docs/docs.json (1 hunks)
  • docs/integrations/supabase.mdx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**/*.mdx

📄 CodeRabbit inference engine (docs/.cursor/rules/mintlify.mdc)

docs/**/*.mdx: Use clear, direct language appropriate for technical audiences
Write in second person ('you') for instructions and procedures in MDX documentation
Use active voice over passive voice in MDX technical documentation
Employ present tense for current states and future tense for outcomes in MDX documentation
Maintain consistent terminology throughout all MDX documentation
Keep sentences concise while providing necessary context in MDX documentation
Use parallel structure in lists, headings, and procedures in MDX documentation
Lead with the most important information using inverted pyramid structure in MDX documentation
Use progressive disclosure in MDX documentation: present basic concepts before advanced ones
Break complex procedures into numbered steps in MDX documentation
Include prerequisites and context before instructions in MDX documentation
Provide expected outcomes for each major step in MDX documentation
End sections with next steps or related information in MDX documentation
Use descriptive, keyword-rich headings for navigation and SEO in MDX documentation
Focus on user goals and outcomes rather than system features in MDX documentation
Anticipate common questions and address them proactively in MDX documentation
Include troubleshooting for likely failure points in MDX documentation
Provide multiple pathways (beginner vs advanced) but offer an opinionated path to avoid overwhelming users in MDX documentation
Always include complete, runnable code examples that users can copy and execute in MDX documentation
Show proper error handling and edge case management in MDX code examples
Use realistic data instead of placeholder values in MDX code examples
Include expected outputs and results for verification in MDX code examples
Test all code examples thoroughly before publishing in MDX documentation
Specify language and include filename when relevant in MDX code examples
Add explanatory comments for complex logic in MDX code examples
Document all API...

Files:

  • docs/integrations/supabase.mdx
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: jlowin/fastmcp PR: 0
File: docs/.cursor/rules/mintlify.mdc:0-0
Timestamp: 2025-11-26T21:52:08.947Z
Learning: Applies to docs/**/*.mdx : Provide authentication examples showing proper format in MDX API documentation
📚 Learning: 2025-11-26T21:52:08.947Z
Learnt from: CR
Repo: jlowin/fastmcp PR: 0
File: docs/.cursor/rules/mintlify.mdc:0-0
Timestamp: 2025-11-26T21:52:08.947Z
Learning: Applies to docs/**/*.mdx : Provide authentication examples showing proper format in MDX API documentation

Applied to files:

  • docs/integrations/supabase.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Run tests: Python 3.10 on windows-latest
🔇 Additional comments (4)
docs/docs.json (1)

205-205: Navigation entry correctly positioned.

The Supabase integration reference is added in proper alphabetical order within the Authentication integrations section.

docs/integrations/supabase.mdx (3)

1-11: Frontmatter and imports properly structured.

YAML frontmatter includes all required fields and the VersionBadge correctly indicates API version compatibility.


15-41: Configuration section follows progressive disclosure pattern.

Prerequisites are clearly listed before instructions, and Step 1-2 provide clear sequential guidance. The server code example is complete and uses realistic configuration values (project URL format, localhost for development).


93-143: Environment Variables section is well-structured and documented.

The ParamField components correctly specify required vs. optional parameters with clear descriptions. The example .env file and simplified server code effectively demonstrate environment-based setup, reducing configuration complexity.

Comment on lines +70 to +86
```python client.py
from fastmcp import Client
import asyncio

async def main():
# The client will automatically handle Supabase OAuth
async with Client("http://localhost:8000/mcp", auth="oauth") as client:
# First-time connection will open Supabase login in your browser
print("✓ Authenticated with Supabase!")

# Test the protected tool
result = await client.call_tool("protected_tool", {"message": "Hello!"})
print(result)

if __name__ == "__main__":
asyncio.run(main())
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find Client class definition
find . -type f -name "*.py" | xargs grep -l "class Client"

Repository: jlowin/fastmcp

Length of output: 227


🏁 Script executed:

# Search for auth parameter usage in Client initialization
rg "Client.*auth" --type py -A 3 -B 3

Repository: jlowin/fastmcp

Length of output: 6297


🏁 Script executed:

# Look for existing MDX examples showing error handling
find docs -name "*.mdx" -exec grep -l "try:" {} \;

Repository: jlowin/fastmcp

Length of output: 189


🏁 Script executed:

# Check for exception types in fastmcp
rg "class.*Error|class.*Exception" --type py

Repository: jlowin/fastmcp

Length of output: 968


🏁 Script executed:

# Examine Client class definition
head -100 src/fastmcp/client/client.py

Repository: jlowin/fastmcp

Length of output: 2656


🏁 Script executed:

# Look at one complete auth example to see error handling pattern
cat examples/auth/github_oauth/client.py

Repository: jlowin/fastmcp

Length of output: 844


🏁 Script executed:

# Check what exceptions can be raised during Client operations
cat src/fastmcp/exceptions.py

Repository: jlowin/fastmcp

Length of output: 801


🏁 Script executed:

# Verify the specific supabase.mdx file to see full context
sed -n '54,92p' docs/integrations/supabase.mdx

Repository: jlowin/fastmcp

Length of output: 1158


Add error handling to the client code example.

The code example shows only the successful OAuth flow but lacks error handling for authentication failures (denied authorization, network errors, token exchange failures). All official fastmcp auth examples wrap the Client initialization in try/except blocks. Add error handling to match the established pattern:

async def main():
    try:
        async with Client("http://localhost:8000/mcp", auth="oauth") as client:
            print("✓ Authenticated with Supabase!")
            result = await client.call_tool("protected_tool", {"message": "Hello!"})
            print(result)
    except Exception as e:
        print(f"✗ Authentication failed: {e}")
        raise
🤖 Prompt for AI Agents
In docs/integrations/supabase.mdx around lines 70 to 86, the example client code
lacks error handling for OAuth failures (denied auth, network/token errors);
wrap the async Client usage in a try/except block that logs/prints a clear
authentication failure message including the exception and re-raises (or exits)
so examples match the project's established pattern for auth examples.

@jlowin jlowin merged commit 707d664 into main Dec 4, 2025
14 checks passed
@jlowin jlowin deleted the supabase-docs branch December 4, 2025 23:26
@coderabbitai coderabbitai Bot mentioned this pull request Dec 16, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. documentation Updates to docs, examples, or guides. Primary change is documentation-related.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants