dgmulei/oauth-mcp-server
3.2
If you are the rightful owner of oauth-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A minimal OAuth-compliant MCP server designed to work with Claude Web's 'Connect' button.
Tools
2
Resources
0
Prompts
0
OAuth MCP Server
A minimal OAuth-compliant MCP (Model Context Protocol) server designed to work with Claude Web's "Connect" button.
Goal
Get Claude Web to connect via the "Connect" button and show "Connected" status.
Architecture
- Platform: Cloudflare Workers
- Transport: Server-Sent Events (SSE)
- Authentication: OAuth 2.0 with PKCE
- Protocol: MCP (Model Context Protocol)
Project Structure
oauth-mcp-server/
āāā src/
ā āāā index.ts # Main worker entry point
ā āāā oauth/ # OAuth implementation
ā ā āāā endpoints.ts # OAuth endpoints (/authorize, /token, etc.)
ā ā āāā utils.ts # JWT utilities, crypto functions
ā āāā mcp/ # MCP protocol implementation
ā ā āāā protocol.ts # MCP message handling
ā ā āāā tools.ts # Minimal tools (echo, ping)
ā ā āāā transport.ts # SSE transport layer
ā āāā types.ts # TypeScript type definitions
āāā wrangler.toml # Cloudflare Workers configuration
āāā package.json # Dependencies and scripts
āāā tsconfig.json # TypeScript configuration
āāā deployment.md # Deployment instructions for Windsurf
Development Setup
-
Install dependencies:
npm install
-
Set up Cloudflare environment:
npx wrangler login
-
Set secrets:
npx wrangler secret put JWT_SECRET
-
Run locally:
npm run dev
-
Deploy:
npm run deploy
Testing with Claude Web
- Deploy the worker to get your URL
- In Claude Web, click "Connect"
- Use your worker URL as the server endpoint
- Complete OAuth flow
- Verify "Connected" status appears
Next Steps for Windsurf
See deployment.md
for detailed deployment and testing instructions.