• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 19105505226

05 Nov 2025 02:34PM UTC coverage: 53.269% (-1.4%) from 54.699%
19105505226

Pull #4383

github

web-flow
Merge 79948e448 into 4054f205d
Pull Request #4383: feat(mcp): add `supabase mcp init` command to configure MCP clients

0 of 309 new or added lines in 9 files covered. (0.0%)

5 existing lines in 1 file now uncovered.

6388 of 11992 relevant lines covered (53.27%)

5.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/internal/mcp/init/claude_code.go
1
package mcpinit
2

3
import (
4
        "context"
5
        "fmt"
6
        "os"
7
        "os/exec"
8

9
        "github.com/spf13/afero"
10
)
11

12
// claudeCodeClient implements the Client interface for Claude Code
13
type claudeCodeClient struct {
14
        baseClient
15
}
16

NEW
17
func newClaudeCodeClient() *claudeCodeClient {
×
NEW
18
        return &claudeCodeClient{
×
NEW
19
                baseClient: baseClient{
×
NEW
20
                        name:                "claude-code",
×
NEW
21
                        displayName:         "Claude Code",
×
NEW
22
                        installInstructions: "npm install -g @anthropic-ai/claude-cli",
×
NEW
23
                        checkInstalled: func() bool {
×
NEW
24
                                return commandExists("claude")
×
NEW
25
                        },
×
26
                },
27
        }
28
}
29

NEW
30
func (c *claudeCodeClient) Configure(ctx context.Context, fsys afero.Fs) error {
×
NEW
31
        fmt.Println("Adding Supabase MCP server to Claude Code...")
×
NEW
32
        fmt.Println()
×
NEW
33

×
NEW
34
        // Build the claude mcp add command
×
NEW
35
        // #nosec G204 -- command and URL are controlled constants
×
NEW
36
        cmd := exec.CommandContext(ctx, "claude", "mcp", "add", "--transport", "http", "supabase", "https://mcp.supabase.com/mcp")
×
NEW
37

×
NEW
38
        cmd.Stdout = os.Stdout
×
NEW
39
        cmd.Stderr = os.Stderr
×
NEW
40

×
NEW
41
        if err := cmd.Run(); err != nil {
×
NEW
42
                return fmt.Errorf("failed to configure Claude Code: %w", err)
×
NEW
43
        }
×
44

NEW
45
        fmt.Println()
×
NEW
46
        fmt.Println("✓ Successfully added Supabase MCP server to Claude Code!")
×
NEW
47
        fmt.Println()
×
NEW
48
        fmt.Println("The server is now available in your Claude Code environment.")
×
NEW
49
        return nil
×
50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc