Skip to content
OpenCode client guide

OpenCode MCP setup for iCloud and Microsoft 365

Configure Pear in OpenCode v1 or v2 with an environment-backed API key for iCloud and Microsoft 365. Setup documented; host testing remains open.
Remote MCPPersonal connectionBearer API keyStreamable HTTPSetup guide available

Connection details

The values OpenCode asks for first.

Pear hosted endpoint
https://pearmcp.com/api/mcp
Authentication
Bearer API key
Setup surface
opencode.json or opencode.jsonc

OpenCode documents remote MCP and environment-backed headers. Pear host testing remains open.

Setup guide availableOfficial setup reference

1. Connect your provider in Pear

Sign in to Pear, connect Apple iCloud or Microsoft 365, and copy your Pear API key from Settings. Supply it as PEAR_API_KEY in the environment that starts OpenCode. The key authenticates your Pear account, not your model provider.

2. Use the configuration for your OpenCode version

Check your installed major version first. OpenCode v1 puts named servers directly under mcp. OpenCode v2 puts them under mcp.servers. Merge the matching entry into your existing configuration.

OpenCode v1

{
  "mcp": {
    "pear": {
      "type": "remote",
      "url": "https://pearmcp.com/api/mcp",
      "oauth": false,
      "headers": {
        "Authorization": "Bearer {env:PEAR_API_KEY}"
      }
    }
  }
}

OpenCode v2

{
  "mcp": {
    "servers": {
      "pear": {
        "type": "remote",
        "url": "https://pearmcp.com/api/mcp",
        "oauth": false,
        "headers": {
          "Authorization": "Bearer {env:PEAR_API_KEY}"
        }
      }
    }
  }
}

Keep the literal environment reference in the file. oauth: false selects the API-key path. Pear does not offer automatic dynamic client registration, so a generic OAuth example is not a replacement for this configuration.

3. Check the connection before using your data

Open your MCP connection list and confirm Pear is connected. In v1, use opencode mcp list. Ask OpenCode to call pear_provider_status and report which accounts and services are ready. An empty tool list is a setup issue to resolve before requesting calendar or mail work.

If OpenCode cannot connect

A configuration error can mean the v1 and v2 structures were mixed. An authentication error can mean PEAR_API_KEY was absent when OpenCode started. Restart your own OpenCode session after changing its environment. Never paste your key into a chat to diagnose the error.

Choose a useful first workflow

Start with a read. Ask which calendars are connected, find an event in a specific date range, or search a mail folder for a message you already know. Specify the account and timezone when they matter.

For Apple accounts, see iCloud setup and services and iCloud Mail workflows. For Microsoft accounts, see Microsoft 365 setup, Outlook Mail, and Microsoft To Do.

Apple Reminders availability depends on the Apple account. For Apple, Pear can read and write only the legacy reminder lists Apple still exposes through CalDAV. If the account has been upgraded to Apple's newer Reminders store, Pear cannot access those native lists and does not copy them into a separate reminder store. Apple may instead return compatibility placeholders, such as repeated "Where are my reminders?" items; Pear did not create them. Pear's safe fallback hides known placeholders and blocks writes to affected lists. Reconnecting iCloud or replacing the App-Specific Password will not change this Apple limitation. Calendar, Contacts, and Mail are unaffected, and Microsoft To Do uses Microsoft Graph and is unaffected. Full modern Apple Reminders access would require an Apple-platform companion using EventKit with the user's permission; Pear does not currently provide one. Google Workspace remains coming soon.

Pear exposes tools allowed by your account and permissions. Your AI client decides when to call them. Review recipients, dates, and content before approving writes. Read how Pear handles your data and the current plans before expanding the workflow.

Sources and compatibility status

Documentation checked on 9 September 2026. This page documents configuration and requirements. It does not certify a completed Pear connection in OpenCode.

OpenCode official MCP documentation

OpenCode v2 MCP reference

OpenCode + Pear

Put OpenCode to work across your providers.

Free includes 50 counted provider actions/month. Most provider reads or writes count as one action. Batch writes count once per item. Setup and discovery do not count. Failed actions Pear can confirm had no provider effect also do not count; actions with an unknown outcome may count. Pro removes the cap.