MewCPMewCP
  • AstheTech
  • Contact Us
  • Documentation
  • MewCP Auth API
Have a question?
  • ✉ Contact us - our dev team will reach out as soon as possible

© 2026 MewCP. All rights reserved.

githubx
Getting Started
Connect AI Apps
    Chat apps
    Editors
    CLI agents
      Claude CodeCodexOpenCodeOpenClawHermesDeepSeek HarnessKimi CodeGrok BuildMuse CodeClineJunieAmpQwen CodeGoose
Frameworks & SDKs
Authentication
Auth API Guides
powered by Zudoku
CLI agents

How to Connect OpenCode to MewCP

Add MewCP to OpenCode once, and OpenCode can use every app you have connected in MewCP: Gmail, Calendar, Slack, GitHub and the rest. OpenCode connects to MewCP directly over HTTP and signs in with your MewCP account, so there is nothing to install and no API key to paste.


Before you start

  • OpenCode installed (install guide)
  • A MewCP account with at least one app connected under Apps

Set up MewCP

  1. Open your config

    Edit one of these files, or create it if it does not exist. OpenCode reads both and merges them:

    FileMewCP loads in
    ~/.config/opencode/opencode.jsonEvery project
    opencode.json in a project rootThat project only, for everyone who opens it from git
  2. Add the server

    Code
    { "$schema": "https://opencode.ai/config.json", "mcp": { "mewcp": { "type": "remote", "url": "https://gateway.mewcp.com/personal/mcp", "enabled": true } } }

    Already have an mcp section? Add only the "mewcp": { ... } entry inside it.

  3. Sign in

    TerminalCode
    opencode mcp auth mewcp

    Sign in to MewCP in the browser window and click Allow access.

This is the entire configuration. One entry reaches every app you have connected, and connecting another app later needs no change here. The file holds no secret, so a project's opencode.json can go into git, and each person signs in with their own account.


Check it works

Run:

TerminalCode
opencode mcp list

mewcp should be listed. To test the connection itself, run opencode mcp debug mewcp.

You will see four tools, not the tools of every app: search, get_schema, manage_connections and call_tool. That is expected. OpenCode uses them to find and run the right tool for whatever you ask. See How MewCP works.

Then ask for something from an app you have connected. Adding use mewcp tells OpenCode which tools to reach for:

Code
What is on my calendar tomorrow? use mewcp

Use an API key instead

To send an API key from Dashboard → API Keys instead of signing in, add "oauth": false and a header. Replace API_KEY with your key:

Code
"mewcp": { "type": "remote", "url": "https://gateway.mewcp.com/personal/mcp", "enabled": true, "oauth": false, "headers": { "Authorization": "Bearer API_KEY" } }

Keep "oauth": false with a key. Without it, OpenCode starts a sign-in whenever MewCP answers 401.

To keep the key out of the file, use "Bearer {env:MEWCP_API_KEY}" with MEWCP_API_KEY set in your shell profile, or "Bearer {file:~/.secrets/mewcp-key}" with the key alone in that file.


Troubleshooting

opencode mcp list shows MewCP needs authentication

OpenCode has not signed in yet, or the sign-in has expired. Run opencode mcp auth mewcp again. See OAuth Sign-In for errors on the sign-in page.

MewCP returns 401 or 403

  • With an API key, check the header reads Bearer followed by the whole key, which starts with mewcp_proj_. With {env:MEWCP_API_KEY}, check the variable is set in the terminal you start OpenCode from: OpenCode replaces an unset variable with an empty string, so MewCP receives no key.
  • A 403 that says your plan's billing period has ended means your MewCP plan needs renewing under Billing.

MewCP's tools do not load on a slow connection

OpenCode waits 5 seconds for a server's tools. Raise the limit with timeout, in milliseconds:

Code
"mewcp": { "type": "remote", "url": "https://gateway.mewcp.com/personal/mcp", "enabled": true, "timeout": 15000 }

A change to the config does nothing

OpenCode merges the global and project files, and the project's opencode.json wins for the same key. If MewCP is defined in both, edit the project's entry. Run opencode debug config to see the config OpenCode actually uses.


Last updated on 29 November 2026.

Last modified on November 29, 2026
CodexOpenClaw
On this page
  • Before you start
  • Set up MewCP
  • Check it works
  • Use an API key instead
  • Troubleshooting
    • opencode mcp list shows MewCP needs authentication
    • MewCP returns 401 or 403
    • MewCP's tools do not load on a slow connection
    • A change to the config does nothing
JSON
JSON
JSON