tesla-fleet-mcp
tesla-fleet-mcp
Tesla Fleet API 向けの最小限の stdio MCP。TypeScript。単一プロセス、環境変数ベースのシークレット。読み取り/ウェイク用の追加デーモンは不要です。
コマンド(climate、charge、lock)には、Tesla公式の tesla-http-proxy と、車両に設定された仮想キーが必要です。このプロキシはここに 同梱されていません。
Hermes サーバー名:tesla-fleet。ツールは mcp__tesla_fleet__* として表示されます。
ツール
Tool | 備考 |
| アカウントの車両 |
| 低コストの状態確認( |
| ライブデータ。課金対象。デフォルトはフルペイロード( |
| 近くの充電サイト |
| スリープからの復帰 |
| コマンドプロキシが必要 |
| コマンドプロキシが必要 |
| コマンドプロキシが必要 |
vehicle_data をポーリング しないでください。Tesla は呼び出しごとに課金されます。最初に vehicle_get を確認してください。
カンマ区切りの endpoints クエリは メタデータのみ を返します(charge_state は含みません)。このサーバーはカンマを ; に書き換えます。
Related MCP server: mcp-teslamate-fleet
要件
Node 20+
Tesla 開発者アプリケーション(ダッシュボード)
自分が所有する HTTPS ホスト名(
teslaという単語を含んではいけません)公開鍵を
https://<your-domain>/.well-known/appspecific/com.tesla.3p.public-key.pemに配置使用する各リージョンでパートナー
POST /api/1/partner_accountsを実施支払い方法 + 請求上限(Fleet API は従量課金制。月額約10ドルのクレジット)
環境
env.example をコピーし、TESLA_CACHE_PATH を git 管理外の 0600 権限のファイルに向けてください。
変数 | 必須 | 説明 |
| はい | 開発者アプリのクライアントID |
| はい | 開発者アプリのシークレット |
| はい | アプリで許可されたリダイレクトと一致する必要があります(例: |
| はい | ご利用リージョンのFleetベースURL(EUの例は |
| いいえ | トークンキャッシュのパス(デフォルト: |
| いいえ |
|
| いいえ | ツールが |
| いいえ | プロキシのオリジン(例: |
| いいえ | 自己署名のlocalhost証明書を使用する場合のプロキシTLS CA |
シークレットをコミットしないでください。リフレッシュトークンやクライアントシークレットをチャットに貼り付けないでください。
セットアップ(一度だけ)
Tesla 開発者アプリを作成します。許可タイプ:認可コード および machine-to-machine。
許可されたオリジン:
https://your.domain。許可されたリダイレクト:https://your.domain/callback。通常必要なスコープ:
openid、offline_access、vehicle_device_data。さらに、それらのツールを使用する場合はvehicle_cmds/vehicle_charging_cmds/vehicle_location。P-256 鍵ペアを生成します:
openssl ecparam -name prime256v1 -genkey -noout -out private-key.pem
openssl ec -in private-key.pem -pubout -out public-key.pem公開鍵 のみ を次の場所でホストします:
https://your.domain/.well-known/appspecific/com.tesla.3p.public-key.pem
パートナーアカウントを登録します(EUの例):
# partner token
curl -s --data-urlencode grant_type=client_credentials \
--data-urlencode client_id="$TESLA_CLIENT_ID" \
--data-urlencode client_secret="$TESLA_CLIENT_SECRET" \
--data-urlencode audience="$TESLA_AUDIENCE" \
--data-urlencode scope='openid vehicle_device_data vehicle_cmds' \
https://fleet-auth.prd.vn.cloud.tesla.com/oauth2/v3/token
# then POST {"domain":"your.domain"} to $TESLA_AUDIENCE/api/1/partner_accounts
# with Authorization: Bearer <partner access_token>ユーザーログイン(車の所有者):
set -a && source .env && set +a
npm install
npm run login
# open the printed URL, approve, paste the full https://your.domain/callback?code=... URL:
npm run login -- "https://your.domain/callback?code=...."コールバックホストはブラウザからのアクセスを受け付けるだけで十分です。このCLIは、貼り付けたURLを読み取ります。空白のページで問題ありません。
Hermes
# example wrapper: source your env file, then tsx
hermes mcp add tesla-fleet --command /path/to/tesla-fleet-mcp/run.shrun.sh は、リポジトリディレクトリ内の .env または(設定されている場合)$TESLA_ENV を読み込みます。追加後は Hermes プロセス/ゲートウェイを再起動してください。ツールの有効化/無効化はクライアント(tools.include / exclude)で行い、追加のサーバーフラグでは行いません。
コマンド(オプション)
Model 3 / Y および最近の S/X では Vehicle Command Protocol が必要です。署名されていない Fleet コマンド呼び出しは拒否されます。
tesla-http-proxyをあなたの 秘密 鍵、TLS、localhost のみ で実行します。仮想キーをペアリングします(Teslaアプリ、車両オンライン):
https://tesla.com/_ak/your.domainTESLA_COMMAND_BASE=https://127.0.0.1:4443を設定します(プロキシ証明書が自己署名の場合はNODE_EXTRA_CA_CERTSも設定)。
プロキシをインターネットに公開しないでください。
開発
npm test
npx tsc --noEmitライセンス
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server wrapping the Tesla Fleet API and TeslaMate API
Control your Tesla - wake it, warm it up, unlock and more. Get your developer token at https://Infoseek.ai/mcp. Also requires your own Tesla developer token which is tied to your car/fleet.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects to the Tesla Fleet API, allowing users to control vehicles and retrieve real-time status updates through Claude and other AI assistants. It supports functions such as waking up vehicles, viewing detailed vehicle information, and debugging via both stdio and HTTP/SSE transports.MIT
- AlicenseBqualityDmaintenanceMCP server combining TeslaMate historical analytics with Fleet API live data and commands. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.292MIT
- AlicenseAqualityAmaintenanceLocal MCP server for Hey.com email - read, search, send, reply, and manage the screener via stored session cookies. Runs over stdio, stores no credentials.3713MIT
- AlicenseBqualityDmaintenanceProduction-ready TypeScript MCP server exposing utility, GitHub, and Microsoft Teams tools over stdio.141MIT