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

OAuth

Initiate OAuth authorization flows for your audience. Requires an OAuth app registered in the MewCP dashboard first.


Start OAuth flow for an audience member

POST
https://gateway.mewcp.com
/oauth/{provider}/start

Generates an authorization URL to redirect your audience member to. After the user authorizes, MewCP stores the credential under their externalUserId.

Prerequisites:

  • Register an OAuth app for the provider and assign it to the server key you'll use: Dashboard (mode=business) -> Servers -> select server -> Register OAuth Client.
  • Requires the x-mewcp-key header (see Authentication above): the OAuth app used is always the one assigned to that server key, there is no per-request app selection.

After success, subsequent MCP proxy calls include x-external-user-id: {externalUserId} in the request headers and MewCP resolves the right credential automatically.

Start OAuth flow for an audience member › path Parameters

provider
​string · required

Provider slug (e.g. Google, github, Slack, notion)

Start OAuth flow for an audience member › Headers

x-mewcp-key
​string · required

API Key of the business-mode server to connect this user to. Must match provider.

Start OAuth flow for an audience member › Request Body

externalUserId
​string · required

Your internal user identifier. Used to associate the credential with your user.

frontendCallbackUrl
​string

URL to redirect the user to after OAuth completes (receives ?provider=github&success=true)

​ExternalUserMeta

Optional metadata about the audience member. Stored alongside their credentials for display in the MewCP dashboard.

Start OAuth flow for an audience member › Responses

Authorization URL ready. Redirect your user to authUrl.

authUrl
​string

Redirect your audience member to this URL

state
​string

CSRF state token (managed internally, no action needed)

POST/oauth/{provider}/start
curl https://gateway.mewcp.com/oauth/:provider/start \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: <api-key>' \ --header 'x-mewcp-key: <api-key>' \ --data '{ "externalUserId": "user_abc123", "frontendCallbackUrl": "https://yourapp.com/settings/connections/callback", "externalUserMeta": { "name": "Jane Smith", "email": "jane@example.com" } }'
Example Request Body
{ "externalUserId": "user_abc123", "frontendCallbackUrl": "https://yourapp.com/settings/connections/callback", "externalUserMeta": { "name": "Jane Smith", "email": "jane@example.com" } }
json
application/json
Example Responses
{ "authUrl": "https://accounts.google.com/o/oauth2/v2/auth?client_id=YOUR_CLIENT_ID&redirect_uri=https%3A%2F%2Fgateway.mewcp.com%2Foauth%2Fcallback&response_type=code&state=a38a39dfed2e4e6f7ba164a7580d716&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.modify+openid+email+profile", "state": "a38a39dfed2e4e6f7ba164a7580d716" }
json
application/json

Static Credentials