
Toyota & Lexus
io.github.zepgram由 GitHub 账号 zepgram 发布v0.3.5更新于 Oct 27, 2026
Toyota & Lexus vehicles: fuel, range, location, trips, health, climate, charging, commands
概览
连接 MyToyota 或 MyLexus 欧洲账户,让助手读取油量、续航、位置、行程和车况,并发送锁车、空调和充电等远程指令。
- 可以做什么
- 列出并选择账户下的车辆,读取车型、订阅状态和远程能力
- 读取能量与续航、充电状态、门锁与车窗、位置、里程、空调状态以及告警和保养记录
- 列出单次行程,并按时间窗口或日历周期汇总油耗与纯电占比
- 刷新云端缓存数据,在法国还可查找附近加油站
- 发送远程指令:锁车或解锁车门与后备箱、闪灯、鸣笛、关窗、启停空调、立即充电、唤醒车辆
- 运行车辆简报提示词,汇总续航、状态、位置、最近行程和告警
- 适用场景
- 适合在欧洲拥有丰田或雷克萨斯、且车辆已出现在 MyToyota 应用中的用户,希望用自然语言查询车辆状态,或在聊天客户端中触发预热、锁车等远程操作。
- 运行要求
- 需要未启用多因素认证的 MyToyota 或 MyLexus 欧洲账户,且车辆已在手机应用中配对。需要 Python 3.11+ 与 uv 以使用 uvx 启动,或使用 Docker。可先用登录命令登录一次,无人值守场景可设置 TOYOTA_USERNAME 和 TOYOTA_PASSWORD。可选 TOYOTA_BRAND、TOYOTA_VIN、TOYOTA_USE_METRIC。启用地址解析会把坐标发送给 OpenStreetMap 或法国地址服务。
安装
在 SourceWeft 中
- 打开 控制台中的 Toyota & Lexus,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
toyota-mcp — Toyota & Lexus MCP server for Claude and other AI assistants
[PyPI] [CI] [Python] [License: MIT]
Ask your Toyota anything. toyota-mcp is a Model Context Protocol
(MCP) server that connects a MyToyota or MyLexus Europe account to Claude,
Claude Code, Cursor, VS Code or any MCP client — read your car's fuel level,
range, location, trips and health, and send remote commands (lock, climate,
charging) in plain language.
"How much range is left?" · "Where is the car?" · "Is it locked?" · "What did the last trip consume?" · "What's my EV share this month?" · "Pre-heat the car for 8 am." · "Cheapest petrol near the car?"
Requirements
- A MyToyota Europe account (the API covers Europe only — North America and Japan use entirely different systems).
- Sign in with
toyota-mcp login, or with account credentials in the environment (that path cannot handle MFA/2FA). - The vehicle must appear in the MyToyota mobile app.
- Python 3.11+ and
uvfor the zero-installuvxlauncher (uvxfetches a suitable Python by itself).
Unofficial API. Toyota can change or break this API at any time without notice. All API access is isolated behind pytoyoda, which historically absorbs such breakage within days.
Quickstart
Sign in once
Your browser opens Toyota's own sign-in page. Toyota then redirects to an
address the browser cannot follow (com.toyota.oneapp:/…) and shows an error —
that is expected: copy that address from the address bar and paste it back. The
session is saved in your operating system's credential store and refreshed
automatically. Your password is never seen by this program and never written
to a configuration file. uvx toyota-mcp logout forgets it.
Claude Desktop
Add to claude_desktop_config.json (macOS:
~/Library/Application Support/Claude/claude_desktop_config.json):
Add options after toyota-mcp in args — for example
["toyota-mcp", "--addresses", "osm"] for postal addresses, or
["toyota-mcp", "--read-only"] to leave every remote command out.
Claude Code
Cursor, VS Code and other MCP clients
Any client that speaks stdio works with the same shape — command uvx,
arguments ["toyota-mcp"]. In VS Code, add it to .vscode/mcp.json; in Cursor,
to ~/.cursor/mcp.json.
First contact: the doctor
Before wiring anything into an MCP host, check your setup from a terminal:
It validates credentials, lists your vehicles, and prints which tools your
specific car supports. Exit codes: 0 ok · 2 config · 3 auth ·
4 no vehicle · 5 API error · 6 command rejected (probe).
Remote access — the "Connect" button
By default the server runs on stdio, next to the MCP client. Point it at a URL instead and it becomes a remote MCP server with its own OAuth 2.1 authorization server, so a client connects the way it connects to Gmail or GitHub: paste the URL, press Connect, approve in the browser.
Nothing else to configure — connecting is signing in to Toyota:
- Paste
https://toyota.example.com/mcpinto your client and press Connect. - The client registers itself and sends you to this server's sign-in page.
- Enter the MyToyota email and password, then pick which vehicle to use when the account has several.
- The client gets its token; the server keeps only Toyota's refresh token.
Signing in to the Toyota account is the proof that you own the deployment — there is no shared code and no user database. A server already connected to one account refuses a sign-in with a different one.
Toyota's own web login ends on a mobile deep link (com.toyota.oneapp:/…) that
a browser cannot follow — on a phone it opens the MyToyota app instead — so the
credentials are posted to Toyota by the server you run. They are never written
down: only the refresh token Toyota returns is kept. Accounts with two-factor
authentication cannot be used, as Toyota's vehicle API does not support them.
Run it on a machine of yours (a home server, a Raspberry Pi), behind a
TLS-terminating proxy: the server refuses a non-https:// public URL other
than localhost, because bearer tokens must not travel in clear. Registered
clients and issued tokens are kept in ~/.local/state/toyota-mcp/oauth.json
(mode 600) so a restart does not disconnect anyone; access tokens last an hour
and refresh silently.
With Docker
A container has no credential store, so the session and the grants live in
/data — keep it as a volume or signing in again is the price of a restart.
TOYOTA_SESSION_FILE moves the session file elsewhere.
Authentication
Nothing has to be configured before the first use. A server with no account
connected still starts and says what to do: over HTTP the Connect flow signs you
in, otherwise toyota-mcp login does. toyota_list_vehicles and
toyota_select_vehicle then choose the car from the conversation.
Toyota has no third-party API programme: there is no developer portal, no per-application token, and the mobile app signs in with your account password. This server therefore offers two ways in, and prefers the one where it never holds that password.
toyota-mcp login. Asks for the MyToyota email and password, signs in to
Toyota, and keeps only the refresh token — in your operating system's
credential store (Keychain, Windows Credential Locker, Secret Service), or in a
file when there is none. The password is never written down, and never lands in
an MCP host's configuration file.
Password in the environment. TOYOTA_USERNAME and TOYOTA_PASSWORD still
work for unattended setups, but most MCP hosts store their env block as plain
text on disk, so prefer toyota-mcp login.
Configuration
Features are command-line options, visible in toyota-mcp --help and in your
host's args:
A local .env file works too (see .env.example). Credentials never touch disk
otherwise; tokens live in memory only.
Available tools
Read tools are readOnlyHint: true. The remote commands below are registered
unless the server runs with --read-only.
Remote commands
Registered by default; start with --read-only to leave them out:
Not every car accepts every command: Toyota answers "vehicle not supported" (or "unknown command") and the tool says so — nothing reaches the car. See docs/architecture.md for the vocabulary observed so far.
Safety model:
- Every command takes a
confirmparameter.confirm=false(the default) returns a preview and sends nothing; the agent is instructed to preview, get the user's agreement, then call withconfirm=true. - Your MCP host still applies its own permission prompt for non-read-only tools.
- Toyota's acknowledgement is checked: a command it refuses (return code
other than
000000) comes back asfailedand nothing is polled. - The outcome is verified: after sending, the server asks the car to
report (the same wake request the MyToyota app issues) and polls the
reported state for up to 40 s.
verifiedmeans the car reported the new state or a fresh report;acceptedmeans Toyota took the command but no change was reported yet — check again in a minute, andtoyota_get_healthshows any message Toyota sent about it (e.g. the car was moving). - Commands are rate-limited to one every 10 s.
Prompt
vehicle_briefing (optional language argument) asks the model to produce a
short status briefing — range, doors and lights, position, last trip, alerts,
cheapest fuel when the tank is low — from the tools above.
Addresses and fuel prices (optional)
--addresses turns coordinates into addresses on the parked position and on
trip start/end points — no account, no key:
Enabling it sends the car's coordinates to that service; nothing is sent anywhere otherwise. Address lookups fail open (the answer simply has no address).
For AI agents
If you are an AI assistant reading this to decide whether and how to use this server, here is what you need:
What it is. A stdio MCP server exposing one MyToyota/MyLexus Europe vehicle.
Every tool answers with structuredContent matching its output schema.
Choosing a tool. toyota_get_energy for fuel and range on any powertrain;
toyota_get_charging only for plug-in hybrids and EVs (it errors with an
explicit "not applicable" otherwise). toyota_get_status for doors, windows,
locks, lights; toyota_get_health for warning lights, oil indicators,
notifications and service history. toyota_get_trips lists individual drives,
toyota_get_trip_summary aggregates a window or a calendar period — prefer the
summary for averages, and pass period to match the figures shown in the
MyToyota app.
Data is never live by default. The car uploads telemetry at ignition-off and
its position when it parks, so every response carries a freshness block:
fetched_at, age_seconds, source (live / cache / stale_cache) and
vehicle_reported_at when Toyota provides the car-side timestamp. When the user
asks about current state, cite that age rather than implying real time. If they
need the state as of now, toyota_wake_vehicle asks the car to report (it costs
a little 12 V battery, so do not call it routinely).
Commands. Every command tool takes confirm. Call it with confirm=false
first to preview: nothing is sent, and the report shows the current state. Send
confirm=true only after the user explicitly agreed, and never on your own
initiative — toyota_unlock_doors, toyota_unlock_trunk and
toyota_start_climate carry destructiveHint (the last one runs the engine on
a hybrid, which is dangerous indoors). The result tells you exactly what
happened: verified (the car reported the new state), accepted (Toyota took
the command but the car has not confirmed within the timeout — say so, do not
claim success), or failed with Toyota's reason. Do not resend on accepted;
commands are rate-limited to one per 10 seconds.
Limits worth stating to the user. Europe only. Self-charging full hybrids expose no traction-battery level — the tools say so explicitly instead of guessing. Toyota keeps roughly 12 months of trip history. Not every car accepts every command; Toyota answers "vehicle not supported" and nothing reaches the car.
How fresh is the data?
Toyota's cloud is push-on-event: the car uploads telemetry at ignition-off and its position when it parks. Polling faster returns the same payload, so this server caches snapshots for 5 minutes (15 for health and service data) and serializes all upstream calls (the gateway rate-limits bursts aggressively).
Every response carries a freshness block:
fetched_at/age_seconds— when this server last read Toyota's cloud;source—live,cache, orstale_cache(Toyota briefly unavailable, serving last known data instead of failing);vehicle_reported_at— the car-side timestamp, when Toyota provides one.
toyota_refresh_data exists for the one real gap (you just parked and want the
newest position) and is floor-limited to once per minute. It re-reads the
cloud — it never wakes the car, so it cannot drain the 12V battery.
Powertrain coverage
Toyota exposes no traction-battery charge for self-charging hybrids — it only exists on the in-car display. The tools say so explicitly instead of returning misleading nulls.
Limitations
- Europe only (
ctpa-oneapi— Toyota Connected Europe). - Accounts with MFA/2FA cannot authenticate.
- Toyota retains roughly 12 months of trip history server-side.
- Lock/door status can lag reality; every answer self-reports its age.
--read-onlyremoves every remote command.
Troubleshooting
Security & privacy
- With
toyota-mcp loginthe password never reaches this program: only a refresh token is kept, in the operating system's credential store. With the environment path the password is held as aSecretStrand never logged. - GPS coordinates, VINs and payloads are never written to logs — pytoyoda's debug logging (which dumps full HTTP exchanges) is disabled; only warnings reach stderr.
- No tokens or snapshots are persisted to disk.
doctor --dumpoutput is recursively redacted, but review it manually before sharing.
Contributing
docs/architecture.md describes the layers, the contracts (freshness, verification, privacy) and what to touch to add a tool, a command or a provider. Changes are tracked in CHANGELOG.md.
Development
Tests fake Toyota at pytoyoda's own controller_class seam and exercise the
real parsing pipeline against anonymized payloads — CI never touches Toyota.
Pre-release, run the live smoke tests with real credentials:
Check which raw command strings your car's backend accepts — Toyota's vocabulary differs from the documented one (pytoyoda#274) and only a live probe settles it. Every command is physical, so run it next to the car:
Releasing
The version is the git tag — nothing to edit. Tagging publishes the package
(PyPI trusted publishing, pypi environment) and creates the GitHub release
from the matching CHANGELOG.md section:
Debug interactively with the MCP Inspector:
Note for contributors (and their coding agents): this project uses MCP Python
SDK v2 — MCPServer, mcp.server.mcpserver.Context, ToolError. Most
tutorials still show v1's FastMCP imports, which no longer exist.
Related projects
- pytoyoda — the Python client this server is built on; report API breakage there.
- ha_toyota — Home Assistant integration on the same library.
- tyta — CLI and MCP server for the same API, with its own HTTP client.
Keywords
Toyota MCP server, Lexus MCP server, MyToyota MCP, Toyota Connected Services API, Toyota Claude integration, connected car MCP, vehicle telemetry MCP, remote lock unlock MCP, EV charging MCP, Model Context Protocol car, Toyota Corolla RAV4 Yaris C-HR bZ4X, Claude Desktop car integration, pytoyoda MCP.
Trademarks
The Toyota emblem shown above, together with Toyota, Lexus, MyToyota and MyLexus and all related logos and marks, are the exclusive property of Toyota Motor Corporation and its affiliates. All rights reserved. They appear here only to identify the service this tool connects to. This is an independent, unofficial project: it is not affiliated with, endorsed by, sponsored by, or supported by Toyota, and Toyota's own terms govern your account and your vehicle.
License
MIT © Benjamin Calef
来源:README.md,提交 2f447da
工具
0版本历史
2- v0.3.5最新Sep 18, 2026
- v0.3.4Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分