uber_set_access_token
Store Uber access tokens after OAuth authentication to enable AI assistants to book and manage rides through the MCP Uber Server.
Instructions
Set the access token for a user after OAuth callback
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | Unique identifier for the user | |
| accessToken | Yes | Uber access token for the user |
Implementation Reference
- src/index.ts:179-191 (handler)Handler for the uber_set_access_token tool: parses input using SetTokenSchema, stores the access token in the userTokens Map for the user, sets it on the UberClient instance, and returns a success message.case 'uber_set_access_token': { const { userId, accessToken } = SetTokenSchema.parse(args); userTokens.set(userId, accessToken); uberClient.setAccessToken(accessToken); return { content: [ { type: 'text', text: 'Access token set successfully', }, ], }; }
- src/index.ts:39-42 (schema)Zod input schema for the uber_set_access_token tool, validating userId and accessToken as strings.const SetTokenSchema = z.object({ userId: z.string().describe('Unique identifier for the user'), accessToken: z.string().describe('Uber access token for the user'), });
- src/index.ts:113-117 (registration)Registration of the uber_set_access_token tool in the TOOLS array used for ListToolsRequest, including name, description, and derived JSON input schema.{ name: 'uber_set_access_token', description: 'Set the access token for a user after OAuth callback', inputSchema: zodToJsonSchema(SetTokenSchema), },