Add remote deployment via Vercel#1
Open
popand wants to merge 3 commits into
Open
Conversation
Deploy Apple Music MCP as a stateless Vercel serverless function with bearer token auth, per-request Music User Token support, and a hosted auth page for onboarding users via MusicKit JS. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a "Quick Start (Hosted)" section as the primary onboarding path so users can get started without an Apple Developer account. Reorganize the self-hosted setup under its own section and document both local and remote architecture modes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replace hardcoded Team ID and Key ID with placeholders in VERCEL_DEPLOYMENT_PLAN.md. Expand .gitignore to cover all .env* variants (e.g. .env.local, .env.production). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b96d3f3 to
fb97f11
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
applemusicmcp.gradientworks.ca/mcp/auth) using MusicKit JS so users can get a Music User Token without any local setupMusic-User-Tokenheader (no server-side token storage)joselibrary for ES256 JWT signing (works on Vercel edge/serverless, unlikejsonwebtoken)MCP_API_KEYenv var) to secure the endpointNew Files
api/mcp.ts— Vercel serverless MCP handler with CORS, auth, stateless transportapi/auth.ts— Serves the auth HTML page with developer token injectedpublic/auth.html— Browser-based MusicKit JS auth flow with token display and setup instructionssrc/auth/developer-token-jose.ts— Async JWT signing withjosesrc/config-vercel.ts— Config loader for Vercel env vars (base64-decoded private key)vercel.json— Routes, CORS headers, function configTest plan
applemusicmcp.gradientworks.ca/mcpresponds to MCP requests/authpage loads, MusicKit JS initializes, and authorization flow produces a tokenmcp-remotewith Music-User-Token header