fix(mcp): use oauth for claude code config#1118
Conversation
|
Claude finished @runeb's task in 2m 20s —— View job Review
No blocking issues found. The change is minimal and correctly scoped:
Minor / non-blocking observations
|
📦 Bundle Stats —
|
| Metric | Value | vs main (c342934) |
|---|---|---|
| Internal (raw) | 2.1 KB | - |
| Internal (gzip) | 799 B | - |
| Bundled (raw) | 10.97 MB | - |
| Bundled (gzip) | 2.06 MB | - |
| Import time | 832ms | -5ms, -0.6% |
bin:sanity
| Metric | Value | vs main (c342934) |
|---|---|---|
| Internal (raw) | 1023 B | - |
| Internal (gzip) | 486 B | - |
| Bundled (raw) | 9.84 MB | - |
| Bundled (gzip) | 1.77 MB | - |
| Import time | 1.94s | -22ms, -1.1% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-core
Compared against main (c342934b)
| Metric | Value | vs main (c342934) |
|---|---|---|
| Internal (raw) | 97.0 KB | +842 B, +0.9% |
| Internal (gzip) | 22.7 KB | +208 B, +0.9% |
| Bundled (raw) | 21.61 MB | +768 B, +0.0% |
| Bundled (gzip) | 3.42 MB | +200 B, +0.0% |
| Import time | 788ms | -1ms, -0.1% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — create-sanity
Compared against main (c342934b)
| Metric | Value | vs main (c342934) |
|---|---|---|
| Internal (raw) | 908 B | - |
| Internal (gzip) | 483 B | - |
| Bundled (raw) | 931 B | - |
| Bundled (gzip) | 491 B | - |
| Import time | ❌ ChildProcess denied: node | - |
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
f5b1a42 to
6d01d22
Compare
6d01d22 to
dd5a47f
Compare
Four tests in configure.test.ts hardcoded 'Claude Code' as the fixture editor while mocking the token-issuance flow. Now that Claude Code is oauthOnly, those endpoints are never called and no token is written, causing pending nock mocks and missing assertions. Switch them to OpenCode — the closest non-OAuth analog (CLI-detected, JSON format).
Coverage Delta
Comparing 1 changed file against main @ Overall Coverage
|
jwoods02
left a comment
There was a problem hiding this comment.
Tested locally on claude code, looks good ✅
Description
Marks Claude Code as an OAuth-only MCP client (
oauthOnly: true), sosanity mcp configureno longer embeds a Bearer token in the generated Claude Code config.What to review
One-line change in
editorConfigs.tsand minimal test adjustments to match.Testing
Existing tests updated to reflect the new OAuth-only behavior for Claude Code.
Note
Low Risk
Low risk: a small change that stops embedding Bearer tokens in the generated Claude Code MCP config, with test updates to validate the new OAuth-only behavior.
Overview
Claude Code MCP configuration is now OAuth-only.
sanity mcp configuremarksClaude CodeasoauthOnly, so generated configs no longer include anAuthorization: Bearer ...header.Tests were updated to reflect the new behavior (Claude Code now treated like Cursor for no-token configs), and configure-flow tests were adjusted to use another CLI editor where a token is still required.
Reviewed by Cursor Bugbot for commit 3ee742c. Bugbot is set up for automated code reviews on this repo. Configure here.