MCP Uber Server

MCP Uber Server

An MCP server that enables AI assistants to book and manage Uber rides, including getting price estimates, requesting rides, checking ride status, and canceling rides.

Category
访问服务器

Tools

uber_get_auth_url

Get the Uber authorization URL for user to authenticate

uber_set_access_token

Set the access token for a user after OAuth callback

uber_get_price_estimates

Get price estimates for a ride between two locations

uber_request_ride

Request an Uber ride

uber_get_ride_status

Get the current status of a ride request

uber_cancel_ride

Cancel an ongoing ride request

README

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

Installation

Using npm (global installation)

npm install -g mcp-uber

Using npx (no installation required)

npx mcp-uber

Setup

Step 1: Create an Uber Developer Account

  1. Go to Uber Developer Dashboard
  2. Click "Sign in" and either:
    • Use an existing Uber rider/driver account
    • Create a new account specifically for development

💡 Tip: For organizations, create an email alias (e.g., dev@yourcompany.com) instead of using a personal account for easier ownership transfer.

Step 2: Create a New App

  1. In the Developer Dashboard, click "Create App" (top right corner)
  2. Fill in the required information:
    • App Name: Your application name
    • Description: Brief description of what your app does
  3. Click "Create"

Step 3: Get Your API Credentials

  1. Navigate to your app in the dashboard
  2. Go to the Auth tab
  3. You'll find:
    • Client ID: Public identifier for your app
    • Client Secret: Private key (keep this secure!)
    • Server Token: For server-side requests

Step 4: Configure OAuth Settings

  1. In the Auth tab, add your redirect URI:
    • For local testing: http://localhost:3000/callback
    • For production: Your actual callback URL
  2. Select required scopes:
    • profile - User's basic profile information
    • request - Request rides on user's behalf
    • ride_request - View and manage active ride requests

⚠️ Note: The request scope is privileged and requires Uber approval for production use. During development, your account can use it without approval.

Step 5: Set Up Environment Variables

Create environment variables with your credentials (see Configuration section below)

Usage with Claude Desktop

Using npm (global installation)

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "uber": {
      "command": "mcp-uber",
      "env": {
        "UBER_CLIENT_ID": "your_client_id",
        "UBER_CLIENT_SECRET": "your_client_secret",
        "UBER_REDIRECT_URI": "http://localhost:3000/callback",
        "UBER_ENVIRONMENT": "sandbox"
      }
    }
  }
}

Using npx

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "uber": {
      "command": "npx",
      "args": ["mcp-uber"],
      "env": {
        "UBER_CLIENT_ID": "your_client_id",
        "UBER_CLIENT_SECRET": "your_client_secret",
        "UBER_REDIRECT_URI": "http://localhost:3000/callback",
        "UBER_ENVIRONMENT": "sandbox"
      }
    }
  }
}

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

Configuration

Environment Variables

The MCP server requires the following environment variables:

  • UBER_CLIENT_ID: Your Uber app client ID
  • UBER_CLIENT_SECRET: Your Uber app client secret
  • UBER_REDIRECT_URI: OAuth callback URL (default: http://localhost:3000/callback)
  • UBER_ENVIRONMENT: Either sandbox or production (default: sandbox)

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选