← Back to Pull requests

feat(cursor): ship socket's hosted oauth mcp server in the cursor plugin #26

Merged
ljharb merged 9 files (152 lines) on Nov 05, 2026 21:43 UTC
View on GitHub
ljharb ljharb commented on Nov 04, 2026 17:39 UTC
Author

The Cursor plugin now declares https://mcp.socket.dev/ in .cursor-plugin/mcp.json, so users sign in to Socket in the browser instead of pasting one org's API key. The manifest also gets a display name, a logo, and a rule that tells the agent when to use the Socket MCP tools and how to fall back to the CLI if sign-in does not complete.

The shipped-content gates now scan .cursor-plugin/rules, including .mdc files, because agents read and obey them.

Known limitation

Hosted OAuth does not complete in current Cursor versions. The socket-mcp README compatibility matrix lists Cursor 3.22.12 hosted OAuth as failing. The cause is described in the Cursor forum report: Cursor shows Authenticate only when the server returns 401 during connect. The live mcp.socket.dev answers an unauthenticated initialize with 200 and returns 401 only on tools/call.

The fix is on the server side:

  • SocketDev/socket-mcp#230 adds a bare WWW-Authenticate challenge on connect, with tests.

  • socket-mcp main already returns 401 on an unauthenticated initialize, but production mcp.socket.dev runs different code. The hosted deployment must be updated as well before Cursor can sign in.
  • Until then, the README and the Cursor rule say this plainly and point users to the CLI sign-in (pnpm dlx socket login).

    Testing

  • Rebased onto main after #25 and #28 landed.

  • pnpm run check passes, and all repo tests pass locally: 56 files, 1253 tests. pnpm run generate:check reports the generated files are up to date.

  • The push ran the repo's git hooks.

  • Not tested in Cursor itself.
  • <!-- CURSOR_SUMMARY -->
    ---

    [!NOTE]

    Medium Risk

    Expands agent-obeyed shipped instructions and connects users to an external OAuth MCP endpoint; config avoids embedding secrets but auth and dependency-check behavior in Cursor sessions depend on this wiring.

    > Overview

    The Cursor plugin now wires in Socket's hosted MCP at https://mcp.socket.dev/ (OAuth in the browser, no API key in config) instead of an empty MCP stub, and the manifest adds display name, logo, and rules that tell the agent when to run depscore / org tools and how to fall back to the Socket CLI if Cursor OAuth fails.

    > README documents the Customize → Authenticate flow and the known Cursor OAuth limitation.

    > Repo tooling follows suit: the Cursor plugin generator emits the OAuth-only MCP JSON, requires the hand-maintained logo and rules paths, and tests assert no credentials ship. Shipped-content gates now treat .cursor-plugin/rules (including .mdc files) like other agent-obeyed surfaces for fleet-leak and injection scans.

    > <sup>Reviewed by Cursor Bugbot for commit f88cdb7763928ed3e45445bc17bed785348ef3de. Configure here.</sup>

    <!-- /CURSOR_SUMMARY -->

    Diff: 152 lines (+144 / -8) across 9 files Reviewer: jdalton Review duration: 1683m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.73) × (1 − Review Confidence (0.68)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.73 · 152 lines diff across 9 files
    0.73
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.35 · 1 substantive comment(s)
    0.35
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    67%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.301
    Sensitive Paths sensitive_paths
    0.073
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #26"
    general weight: 0.35
    Reviewers
    Assignees
    ljharb ljharb
    Labels
    risk: low confidence: 67.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 73% (HIGH) · Higher = larger blast radius
    73%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 67.5% · Lower = rushed or shallow review
    67.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 23.7% · Safe to merge
    23.7%