Skip to content

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

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

sweetmantech merged 1 commit into
testfrom
feat/mcp-dual-auth-privy-apikey

Conversation

@sweetmantech

Copy link
Copy Markdown
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 <noreply@anthropic.com>
@vercel

vercel Bot commented Jan 15, 2026 •

Copy link
Copy Markdown
Contributor

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

coderabbitai Bot commented Jan 15, 2026

Copy link
Copy Markdown

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.

This branch was successfully deployed

1 active deployment
Preview — 9b227abc Deployed Jan 15, 2026 by vercel[bot]
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