Repository navigation
Conversation
Parallel's Search MCP is free without a key at a lower rate limit, and documents passing an API key as a Bearer token to unlock higher limits (https://docs.parallel.ai/integrations/mcp/search-mcp). The backend had no place to put one. - parallel_api_key / parallel_api_keys declared with config.KeyPool, so config set, discovery, KETCH_PARALLEL_API_KEY, doctor gating and auto promotion follow the descriptor like exa, keenable and youcom - a configured key is sent as Authorization: Bearer; a 401 or 429 retries once with another key from the pool, as exa and keenable do - keyed 401, 402 and 429 return errors that name the key by position - every keyed search error and doctor detail passes through an httpx.Redactor built from the pool (new httpx.NewValueRedactor), so a key echoed into a status body, a JSON-RPC error or a redirect Location is replaced with [redacted]; cancellation still classifies - without a key, requests, errors and the doctor probe are unchanged
|
Triage (automated): NOTIFY — needs human review. What it is: Adds an optional API key ( Why it needs review, not auto-fix: This is a new feature, not a bug fix, and it trips the config-schema / output-format gate explicitly called out in triage guardrails — it adds new config keys and new fields to Assessment: The PR description is thorough — new httptest coverage for header presence, keyed error codes, redaction against echoed keys in bodies/JSON-RPC errors/redirect Location, golden fixtures regenerated with only the expected two new entries, and live manual testing described. No obvious red flags spotted in a surface read of the diff. Recommend a normal review pass focused on: redaction correctness (adversarial key-echo cases), and whether delegating Automated daily triage. Generated by Claude Code |
Parallel's Search MCP (
https://search.parallel.ai/mcp) is free without a key at a lower rate limit. Its docs say: "Pass a Parallel API key as a Bearer token (Authorization: Bearer <key>) to unlock higher limits." (https://docs.parallel.ai/integrations/mcp/search-mcp). Theparallelbackend is keyless and had nowhere to put one.This follows the exa, keenable and youcom pattern: keyless by default, with an optional key that lifts the hosted caps.
What changes
config.KeyPool("parallel_api_key", "parallel_api_keys").ketch config set,ketch configdiscovery (parallel_api_key_set,parallel_api_keys_count), theKETCH_PARALLEL_API_KEYenv override (comma-separated for several keys), doctor gating andautopromotion all come from the descriptor.Authorization: Bearer <key>. A 401 or 429 retries once with another key from the pool. As with exa and keenable, a 403 is not retried and gets the generic status error.parallel: invalid API key (key 1 of 2; set via: ketch config set parallel_api_key <key>),parallel: payment required (...)andparallel: rate limited (...).httpx.Redactorbuilt from the key pool, and the keyed doctor detail does too. A key the service echoes into a status body, a JSON-RPC error, or a redirectLocationthat net/http quotes is replaced with[redacted], anderrors.Isstill sees cancellation and timeouts. To build that redactor from plain values,httpxgetsNewValueRedactor.NewRedactornow delegates to it, with no behaviour change.ProbeParallelsends the key on thetools/listprobe. Doctor reports a rejected key as misconfigured, and every key in the pool is checked throughhealth.ProbeKeyPool.parallel_api_keyamong the optional keys.Without a key, nothing changes: the request is the same, the errors are the same (
parallel returned status N: <body>), and the doctor probe is stillhealth.ProbeMCP.Testing
make build,make lint(golangci-lint 2.15.0) andmake testpass.CGO_ENABLED=0 go buildpasses.parallel_api_key+parallel_api_keys.Location(a redirect loop, for search and for the doctor probe). The tests assert that no raw, query-escaped or path-escaped form of the key appears.context.DeadlineExceeded.TestBackendsRetryEveryCredentialStatus.UPDATE_REGISTRY_GOLDENS=1 go test ./cmd/ ./doctor/. Only the twoparallel_api_key*entries were added.KETCH_PARALLEL_API_KEY=a,b ketch config --jsonreportsparallel_api_key_set: true,parallel_api_keys_count: 2.parallel: invalid API key (key 1 of 1; set via: ketch config set parallel_api_key <key>)andketch doctorreports it as misconfigured; a valid key returns results and doctor reports ok.No affiliation with Parallel.