Represents one MCP OAuth grant: the hashed access + refresh token pair issued to a client, the granting user, and the dedicated Vendure session created for the grant.
VendureEntitystringA hash of the access token, which is how a request finds its grant. The token itself is never stored, and every refresh replaces this hash.
stringA hash of the refresh token. The token itself is never stored, and every refresh replaces this hash.
string | nullA hash of the refresh token the last refresh replaced. Null until the first refresh. If a client presents this old token, the server assumes it was stolen and revokes the grant.
McpOauthClientIDIDThe user who approved this grant. Tool calls made with it run as that user.
McpGrantUserTypeWhether an administrator or a customer approved this grant. It also decides which MCP endpoint the grant's tokens may call.
stringThe one endpoint these tokens work against: the issuer URL plus /mcp/admin or
/mcp/shop. Presenting a token anywhere else is refused.
DateDateDate | nullIDThe Vendure session this grant's tool calls run in. Revoking the grant deletes that session, and so does the cleanup job once the grant has expired.
ID | nullDateMcpOauthGrantStatusWorked out on read rather than stored, so it is always current without anything having to update it.
Architecture reviews, custom plugin work, migrations, ongoing support. Get a hand from the team that builds Vendure.
Talk to the team