Google Calendar Remote MCP (Next.js)
Remote MCP server for Google Calendar using the MCP Streamable HTTP transport, deployable to Vercel.
Setup
- Install dependencies:```bash
npm install
2. Environment:
- `.env` is tracked for non-secret defaults.
- `.env.local` holds secrets and is **not** committed.
Required secrets in `.env.local`:```
MCP_PATH_SECRET=your-random-secret
GOOGLE_CLIENT_ID=...
GOOGLE_CLIENT_SECRET=...
GOOGLE_REFRESH_TOKEN=...
GOOGLE_ACCESS_TOKEN=...
GOOGLE_TOKEN_EXPIRY_MS=...
- Run locally:```bash
npm run dev
## MCP Endpoint
The MCP endpoint is:```
POST /api/mcp/<MCP_PATH_SECRET>
Example base URL:```
http://localhost:3000/api/mcp/<MCP_PATH_SECRET>
## Tools
- `list_calendars`
- `list_events`
- `get_event`
- `create_event`
- `update_event`
- `delete_event`
- `gmail_get_profile`
- `gmail_list_labels`
- `gmail_list_messages`
- `gmail_get_message`
- `gmail_send_message`
- `gmail_modify_labels`
- `tasks_list_tasklists`
- `tasks_list`
- `tasks_get`
- `tasks_create`
- `tasks_update`
- `tasks_delete`
- `drive_list_files`
- `drive_get_file`
- `drive_create_folder`
- `drive_rename_file`
- `drive_delete_file`
## Deployment (Vercel)
- Push this repo to GitHub.
- Import into Vercel as a Next.js project.
- Add secrets from `.env.local` to Vercel Environment Variables.
- Deploy.
The deployed MCP URL will be:```
https://<your-vercel-domain>/api/mcp/<MCP_PATH_SECRET>
Smoke Test
Run a basic API smoke test (requires valid OAuth tokens in .env.local):bash
npm run test:smoke
