Skip to main content
Glama

Tesla Robotaxi MCP

An unofficial local Model Context Protocol server for Tesla Robotaxi rider accounts.

It gives an agent eight tools:

  • Search Robotaxi places

  • Get live fare and route previews

  • List saved Robotaxi payment methods

  • Book a quoted ride

  • Read live ride and vehicle status

  • Preview and confirm cancellation

  • Get ride history

WARNING

This project uses Tesla's private, reverse-engineered Robotaxi rider APIs. It is not affiliated with or endorsed by Tesla. The protocol can change without notice. Use it only with your own account and review Tesla's terms.

Requirements

  • Python 3.11+

  • uv

  • A Tesla account with Robotaxi access

The server runs locally over stdio. Credential acquisition stays outside this package: obtain a Tesla Robotaxi refresh token from your own signed-in app session (for example via a local Charles capture of POST auth.tesla.com/oauth2/v3/token), then store only that token.

Related MCP server: Atithi Driver Booking MCP Server

1. Configure credentials

The server checks, in order:

  1. ROBOTAXI_REFRESH_TOKEN and optional ROBOTAXI_AREA_NAME

  2. ROBOTAXI_CREDENTIALS_FILE

  3. ~/.config/robotaxi/credentials.json

The default credential file has this shape:

{
  "refresh_token": "your-token",
  "area_name": "1:bay-area"
}

Create it locally with file mode 0600. Never commit a capture, token, or credential file.

The optional keys device_public_key and device_attestation (base64 protobuf) support accounts for which Tesla enforces the app's device attestation fields during booking. Read-only tools do not need them.

2. Add the MCP server

Add this to ~/.cursor/mcp.json or a project's .cursor/mcp.json:

{
  "mcpServers": {
    "robotaxi": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/nathanielangafor/robotaxi-mcp",
        "robotaxi-mcp"
      ]
    }
  }
}

Restart or reload MCP servers in the client.

Safe agent behavior

  • Resolve ambiguous places before quoting.

  • Check status and list payment methods before requesting a fresh quote.

  • Show the canonical pickup, dropoff, and fare.

  • Only pass confirmation: "BOOK" after the user explicitly asks to book.

  • Call robotaxi_preview_cancellation and show its result before cancellation.

  • Only pass confirmation: "CANCEL" after explicit confirmation.

  • Never retry a booking or cancellation after OUTCOME_UNKNOWN; check status.

  • Do not print OAuth tokens, payment-selection blobs, or raw TripX payloads.

The server reinforces this flow with MCP annotations, literal confirmation arguments, short in-memory proposal/preview caches, and mutation outcome checks.

Protocol coverage

The implementation is based on complete Robotaxi 26.8.0 iOS captures:

  • Tesla OAuth PKCE with client_id=rides

  • TripX WebSocket session_info, search_suggestions, trip_preview_request, ride_update, and session_summary

  • The structural booking request and UUID + empty-field-4 cancellation request

  • Ownership ride history and signed wallet-token endpoints

  • Payment paymentOptions wallet listing

TripX currently exposes only the Bay Area identifier used by these captures. Quote, booking, and cancellation are mutation-prone private operations; verify them after Tesla app releases. A cancellation fee was not present in captured previews, so the MCP reports it as unavailable rather than guessing.

Development

git clone https://github.com/nathanielangafor/robotaxi-mcp
cd robotaxi-mcp
uv sync --extra dev
uv run pytest
uv run robotaxi-mcp

Captured sessions and live credentials are intentionally excluded. See SECURITY.md.

Available Tools

8 tools
robotaxi_book_rideBook a Tesla Robotaxi rideA
Destructive

Book a quoted ride only after the user explicitly requests it.

Inputs: confirmation (required), proposal_token (required), payment_method_id (required). Returns: object

robotaxi_cancel_rideCancel the active Tesla Robotaxi rideA
Destructive

Cancel after a fresh preview and explicit user confirmation.

Inputs: confirmation (required). Returns: object

robotaxi_get_quoteGet a Tesla Robotaxi quoteB

Get a live fare and route preview for two Robotaxi locations.

Inputs: pickup (required), dropoff (required), pickup_result_index, dropoff_result_index. Returns: object

robotaxi_list_payment_methodsList Tesla Robotaxi payment methodsA
Read-only

List safe labels and IDs for Robotaxi-compatible saved payment methods.

Inputs: no named parameters. Returns: object

robotaxi_preview_cancellationPreview Tesla Robotaxi cancellationA

Preview the active ride before cancellation without cancelling it.

Inputs: no named parameters. Returns: object

robotaxi_ride_historyGet Tesla Robotaxi ride historyB
Read-only

Return recent Robotaxi rides from Tesla's ownership service.

Inputs: limit. Returns: object

robotaxi_ride_statusGet current Tesla Robotaxi ride statusA
Read-only

Return the active ride or most recent terminal TripX session.

Inputs: no named parameters. Returns: object

robotaxi_search_placesSearch Tesla Robotaxi placesA
Read-only

Resolve a place name or address to Robotaxi locations.

Inputs: query (required), limit, bias_latitude, bias_longitude. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 8 tools

    Disambiguation5/5

    Each tool targets a distinct part of the ride lifecycle: place search, quoting, booking, status/history, payment listing, and cancellation preview/execution. The two ride-history/status tools are separated by active/recent vs. historical trips, and the cancellation tools are explicitly split into preview and confirm.

    Naming Consistency4/5

    Most tools follow a clear robotaxi_<verb>_<noun> pattern, e.g. search_places, get_quote, book_ride, cancel_ride. robotaxi_ride_status and robotaxi_ride_history break the verb pattern slightly, but the prefix and overall readability keep the set predictable.

    Tool Count5/5

    Eight tools is a well-scoped size for a robotaxi server, covering the main user journey without unnecessary surface area. Each tool corresponds to a needed action or query in the domain.

    Completeness5/5

    The tool set covers the core ride-hailing lifecycle: discover places, get quotes, book, check status/history, list payment methods, and preview/cancel. The explicit preview-before-cancel pairing avoids dead ends and gives agents safe workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers