Skip to content

Commit ddbfe4e

Browse files
committed
feat: mcp registry
1 parent e312146 commit ddbfe4e

File tree

5 files changed

+120
-0
lines changed

5 files changed

+120
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
test/coverage
2+
*.pem

packages/mcp-server-supabase/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"typecheck": "tsc --noEmit",
1414
"prebuild": "pnpm typecheck",
1515
"prepublishOnly": "pnpm build",
16+
"registry:update": "tsx scripts/registry/update-version.ts",
17+
"registry:login": "scripts/login.sh",
18+
"registry:publish": "mcp-publisher publish",
1619
"test": "vitest",
1720
"test:unit": "vitest --project unit",
1821
"test:e2e": "vitest --project e2e",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Check for DOMAIN_VERIFICATION_KEY environment variable first
4+
if [ -n "$DOMAIN_VERIFICATION_KEY" ]; then
5+
# Use the PEM content from environment variable
6+
PRIVATE_KEY_HEX=$(echo "$DOMAIN_VERIFICATION_KEY" | openssl pkey -noout -text | grep -A3 "priv:" | tail -n +2 | tr -d ' :\n')
7+
else
8+
# Default to reading from file
9+
PRIVATE_KEY_PATH=domain-verification-key.pem
10+
PRIVATE_KEY_HEX=$(openssl pkey -in $PRIVATE_KEY_PATH -noout -text | grep -A3 "priv:" | tail -n +2 | tr -d ' :\n')
11+
fi
12+
13+
mcp-publisher login http \
14+
--domain supabase.com \
15+
--private-key=$PRIVATE_KEY_HEX
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { readFile, writeFile } from 'node:fs/promises';
2+
import { fileURLToPath } from 'node:url';
3+
4+
const packageJsonPath = fileURLToPath(import.meta.resolve('../package.json'));
5+
const serverJsonPath = fileURLToPath(import.meta.resolve('../server.json'));
6+
7+
try {
8+
// Read package.json to get the version
9+
const packageJson = JSON.parse(await readFile(packageJsonPath, 'utf-8'));
10+
const { name, version } = packageJson;
11+
12+
if (!version) {
13+
console.error('No version found in package.json');
14+
process.exit(1);
15+
}
16+
17+
// Read server.json
18+
const serverJson = JSON.parse(await readFile(serverJsonPath, 'utf-8'));
19+
20+
// Update version in server.json root
21+
serverJson.version = version;
22+
23+
// Update version in packages array
24+
if (serverJson.packages && Array.isArray(serverJson.packages)) {
25+
for (const pkg of serverJson.packages) {
26+
if (pkg.identifier === name) {
27+
pkg.version = version;
28+
}
29+
}
30+
}
31+
32+
// Write updated server.json
33+
await writeFile(serverJsonPath, JSON.stringify(serverJson, null, 2) + '\n');
34+
35+
console.log(`Updated server.json version to ${version}`);
36+
} catch (error) {
37+
console.error('Failed to update server.json version:', error);
38+
process.exit(1);
39+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
3+
"name": "com.supabase/mcp",
4+
"description": "MCP server for interacting with the Supabase platform",
5+
"status": "active",
6+
"repository": {
7+
"url": "https://github.com/supabase-community/mcp-server-supabase",
8+
"source": "github"
9+
},
10+
"version": "0.5.3",
11+
"packages": [
12+
{
13+
"registry_type": "npm",
14+
"registry_base_url": "https://registry.npmjs.org",
15+
"identifier": "@supabase/mcp-server-supabase",
16+
"version": "0.5.3",
17+
"transport": {
18+
"type": "stdio"
19+
},
20+
"runtime_hint": "npx",
21+
"runtime_arguments": [
22+
{
23+
"type": "named",
24+
"name": "--project-ref",
25+
"description": "Supabase project reference ID",
26+
"format": "string",
27+
"is_required": false
28+
},
29+
{
30+
"type": "named",
31+
"name": "--read-only",
32+
"description": "Enable read-only mode",
33+
"format": "boolean",
34+
"is_required": false
35+
},
36+
{
37+
"type": "named",
38+
"name": "--features",
39+
"description": "Comma-separated list of features to enable",
40+
"format": "string",
41+
"is_required": false
42+
},
43+
{
44+
"type": "named",
45+
"name": "--api-url",
46+
"description": "Custom API URL",
47+
"format": "string",
48+
"is_required": false
49+
}
50+
],
51+
"environment_variables": [
52+
{
53+
"name": "SUPABASE_ACCESS_TOKEN",
54+
"description": "Personal access token for Supabase API",
55+
"format": "string",
56+
"is_required": true,
57+
"is_secret": true
58+
}
59+
]
60+
}
61+
]
62+
}

0 commit comments

Comments
 (0)