Labsco
199-biotechnologies logo

Uber

โ˜… 14

from 199-biotechnologies

Book Uber rides directly through your AI assistant.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredAdvanced setup

MCP Uber Server

An MCP (Model Context Protocol) server for booking Uber rides through AI assistants.

Features

  • OAuth 2.0 authentication with Uber
  • Get price estimates for rides
  • Request Uber rides
  • Check ride status
  • Cancel rides

Available Tools

  1. uber_get_auth_url - Get OAuth authorization URL
  2. uber_set_access_token - Set user's access token
  3. uber_get_price_estimates - Get price estimates for a ride
  4. uber_request_ride - Request an Uber ride
  5. uber_get_ride_status - Check ride request status
  6. uber_cancel_ride - Cancel a ride request

OAuth Flow

  1. Use uber_get_auth_url to get the authorization URL
  2. User visits the URL and authorizes your app
  3. After callback, exchange the code for an access token
  4. Use uber_set_access_token to store the token
  5. Now you can make API calls

Testing Your Integration

  1. Use sandbox mode for testing:

    • Set UBER_ENVIRONMENT=sandbox in your environment
    • Sandbox mode simulates ride requests without real drivers
    • Perfect for development and testing
  2. Test the OAuth flow:

    • Use the uber_get_auth_url tool to get an authorization URL
    • Visit the URL and authorize your app
    • After authorization, Uber will redirect to your callback URL with a code
    • Exchange the code for an access token (you'll need to set up your own callback handler)
    • Use uber_set_access_token to store the token in the MCP server
  3. Setting up a callback handler:

    • For testing, you can use a simple Express server (see examples/oauth-server.js in the GitHub repo)
    • For production, implement a secure callback handler in your application
    • The callback URL must match exactly what's configured in your Uber app

Important Notes

Sandbox vs Production

  • Sandbox Mode (default):

    • Simulated rides and drivers
    • No real charges
    • Perfect for testing
    • Limited to your developer account
  • Production Mode:

    • Real rides and charges
    • Requires Uber approval for privileged scopes
    • Must pass Uber's review process

Security Best Practices

  1. Never commit credentials: Keep your Client Secret secure
  2. Use environment variables: Don't hardcode credentials
  3. Implement proper token storage: The current in-memory storage is for demo only
  4. Validate redirect URIs: Ensure your callback URLs are properly configured

API Limitations

  • Rate limits apply (check Uber's documentation)
  • Privileged scopes require approval for production use
  • Sandbox mode has some limitations compared to production

Troubleshooting

  • "Invalid scope" error: Your app needs approval for privileged scopes in production
  • "Invalid redirect URI": Make sure your redirect URI exactly matches what's configured in the Uber dashboard
  • "Unauthorized" errors: Check that your access token is valid and not expired

Resources