Skip to main content
Glama

uber_get_auth_url

Generate an Uber authorization URL for user authentication, enabling access to Uber ride booking and management through the MCP Uber Server. Requires a unique user ID for operation.

Instructions

Get the Uber authorization URL for user to authenticate

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdYesUnique identifier for the user

Implementation Reference

  • Handler for uber_get_auth_url tool: parses userId, calls uberClient.getAuthorizationUrl, and returns the auth URL in text response.
    case 'uber_get_auth_url': { const { userId } = AuthorizeSchema.parse(args); const authUrl = await uberClient.getAuthorizationUrl(userId); return { content: [ { type: 'text', text: `Please visit this URL to authorize Uber access: ${authUrl}`, }, ], }; }
  • Core implementation in UberClient: constructs Uber OAuth authorization URL using config and state (userId).
    async getAuthorizationUrl(state: string): Promise<string> { const params = new URLSearchParams({ client_id: this.config.clientId, response_type: 'code', redirect_uri: this.config.redirectUri, scope: 'profile request ride_request', state, }); return `${this.config.authBaseUrl}/oauth/v2/authorize?${params.toString()}`; }
  • Zod schema for input validation: requires userId string.
    const AuthorizeSchema = z.object({ userId: z.string().describe('Unique identifier for the user'), });
  • src/index.ts:108-111 (registration)
    Tool registration in TOOLS array: defines name, description, and input schema.
    { name: 'uber_get_auth_url', description: 'Get the Uber authorization URL for user to authenticate', inputSchema: zodToJsonSchema(AuthorizeSchema),

Other Tools

Related Tools

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/199-mcp/mcp-uber'

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