agent-swarm.devagent-swarm.dev

MCP OAuth

OAuth flows for MCP client authorization — register and manage OAuth connections

DELETE
/api/mcp-oauth/{mcpServerId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

mcpServerId*string

Query Parameters

userId?string

Response Body

application/json

application/json

curl -X DELETE "http://localhost:3013/api/mcp-oauth/string"
{
  "ok": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/mcp-oauth/{mcpServerId}/authorize

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

mcpServerId*string

Query Parameters

redirect?string
userId?string
scopes?string

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/mcp-oauth/string/authorize"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/mcp-oauth/{mcpServerId}/authorize-url

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

mcpServerId*string

Query Parameters

redirect?string
userId?string
scopes?string

Response Body

application/json

application/json

application/json

curl -X GET "http://localhost:3013/api/mcp-oauth/string/authorize-url"
{
  "providerUrl": "string"
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST
/api/mcp-oauth/{mcpServerId}/manual-client

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

mcpServerId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "http://localhost:3013/api/mcp-oauth/string/manual-client" \  -H "Content-Type: application/json" \  -d '{    "clientId": "string"  }'
{
  "ok": true
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/mcp-oauth/{mcpServerId}/metadata

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

mcpServerId*string

Response Body

application/json

application/json

application/json

curl -X GET "http://localhost:3013/api/mcp-oauth/string/metadata"
{
  "requiresOAuth": false
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
POST
/api/mcp-oauth/{mcpServerId}/refresh

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

mcpServerId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

userId?string

Response Body

application/json

application/json

application/json

curl -X POST "http://localhost:3013/api/mcp-oauth/string/refresh" \  -H "Content-Type: application/json" \  -d '{}'
{
  "ok": true,
  "expiresAt": "string",
  "scope": "string"
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/mcp-oauth/{mcpServerId}/status

Authorization

bearerAuth
AuthorizationBearer <token>

API key via Authorization: Bearer <API_KEY>

In: header

Path Parameters

mcpServerId*string

Query Parameters

userId?string

Response Body

application/json

application/json

curl -X GET "http://localhost:3013/api/mcp-oauth/string/status"
{
  "mcpServerId": "string",
  "authMethod": "static",
  "connected": true,
  "token": {
    "id": "string",
    "status": "connected",
    "tokenType": "string",
    "expiresAt": "string",
    "scope": "string",
    "lastErrorMessage": "string",
    "lastRefreshedAt": "string",
    "authorizationServerIssuer": "string",
    "resourceUrl": "string",
    "clientSource": "dcr",
    "hasRefreshToken": true,
    "createdAt": "string",
    "updatedAt": "string"
  }
}
{
  "error": "string",
  "property1": null,
  "property2": null
}
GET
/api/mcp-oauth/callback

Query Parameters

code?string
state?string
error?string
error_description?string

Response Body

application/json

curl -X GET "http://localhost:3013/api/mcp-oauth/callback"
Empty
{
  "error": "string",
  "property1": null,
  "property2": null
}