# Connect Gmail to VS Code

> One MCP server in agent mode, and Copilot can read and answer your mail.

VS Code reaches outside tools through MCP servers in Copilot agent mode, so adding DaySurface gives Copilot your inbox alongside your code. VS Code also renders MCP Apps, which means the inbox arrives as an actual dashboard in the chat panel rather than as JSON for the model to paraphrase. There is nothing to install beyond the server entry itself.

## The server URL

```
https://mcp.daysurface.com/mcp
```

Transport is streamable HTTP. Auth is OAuth in the browser - there is no key to
paste and no account to create.

## Before you start

- A Google account with Gmail.
- GitHub Copilot in VS Code, with agent mode available. MCP servers are an agent-mode feature - they do not appear in ask or edit mode.

## Add DaySurface to VS Code

1. **Switch Copilot Chat to agent mode** - Open the Copilot Chat panel and pick Agent from the mode selector. MCP tools are only offered in agent mode, so a server added while you are in ask mode will look like it did not work.
2. **Add the server** - Open the Command Palette and run MCP: Add Server, choose the HTTP option, and paste the DaySurface endpoint. This writes an entry to your MCP configuration - pick the user-level scope if you want it available across every workspace rather than one project.
3. **Sign in with Google** - Start the server and complete the Google sign-in it opens in your browser. Review the scopes on the consent screen before approving. There is no key or token to paste back into VS Code.
4. **Check the tools are there** - Open the tools picker in the Copilot Chat panel and confirm the DaySurface tools are listed and enabled. If the list looks stale, reload the window.

## What VS Code can do once it is connected

### Triage a ranked inbox without leaving the chat
The inbox arrives as an interactive dashboard rendered inside the conversation, not as a wall of JSON for the model to summarise. You read, rank and clear threads in place.

### Draft replies in a real composer
Replies open in an editable composer you can correct before anything sends. Nothing leaves your account on the model's say-so alone.

### Fill and sign PDF attachments
Attached forms can be filled in from the thread. Signing is a step you complete yourself - the tool never types a signature on your behalf.

### Search across threads by meaning, not just keywords
Search runs server-side over your mail and returns threads, so the agent works from what is actually in your inbox rather than what it can hold in context.

## Questions

### Why do I have to be in agent mode?
MCP tools are wired into agent mode specifically. Ask and edit mode do not call external tools, so the server will connect fine and still appear to do nothing until you switch.

### Can I share the server with my team through the repo?
Yes. A workspace-scoped MCP entry can be committed so everyone who opens the project gets the server. Each person still signs in to their own Google account - nothing about the shared config shares mail access.

### Do I need a DaySurface account?
No. There is no account to create and no password to set. You add the server to your client, then sign in to Google when it asks. Authorisation is the whole signup.

### Is there an API key to paste?
No. Auth is OAuth in the browser. If a setup guide anywhere tells you to paste a key, it is not describing this server.

### What does it get access to?
The Google scopes you approve in the consent screen, and nothing else. You can review them at the moment of sign-in and revoke them later from your Google account.

### Can I run it myself instead?
Yes. It is MIT-licensed and self-hostable, and the same tools are exposed over a CLI and a plain HTTP API as well as MCP. Point your client at your own deployment instead of the hosted endpoint.

## More

- Connect Gmail to Claude: https://daysurface.com/connect-gmail-to-claude.md
- Connect Gmail to ChatGPT: https://daysurface.com/connect-gmail-to-chatgpt.md
- Connect Gmail to Goose: https://daysurface.com/connect-gmail-to-goose.md
- Connect Gmail to Cursor: https://daysurface.com/connect-gmail-to-cursor.md
- Connect Gmail to Microsoft 365 Copilot: https://daysurface.com/connect-gmail-to-microsoft-365-copilot.md
- Triage argument: https://daysurface.com/ai-email-triage.md
- Every client's install path: https://daysurface.com/connect.md
- Setup reference: https://daysurface.com/docs/mcp/setup
- Full description for LLMs: https://daysurface.com/llms-full.txt
