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
Information
OAuth
    Start OAuth flow for an audience memberpost
Static Credentials
    Get hosted form URL for audience member static credentialspost
Audience
    List audience for a servergetGet audience member detailsgetRevoke an audience member's credential for a serverdelete
Schemas
powered by Zudoku
MewCP Auth API

MewCP Auth API

B2B API for connecting your audience to MCP-powered tools via OAuth or static credentials.

MCP servers require two things to work for your users: hosting and credential management. MewCP provides both. You call this API from your backend, MewCP handles everything else - OAuth handshakes, token storage, automatic refresh, and encrypted credential vaults. Your users connect their accounts; your backend only ever holds an opaque externalUserId.

Authentication

Every endpoint requires an Account API Key passed as a Bearer token:

Code
Authorization: Bearer mewcp_acct_YOUR_KEY

Generate an Account API Key from your MewCP dashboard under Developer -> Account API Keys.

Every endpoint also requires an x-mewcp-key header carrying the API Key of the server you're acting on:

Code
Authorization: Bearer mewcp_acct_YOUR_KEY x-mewcp-key: mcp_live_YOUR_SERVER_KEY

This is the same API Key used to authenticate MCP client connections (see API Key), and it must be a business-mode server key. For /oauth/{provider}/start and /credentials/static/{providerSlug}/connect it must also match the provider/providerSlug in the path. Without it, these endpoints return 401/400.

OAuth vs Static Credentials

OAuthStatic Credentials
Use whenProvider supports OAuth (Google, Slack, GitHub, Notion…)Provider uses API keys or secrets (Gemini, Razorpay, Firecrawl…)
User experienceStandard OAuth popup/redirect loginHosted form where user pastes their key
Token refreshAutomatic - MewCP refreshes before expiryNot applicable
Your backend storesNothing - only externalUserIdNothing - only externalUserId

Integration guides

For step-by-step integration instructions, including frontend popup setup, local testing flows, and how to handle success/error callbacks, see the dedicated guides:

  • OAuth Integration Guide
  • Static Credentials Integration Guide

Quick reference

OAuth flow:

  1. Register your OAuth app in the MewCP dashboard under Credentials → OAuth Apps
  2. Call POST /oauth/{provider}/start with externalUserId (+ optional frontendCallbackUrl), sending both your Account API Key (Authorization) and the server's API Key (x-mewcp-key)
  3. Open the returned authUrl for your user - as a popup or direct browser open
  4. MewCP completes the handshake, encrypts and stores the tokens

Static credentials flow:

  1. Call POST /credentials/static/{providerSlug}/connect with externalUserId (+ optional frontendCallbackUrl), sending both your Account API Key (Authorization) and the server's API Key (x-mewcp-key)
  2. Send the returned hostedFormUrl to your user - it expires in 5 minutes
  3. User fills in their API key on MewCP's hosted page
  4. MewCP encrypts and stores the credentials in vault
Tags
OAuth
Initiate OAuth authorization flows for your audience. Requires an OAuth app registered in the MewCP dashboard first.
Static Credentials
Generate hosted form URLs so audience can submit static API keys or tokens.
Audience
List, inspect, and revoke audience member credentials.
ContactMewCP Supportcontact@mewcp.comhttps://mewcp.com
Servers
https://gateway.mewcp.com

Production