Files
dashlibstorage/API.mcp.md
2026-10-12 22:32:21 +02:00

4.1 KiB

mcp

This document is auto-generated from the JSDoc comments in src/store by running npm run api-doc.

mcp.consumeAuthCode

Source: src/store/mcp/consumeAuthCode.js

Marks an authorization code as used.

Parameters

Name Type Description
code string The authorization code to mark used.

Returns

Promise<boolean> — True once marked.

mcp.createAuthCode

Source: src/store/mcp/createAuthCode.js

Stores an OAuth 2.1 authorization code with PKCE parameters.

Parameters

Name Type Description
input object
input.code string The generated authorization code.
input.clientId string The client ID.
input.googleAuthId number The ID of the authenticated user.
input.redirectUri string The redirect URI used in the authorize request.
input.codeChallenge string The PKCE code challenge.
input.codeChallengeMethod string The PKCE method (e.g. S256).
[input.scope] `string null`
input.expiresAt `string Date`

Returns

Promise<string> — The authorization code.

mcp.createRefreshToken

Source: src/store/mcp/createRefreshToken.js

Stores an OAuth 2.1 refresh token.

Parameters

Name Type Description
input object
input.refreshToken string The refresh token string.
input.clientId string The client ID.
input.googleAuthId number The user ID.
[input.scope] `string null`
input.expiresAt `string Date`

Returns

Promise<object> — Created token record or id.

mcp.deleteClient

Source: src/store/mcp/deleteClient.js

Deletes a registered MCP client by client ID.

Parameters

Name Type Description
clientId string The client identifier to delete.

Returns

Promise<boolean> — True if deleted.

mcp.getAuthCode

Source: src/store/mcp/getAuthCode.js

Retrieves an authorization code record.

Parameters

Name Type Description
code string The authorization code.

Returns

Promise<object|null> — The auth code record or null.

mcp.getClient

Source: src/store/mcp/getClient.js

Retrieves an MCP client by client ID.

Parameters

Name Type Description
clientId string The client identifier.

Returns

Promise<object|null> — The client record or null if not found.

mcp.getRefreshToken

Source: src/store/mcp/getRefreshToken.js

Retrieves an OAuth 2.1 refresh token.

Parameters

Name Type Description
refreshToken string The refresh token.

Returns

Promise<object|null> — The refresh token record or null.

mcp.listClients

Source: src/store/mcp/listClients.js

Lists all registered MCP clients.

Returns

Promise<Array<object>> — List of client records.

mcp.registerClient

Source: src/store/mcp/registerClient.js

Registers a new OAuth MCP client.

Parameters

Name Type Description
input object
input.clientId string Unique client identifier.
[input.clientSecret] `string null`
input.clientName string Human-readable client name.
input.redirectUris `string Array`
[input.grantTypes] `string Array`
[input.responseTypes] `string Array`
[input.scope] `string null`

Returns

Promise<object> — The created client record.

mcp.revokeRefreshToken

Source: src/store/mcp/revokeRefreshToken.js

Revokes an OAuth 2.1 refresh token.

Parameters

Name Type Description
refreshToken string The refresh token to revoke.

Returns

Promise<boolean> — True once revoked.