# Visual Studio MCP setup for iCloud and Outlook with Pear

<!-- MCP_HOST_IDS: visual-studio -->
<!-- MCP_HOST_COMPATIBILITY:START -->
## Connection and authentication

Use the authentication method shown for each client surface.

| Client surface | Authentication | Setup guide |
| --- | --- | --- |
| Visual Studio | API key | Setup guide available |
<!-- MCP_HOST_COMPATIBILITY:END -->

Use Pear from GitHub Copilot agent mode in Visual Studio on Windows, with your
connected iCloud or Microsoft 365 account. For VS Code, use the
[VS Code Copilot guide](https://pearmcp.com/llm/guide-vscode-copilot.md).

## 1. Prepare Visual Studio and Pear

You need Visual Studio 2026, or Visual Studio 2022 version 17.14 or later, signed in to
GitHub Copilot. Your organisation's Copilot policy must allow agent mode and MCP
servers, and an allow list can block unapproved servers.

[Sign in to Pear](https://pearmcp.com/login), connect iCloud or Microsoft 365, and
create an API key in Settings.

## 2. Add Pear from the chat tool picker

Copilot Chat → Agent mode → Tools → + (Visual Studio 2026: Add custom MCP server). Use
Pear as the server ID, choose HTTP/SSE, enter `https://pearmcp.com/api/mcp`, and add a header named
Authorization with the value `Bearer YOUR_PEAR_API_KEY`.

Save it to `%USERPROFILE%\.mcp.json`, not a solution file; `<SOLUTIONDIR>\.mcp.json`
is meant for source control. The saved entry looks like:

```json
{
  "servers": {
    "pear": {
      "url": "https://pearmcp.com/api/mcp",
      "requestInit": {
        "headers": {
          "Authorization": "Bearer YOUR_PEAR_API_KEY"
        }
      }
    }
  }
}
```

The file holds the key as plain text. An Authentication Required CodeLens for Pear
means the header is missing or wrong; Pear has no Visual Studio OAuth client.

## 3. Enable the tools and check a result

New MCP tools are disabled by default. Enable `pear_provider_status` and the calendar
read tools in the tool picker. Ask Copilot to call `pear_provider_status` and name the ready accounts and services. Then read one day of events from a named calendar with your timezone, and compare the result with your calendar app. If no Pear tool ran, nothing was read.

## Troubleshooting and revocation

Check the file is valid JSON in a location Visual Studio reads. A policy error means
the server is not on your organisation's allow list. When Pear's tools change, Visual
Studio resets earlier tool approvals. Revoke the key in Pear and delete the `pear`
entry.

## Provider limits and next steps

Tools depend on your connected provider, account permissions, and client settings. Start with a read, then inspect a preview before approving writes.

- [iCloud setup](https://pearmcp.com/icloud-mcp-server)
- [iCloud Mail](https://pearmcp.com/ai-icloud-mail)
- [Microsoft 365 setup](https://pearmcp.com/microsoft-365-mcp-server)
- [Outlook Mail](https://pearmcp.com/outlook-mail-mcp)
- [Microsoft To Do](https://pearmcp.com/microsoft-to-do-mcp)
- [Data handling](https://pearmcp.com/data-handling)
- [Plans](https://pearmcp.com/pricing)

Pear's hosted CalDAV connection cannot access Apple's upgraded Reminders store. Only legacy reminder data still exposed through CalDAV is available; reconnecting cannot change this limit. Microsoft To Do is unaffected. Gmail works with a Google app password. Google sign-in for Calendar, Tasks and Contacts is coming soon.

## Sources and compatibility status

Documentation checked on 25 November 2026. Setup guide available; a complete Pear authentication, tool-list, read, and approved-write test in Visual Studio is still pending. Microsoft's page does not show the header field; the header
steps and `requestInit` format come from GitHub's Visual Studio instructions.

- [Microsoft: use MCP servers in Visual Studio](https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers)
- [GitHub: MCP server headers in Visual Studio](https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/set-up-the-github-mcp-server)
- [HTML setup guide](https://pearmcp.com/guides/visual-studio)
