Skip to content

feat: support both Privy JWT and API key for MCP authentication#120

Merged
sweetmantech merged 1 commit intotestfrom
feat/mcp-dual-auth-privy-apikey
Jan 15, 2026
Merged

feat: support both Privy JWT and API key for MCP authentication#120
sweetmantech merged 1 commit intotestfrom
feat/mcp-dual-auth-privy-apikey

Conversation

@sweetmantech
Copy link
Contributor

Summary

  • Add getAccountIdByApiKey function to validate API keys via hash lookup
  • Update verifyBearerToken to try Privy JWT validation first, then fall back to API key validation
  • Recoup-Chat uses Privy access tokens, external clients can use API keys

Test plan

  • Test MCP endpoint with Privy JWT token (from Recoup-Chat)
  • Test MCP endpoint with API key (from external clients)
  • Verify unauthorized requests are rejected

🤖 Generated with Claude Code

- Add getAccountIdByApiKey to validate API keys via hash lookup
- Update verifyBearerToken to try Privy JWT first, then API key
- Recoup-Chat can use Privy tokens, external clients use API keys

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@vercel
Copy link
Contributor

vercel bot commented Jan 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
recoup-api Ready Ready Preview Jan 15, 2026 9:37pm

@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sweetmantech sweetmantech merged commit 1e4c48b into test Jan 15, 2026
4 checks passed
@sweetmantech sweetmantech deleted the feat/mcp-dual-auth-privy-apikey branch January 15, 2026 21:40
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

Comments