Skip to main content
Glama

whoop-set-access-token

Configure API authentication by setting the access token required to retrieve WHOOP fitness data including sleep analysis, recovery metrics, and workout information.

Instructions

Set the access token for API calls

Input Schema

NameRequiredDescriptionDefault
accessTokenYesAccess token to use for API calls

Input Schema (JSON Schema)

{ "properties": { "accessToken": { "description": "Access token to use for API calls", "type": "string" } }, "required": [ "accessToken" ], "type": "object" }

Implementation Reference

  • Executes the tool logic: validates the accessToken input and calls setAccessToken on the WhoopApiClient.
    case 'whoop-set-access-token': { if (!args || typeof args.accessToken !== 'string') { throw new Error('accessToken is required and must be a string'); } this.whoopClient.setAccessToken(args.accessToken); return { content: [ { type: 'text', text: 'Access token set successfully', }, ], }; }
  • Registers the tool in the listTools handler, including name, description, and input schema definition.
    { name: 'whoop-set-access-token', description: 'Set the access token for API calls', inputSchema: { type: 'object', properties: { accessToken: { type: 'string', description: 'Access token to use for API calls', }, }, required: ['accessToken'], }, },
  • Helper method in WhoopApiClient that stores the provided access token in the config, which is used by the axios interceptor for API requests.
    setAccessToken(accessToken: string) { this.config.accessToken = accessToken; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nissand/whoop-mcp-server-claude'

If you have feedback or need assistance with the MCP directory API, please join our Discord server