MCP Gateway
ApiOauth apps

Attach OAuth app to server

Link an OAuth app to an MCP server so the server can use it for per-user authentication. An app can be attached to multiple servers.

POST
/api/v1/oauth-apps/{app_id}/servers/{server_id}

Authorization

User API Key
AuthorizationBearer <token>

User API key (mgw_usr_live_* or mgw_usr_test_*)

In: header

Path Parameters

app_id*string
Formatuuid
server_id*string
Formatuuid
access_token?|

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/oauth-apps/497f6eca-6276-4993-bfeb-53cbbbba6f08/servers/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "oauth_app_id": "bf295b67-8583-439b-af58-e5af4617dc04",
  "server_id": "820efca4-4a15-4ab7-82fc-9e76f6d61325",
  "message": "Successfully attached OAuth app to server",
  "created_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}