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 は含みません)。このサーバーはカンマを ; に書き換えます。
要件
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server wrapping the Tesla Fleet API and TeslaMate API
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Tailscale device, route, DNS, key, user, and ACL management over MCP and CLI.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/supervised-nl/tesla-fleet-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server