MCP server for Tesla Owner API

MCP server for Tesla Owner API

tesla-mcp-server•byrobcerda

An MCP server that connects Claude to the Tesla Owner API using an OAuth2 authentication flow, providing tools for Tesla vehicles and solar systems.

License: GNU General Public License v3.0•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Handles Tesla OAuth2 authentication and stores a refresh token for future API sessions.
  • •Lists vehicles, retrieves detailed vehicle information, and sends commands to a vehicle.
  • •Retrieves solar system status and history and provides a summary of all Tesla systems.
  • •Provides a tool to check Tesla authentication status.

BEST FOR

  • •Checking and controlling Tesla vehicles through Claude via listed tools.
  • •Reviewing Tesla solar system status and historical data.

ABOUT TESLA-MCP-SERVER

MCP server for Tesla Owner API is cataloged as an MCP server attributed to robcerda. An MCP server that connects Claude to the Tesla Owner API using an OAuth2 authentication flow, providing tools for Tesla vehicles and solar systems. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: GNU General Public License v3.0. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server for Tesla Owner API are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What must a user do before using the server with Claude Desktop?

Run the authentication setup script to complete the Tesla OAuth2 flow before using the server with Claude.

How can a user re-authenticate?

Delete the refresh token file and run the authentication setup script again.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 1999a88ca1a5 · 采集于 2026-11-13 11:53:31 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Tesla MCP Server

Model Context Protocol (MCP) server for connecting Claude with the Tesla Owner API. It provides tools for authentication and data retrieval for Tesla vehicles and solar systems.

Requirements

  • Python 3.11
  • Model Context Protocol (MCP) Python SDK
  • httpx
  • python-dotenv

Setup

curl -LsSf https://astral.sh/uv/install.sh | sh

2. Clone this repository

git clone https://github.com/yourusername/tesla-mcp-server.git
cd tesla-mcp-server

3. Create and activate a virtual environment

# Create virtual environment
uv venv

# Activate virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

4. Sync project dependencies

uv sync

Usage

Authentication Setup

This server uses Tesla's Owner API and implements a secure OAuth2 authentication flow. Before using the server with Claude Desktop, you must first run the authentication setup script.

1. Run Authentication Setup

IMPORTANT: You must run this setup script before using the server with Claude:

python setup_auth.py

This script will:

  • Prompt you to authenticate via your browser
  • Walk you through the Tesla OAuth2 flow
  • Create a refresh_token.txt file for future sessions
  • Test the API connection to ensure everything works

Do not commit refresh_token.txt to version control.

2. Authentication Flow Details

  • On first run of setup_auth.py, you will be prompted to authenticate via your browser
  • Follow the instructions in the terminal to complete the OAuth2 flow
  • After successful authentication, a refresh_token.txt file will be created and used for future sessions
  • The refresh token will be automatically used by the MCP server for subsequent API calls

Configure Claude Desktop

To use this server with Claude Desktop, you need to add it to your Claude Desktop configuration.

  1. Run the following from the tesla_mcp_server directory to configure Claude Desktop:
mcp install src/tesla_mcp_server/server.py --name "Tesla" --with-editable .
  1. If you open your Claude Desktop App configuration file claude_desktop_config.json, it should look like this:
{
  "mcpServers": {
    "Tesla": {
      "command": "/Users/<USERNAME>/.cargo/bin/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with-editable",
        "/path/to/tesla-mcp-server",
        "mcp",
        "run",
        "/path/to/tesla-mcp-server/src/tesla_mcp_server/server.py"
      ],
      "env": {
        "LOG_LEVEL": "INFO"
      }
    }
  }
}

Where /path/to/ is the path to the tesla-mcp-server code folder in your system.

  1. Restart Claude Desktop.

Use the MCP server with Claude

Once the server is running and Claude Desktop is configured, you can use the following tools to interact with your Tesla systems:

  • tesla_auth_status: Check Tesla authentication status
  • get_vehicles: Get a list of all your vehicles
  • get_vehicle: Get detailed information about a specific vehicle
  • send_command: Send a command to a vehicle
  • get_solar_system: Get status of a solar system
  • get_solar_history: Get history of a solar system
  • get_system_summary: Get a summary of all Tesla systems

Re-authentication

  • If you ever need to re-authenticate, simply delete refresh_token.txt and run python setup_auth.py again.

Development and testing

Install development dependencies and run the test suite with:

uv sync --all-extras
pytest -v tests

Running the server locally

To start the server manually (useful when developing or testing), run:

mcp run src/tesla_mcp_server/server.py

License

The GNU General Public License v3.0

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server for Tesla Owner API from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/tesla-mcp-server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools