MCPBundler Docs
MCPBundler Docs
Back to marketplaceGetting StartedAuthenticationTutorial - Bundle to Connected Agent
API Reference
Auth
Bundler
Bundles
Catalog
Deployments
Discover
LLM
MCP Listing Claims
MCP Listings
OAuth2
Get OAuth Session MetadataInitiate OAuth2 FlowOAuth2 CallbackRevoke OAuth Session
Observability
Organisations
Reviews
Roadmap
SCIM
Users
Utils
Vault
Webhooks
API ReferenceOAuth2

Revoke OAuth Session

DELETE
/v1/oauth2/sessions/{deployment_id}/{entry_id}

Delete a stored OAuth session, disconnecting the MCP entry.

Deleting the row (rather than clearing its tokens) means the next initiate_oauth call for this deployment/entry starts a fresh PKCE flow instead of finding stale state. A missing session is treated as already-revoked and is not an error.

Args: deployment_id: Deployment the entry belongs to. entry_id: Bundle entry (MCP) whose OAuth session to revoke. session: Database session. context: Caller's security context; the caller must own the deployment.

Authorization

OAuth2AuthorizationCodeBearer
AuthorizationBearer <token>

In: header

Path Parameters

deployment_id*Deployment Id
Formatuuid
entry_id*Entry Id
Formatuuid

Query Parameters

verify_locally?Verify Locally
Defaulttrue

Response Body

application/json

curl -X DELETE "https://example.com/v1/oauth2/sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/497f6eca-6276-4993-bfeb-53cbbbba6f08"
Empty
{  "detail": [    {      "loc": [        "string"      ],      "msg": "string",      "type": "string"    }  ]}

OAuth2 Callback

Previous Page

Observability

Endpoints in the Observability group.