Files
magpie/internal/library/market_coderabbit_test.go
T
yetone d8cc6e29f5 library: CodeRabbit's own MCP server is in the market (niuniu_8964 on X)
niuniu_8964 on X asked for CodeRabbit's and Firecrawl's official MCP
servers in Library › MCP. Firecrawl's was already a featured server
(npx -y firecrawl-mcp with FIRECRAWL_API_KEY, the README's own command);
checked against firecrawl/firecrawl-mcp-server's README and npm (3.40.0),
left as it is.

CodeRabbit's is a remote one: docs.coderabbit.ai/api/mcp gives
https://mcp.coderabbit.ai/ over Streamable HTTP, signed in in the browser
with OAuth (PKCE, dynamic client registration), no API key. It is a
featured remote with SignIn, as Linear's and Notion's are, under the
coderabbitai GitHub org's mark. An EU organization has its own server,
mcp.eu.coderabbit.ai; the description says to edit the address to it.

The scopes: Claude Code and Codex ask only for "connection" unless told
which, which is enough for connection_status alone. magpie's own sign-in
(mcpauth) takes the scope list from the server's 401 challenge, which
names every read and write scope but `review`, and CodeRabbit's consent
page shows each one to approve.

Run:
- mcpauth's discover() against the real https://mcp.coderabbit.ai/ and
  https://mcp.eu.coderabbit.ai/ (a throwaway test, not committed): each
  found its issuer, authorize, token and register endpoints, the
  challenge's scopes and auth method none. No sign-in was finished: no
  CodeRabbit account here.
- firecrawl-mcp 3.40.0 started in a sandbox HOME on mica: initialize and
  tools/list answered, 28 firecrawl_* tools.
- mica, at base d74754970: gofmt -l, go vet ./internal/library,
  go test ./internal/library ok (with the new
  TestCodeRabbitIsItsOwnRemote); go test ./internal/gui red only in
  TestGatewayModeListsNoOwnSessions, the "listing":true search of #7064,
  open and in sessions, which this doesn't touch.
- mote, Chromium and WebKit, en zh zh-TW ja de: market-*.test.cjs (9
  files), library-pi-market, library-discover-jump, gui-de, gui-ja,
  gui-zh-tw, i18n-keys: 227 of 227 ok. They fake the market's API, so
  they show the page still reads it, not this entry.
- Rebased on origin/main 7300be4d0, whose commits since d74754970 touch
  sessions and the gateway only; go test ./internal/library run again at
  the pushed head on mote: gofmt -l empty, go vet and go test ok.

Not tried: a finished CodeRabbit sign-in and a tool call, and an agent
given the server through the MCP router.
2026-11-18 19:36:35 +08:00

24 lines
901 B
Go

package library
import "testing"
// TestCodeRabbitIsItsOwnRemote holds the featured CodeRabbit to the server
// CodeRabbit's docs give (docs.coderabbit.ai/api/mcp, niuniu_8964 on X):
// Streamable HTTP at mcp.coderabbit.ai, signed in in the browser with
// OAuth, and no API key asked for.
func TestCodeRabbitIsItsOwnRemote(t *testing.T) {
m, ok := marketServer("coderabbit")
if !ok {
t.Fatal("no featured coderabbit")
}
if !m.Featured || !m.SignIn || m.Transport != "http" || m.server.URL != "https://mcp.coderabbit.ai/" {
t.Fatalf("coderabbit: featured %v, signIn %v, %s %s", m.Featured, m.SignIn, m.Transport, m.server.URL)
}
if len(m.Inputs) != 0 {
t.Fatalf("coderabbit asks for %v; its sign-in needs no key", m.Inputs)
}
if m.Homepage != "https://docs.coderabbit.ai/api/mcp" || m.Icon != gh("coderabbitai") {
t.Fatalf("coderabbit homepage %q, icon %q", m.Homepage, m.Icon)
}
}