Skip to content

fix: use x-api-key auth header for Claude plugin API requests#37

Open
Ramyprojs wants to merge 1 commit intosupermemoryai:mainfrom
Ramyprojs:fix/claude-plugin-auth-header
Open

fix: use x-api-key auth header for Claude plugin API requests#37
Ramyprojs wants to merge 1 commit intosupermemoryai:mainfrom
Ramyprojs:fix/claude-plugin-auth-header

Conversation

@Ramyprojs
Copy link
Copy Markdown

fix: use x-api-key auth header for Supermemory API requests

Related: supermemoryai/supermemory#801


Problem

The plugin was sending Authorization: Bearer <key> to Supermemory API endpoints that require x-api-key. This caused all save, search, and profile operations to silently fail even when a valid API key was configured — so nothing was ever actually stored.

Root Cause

The plugin client was relying on the SDK's default auth behavior, which sends Authorization: Bearer. For direct API calls in this integration path, the API expects x-api-key instead.

Changes

  • src/lib/supermemory-client.js — set x-api-key as the default auth header and explicitly override the SDK's Bearer behavior
  • plugin/scripts/*.cjs — rebuilt all runtime bundles so the fix is reflected in the shipped plugin artifacts

Safety

Only the auth header was changed. The API key source, validation flow, and all other request headers are untouched.

Verification

  • Build completes successfully
  • All 5 generated plugin scripts (add-memory, search-memory, context-hook, summary-hook, save-project-memory) confirmed to include x-api-key
  • No other behavior changes

Scope Note

Issue #801 also reports Cloudflare/platform availability problems — those are server-side and out of scope here. This PR addresses only the plugin auth-header bug.


Checklist

  • Plugin requests use x-api-key
  • Runtime bundles rebuilt
  • No unrelated changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant