# Kimi Code CLI MCP setup for iCloud and Microsoft 365

<!-- MCP_HOST_IDS: kimi-code -->
<!-- MCP_HOST_COMPATIBILITY:START -->
## Connection and authentication

Use the authentication method shown for each client surface.

| Client surface | Authentication | Setup guide |
| --- | --- | --- |
| Kimi Code CLI | API key via environment | Setup guide available |
<!-- MCP_HOST_COMPATIBILITY:END -->

Connect Kimi Code CLI to Pear with a private API-key header to use your connected calendar, mail, contacts, and supported tasks.

This guide covers Kimi Code CLI. Consumer Kimi chat and the Kimi model API are separate surfaces; using a Kimi model does not configure Pear in the client hosting it.

## 1. Prepare your Pear account

[Sign in to Pear](https://pearmcp.com/login), connect iCloud or Microsoft 365, and create a personal Pear API key in Settings. Select only the provider permissions you need.

## 2. Add a private remote MCP connection

Open the user-level `~/.kimi-code/mcp.json`, or `$KIMI_CODE_HOME/mcp.json` if you customized the home directory. Merge Pear into `mcpServers`. You can also use `/mcp-config` to edit servers interactively, choosing the user-level configuration. Keep the key out of project-level `.kimi-code/mcp.json`.

```json
{
  "mcpServers": {
    "pear": {
      "url": "https://pearmcp.com/api/mcp",
      "bearerTokenEnvVar": "PEAR_API_KEY"
    }
  }
}
```

An entry with `url` and no `transport` uses HTTP. Set `PEAR_API_KEY` to your Pear key in the private environment that starts Kimi Code. Its documented `bearerTokenEnvVar` field reads that variable and supplies Bearer authentication.

Keep the variable name in the configuration; do not replace it with the key or add a second Authorization header. Do not paste the key into chat, shell history, screenshots or shared files.

## 3. Verify access with a bounded read

Start a new session after adding the server, then use `/mcp` to inspect its connection status and tools.

Ask the agent to call `pear_provider_status`. Confirm the expected provider, account, and ready services. Then read one known event from a named calendar within an explicit date range and timezone. Compare the result with your calendar.

Keep client tool approvals enabled. Kimi's Ask When Needed mode automatically approves MCP calls; avoid that mode while checking the connection. For a change, request a draft through `pear_draft_write`, inspect the exact account, recipients, dates, and content, and approve only that action before `pear_execute_approved_write`. Check the receipt and provider result. A successful read does not prove writes work.

## Try a small planning task

“Find my next project review meeting this week in my work calendar. Use my timezone and show the date and attendees without changing anything.”

Expand the workflow only after the account and first result match your expectations. Available tools depend on connected providers, scopes, plan, and client policy. Pear Free includes 50 counted provider actions per month; check [current plans](https://pearmcp.com/pricing) for your needs.

## Troubleshooting and removing access

If Pear is missing, check the configured home directory and start a new session. A project entry named pear overrides the user entry; inspect that override without copying your personal key into the repository.

For authentication failures, check that Kimi inherited `PEAR_API_KEY` and that the key is active in Pear. For unavailable services, repair the provider connection in Pear. An OAuth login prompt is not proof this API-key setup has connected.

To remove access, revoke the API key in Pear and delete the local Pear server entry. Removing the entry alone does not revoke a copied key. Revoke an exposed key before replacing it, and update any other clients that used that key.

Pear receives structured tool calls rather than your full chat transcript. Tool results enter the AI client and are subject to its data policies. Review [Pear data handling](https://pearmcp.com/data-handling) before sharing sensitive provider data.

## Provider limits and next steps

Pear supports iCloud and Microsoft 365. Its hosted CalDAV connection can access only legacy reminder data Apple still exposes, not the upgraded Apple Reminders store. Reconnecting cannot change this limit. Microsoft To Do is unaffected. Google Workspace is coming soon.

- [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)

## Sources and compatibility status

Documentation checked on 4 October 2026. Setup guide available; authenticated Pear testing in Kimi Code CLI, including authentication, tool discovery, a read, an approved write, and revocation, remains pending. This guide is not an official marketplace listing or an endorsement by the client vendor.

- [Official Kimi Code CLI MCP documentation](https://www.kimi.com/code/docs/en/kimi-code-cli/customization/mcp.html)
- [HTML setup guide](https://pearmcp.com/guides/kimi-code)
