mirror of
https://github.com/supabase/supabase.git
synced 2026-09-07 02:20:52 +08:00
## 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>
20 lines
643 B
TypeScript
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}',
|
|
},
|
|
},
|
|
},
|
|
}
|
|
}
|