MCP_Proxy
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
An MCP (Model Context Protocol) proxy server that provides authenticated Gmail access through OAuth.
- OAuth 2.0 authentication with Google
- MCP server implementation for Gmail operations
- Session management and token refresh
- Secure proxy for Gmail API access
backend/index.ts- Main HTTP server and MCP endpointbackend/auth/- OAuth flow and session managementbackend/mcp/- MCP protocol implementationbackend/gmail/- Gmail API integrationfrontend/- OAuth callback and admin interface
Required:
GOOGLE_CLIENT_ID- Google OAuth client IDGOOGLE_CLIENT_SECRET- Google OAuth client secretJWT_SECRET- Secret for signing session tokens
- Start OAuth flow:
GET /auth/google - Handle callback:
GET /auth/callback - Connect MCP client to:
POST /mcp(with Authorization header)
gmail_list_messages- List Gmail messagesgmail_get_message- Get specific message contentgmail_send_message- Send emailgmail_search_messages- Search messages with query