Files
supabase/apps/docs/components/McpCiConfigBlock.utils.ts
Chris Chinchilla 30b02aa0b7 docs: Allow for custom MCP server URLs (#47218)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added new public MCP base URL environment variables for hosted and
self-hosted setups.
* Introduced reusable MDX components to render custom MCP configuration
content.
* **Documentation**
* Updated the MCP guide to reference shared MCP server template values
for examples.
* Swapped the CI configuration example for a component-rendered snippet
for consistency.
* **Bug Fixes**
* Improved self-hosted MCP base URL fallback so it prefers the new
non-platform URL when no custom API URL is provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-07-07 10:04:56 +02:00

20 lines
643 B
TypeScript

/**
* Builds the example CI MCP server configuration. Pure and dependency-free so
* it can be shared between the React `<McpCiConfigBlock>` component (Next.js
* bundle) and the build-time markdown-schema handler without pulling in
* `CodeBlock`'s heavier dependencies (Shiki, Twoslash) into the build script.
*/
export function buildMcpCiConfig(remoteUrl = 'https://mcp.supabase.com/mcp') {
return {
mcpServers: {
supabase: {
type: 'http',
url: `${remoteUrl}?project_ref=\${SUPABASE_PROJECT_REF}`,
headers: {
Authorization: 'Bearer ${SUPABASE_ACCESS_TOKEN}',
},
},
},
}
}