Kiaaccess Mcp

io.github.chrischall由 GitHub 账号 chrischall 发布v2.1.0更新于 Nov 7, 2026

Kia Access for Claude — vehicle status, location, doors, climate, and charging

已验证STDIO仅桌面位置与生活效率与工作流

概览

AI 生成的概览

本地 MCP 服务器,通过 Kia Owners API 让助手查看自己起亚车辆的状态、位置、空调、充电,并发送车门等指令。

可以做什么
  • 查看账号与登录会话状态,执行一次性 MFA 登录步骤,或清除已保存的会话
  • 列出已绑定车辆,读取缓存状态、里程、最后已知位置和电动车充电目标
  • 唤醒车载通信单元以请求一次最新读数
  • 启动或停止空调预热与充电,并设置各插头类型的充电上限
  • 仅在写入模式设为 all 时锁定或解锁车门
适用场景
适合拥有起亚车辆并开通 Kia Access 账号的用户,想在桌面客户端里询问电量、锁车状态或车辆位置,或发送需确认的空调与充电指令。
运行要求
以 npm 包形式在本地通过 stdio 运行,需要 Node.js 22.5 或更高版本。需要已绑定车辆的 Kia Owners / Kia Access 账号,通过 KIA_USERNAME 和 KIA_PASSWORD 配置,并需要能接收一次性 MFA 验证码的手机或邮箱。可选配置包括 KIA_WRITE_MODE、KIA_DEVICE_ID、KIA_RMTOKEN、KIA_SESSION_FILE 和 KIA_REQUEST_TIMEOUT_MS。仅支持桌面端。
安装前请注意
该服务器可以解锁并移动真实车辆;车门指令仅在 KIA_WRITE_MODE=all 时注册,所有指令都需确认。KIA_PASSWORD 与 KIA_RMTOKEN 属于机密:记住我令牌可绕过 MFA,配合密码即可完全控制车辆。反复登录失败可能使账号永久触发 reCAPTCHA。README 说明代码由 AI 编写且未经人工审计。写入类工具会改变车辆状态。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Kiaaccess Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Kia Access MCP

[CI] [npm] [license]

A Model Context Protocol server that connects Claude to your own Kia vehicle through the Kia Owners API the Kia Access mobile app uses: vehicle status, location, odometer, EV charge state, and confirmation-gated door, climate, and charging commands.

[!WARNING] AI-developed project. This codebase was built and is maintained by Claude Code. No human has audited the implementation. Review the code and the tool permissions before pointing it at a real car.

[!CAUTION] This server can move a two-tonne object and can unlock your car. Every command tool asks you to confirm before it acts — with a confirmation prompt where the client supports one, otherwise a preview plus a one-time token that only a repeat call can use (see Confirmations) — and door lock/unlock is not even registered unless you opt in with KIA_WRITE_MODE=all. Read Vehicle commands before changing that.

What you can do

Ask Claude things like:

  • "Is the EV9 locked, and what's the charge at?"
  • "Warm the car up to 72 for ten minutes"
  • "Where did I leave the car?"
  • "Refresh the car's status, then tell me the odometer"

Requirements

  • Node.js 22.5 or later
  • A Kia Owners / Kia Access account with an enrolled vehicle, and its password
  • A phone or mailbox you can read once, for the one-time MFA passcode

Acknowledgement of terms

By using this server you accept that:

  1. It uses your own Kia account credentials to talk to the same private API the Kia Access app uses. It cannot reach anyone else's vehicle or account.
  2. Kia's terms govern your use of it, exactly as they govern your use of the app. This is not an official or supported integration and is not affiliated with, endorsed by, or sponsored by Kia.
  3. Commands act on a real vehicle in the physical world. Unlocking leaves the car unsecured until someone locks it; climate preconditioning runs the HVAC and draws power. You are responsible for every command you confirm.
  4. Failed logins have a permanent cost. Kia counts them (loginAttempt) and eventually sets enforceRecaptcha, after which server-side login for that account is impossible. This server therefore never retries a rejected credential — see If login fails.

Installation

1. Clone and build

bash
git clone https://github.com/chrischall/kiaaccess-mcp.gitcd kiaaccess-mcpnpm installnpm run build

2. Configure credentials

bash
cp .env.example .env# Edit .env: KIA_USERNAME, KIA_PASSWORD (and optionally KIA_WRITE_MODE,#            KIA_DEVICE_ID, KIA_RMTOKEN, KIA_REQUEST_TIMEOUT_MS — see .env.example)

.env is gitignored. The server never logs credentials, and no tool ever returns your password.

3. Register with Claude Code

json
{  "mcpServers": {    "kiaaccess": {      "command": "npx",      "args": ["-y", "kiaaccess-mcp"],      "env": {        "KIA_USERNAME": "[email protected]",        "KIA_PASSWORD": "your-password",        "KIA_WRITE_MODE": "comfort"      }    }  }}

Missing credentials do not stop the server from booting — it starts, answers tools/list, and only reports the configuration error when a tool actually needs to call Kia. Run kia_session_status to see what it thinks it has.

The one-time MFA bootstrap

Kia challenges every new device with a one-time passcode. This server bootstraps once, stores the resulting remember-me token (rmtoken) under ~/.kiaaccess-mcp/session.json, and from then on mints fresh sessions silently — Kia does not rotate the token and does not challenge again.

Run it through Claude, in this order:

  1. kia_session_status — confirms credentials are present. If it reports hasSession: false, continue.
  2. kia_start_login (asks you to confirm first) — sends your credentials, returns an otpKey and an xid, plus the masked phone/email Kia has on file.
  3. kia_send_otp — pick SMS or EMAIL. The passcode expires in about two minutes.
  4. kia_verify_otp — hand it the passcode. The token is stored locally and is deliberately not returned.
  5. kia_list_vehicles — confirms the session works and gives you the vehicleKey every other tool takes (as its vehicle_key argument).

To start over (revoked token, changed password, handing the machine on), run kia_forget_session (asks you to confirm first) and repeat from step 2.

Running it somewhere with no phone to read

The bootstrap needs a human once. A deployment that has no one to read an OTP — a remote host — cannot run it at all, so bootstrap on a machine that can and move the token:

  1. Set KIA_DEVICE_ID to a fixed uuid before the bootstrap, on both machines. The rmtoken is minted against a device uuid and is worthless with a different one, and kia_session_status only ever reports a truncated prefix — so if you let it be generated, you cannot read back the value you need.
  2. Bootstrap as above, then copy the rmtoken value out of ~/.kiaaccess-mcp/session.json yourself, in a terminal. No tool returns it: the token is a long-lived MFA bypass, so it is never put into a conversation.
  3. Give the remote deployment that value as KIA_RMTOKEN, alongside KIA_USERNAME, KIA_PASSWORD and the same KIA_DEVICE_ID.

KIA_RMTOKEN takes precedence over anything in the local session store, so the deployment's session is whatever you handed it rather than whatever it last wrote. Treat the value like the password it stands in for: it bypasses MFA, and with the account password it grants full control of the vehicle.

If login fails

Do not retry. Kia increments loginAttempt on every rejection and eventually sets enforceRecaptcha, which breaks server-side login for that account permanently. Verify the email and password in the Kia Access app first, fix .env, restart, and only then try again.

Vehicle commands

KIA_WRITE_MODE decides which command tools are registered at all. This is a structural gate, not a runtime check: a tool that was never registered cannot be invoked by any host permission setting or by an instruction injected into the conversation.

KIA_WRITE_MODERegisters
noneNothing but the read tools and the account tools
comfort (default)Climate start/stop and the charging commands
allAlso kia_lock_doors and kia_unlock_doors

An unrecognised value fails closed to none and warns on stderr — a typo must never silently grant the ability to unlock a car.

Two more rules hold for every command:

  • Confirmation-gated. Nothing is sent until you confirm. The confirmation shows the exact request that would be sent; until then there is no network call at all. See Confirmations.
  • Accepted is not confirmed. Kia answering "success" only means the request was accepted. The only proof a command took effect is re-reading the vehicle and diffing the field, so results report commandAccepted and stateConfirmed separately. Observed changes took 30–60 seconds.

Confirmations

Every write tool (the commands above, plus kia_start_login and kia_forget_session) asks you to confirm before it acts. A client that can show a confirmation prompt (Claude Code) shows one, with the exact request. A client that cannot (claude.ai, Claude Desktop) gets a two-step flow instead: the first call does nothing and returns a preview plus a confirmToken, and only a repeat call carrying that token proceeds. The token is bound to the exact request previewed — change an argument and it is refused (DRAFT_CHANGED) with a fresh preview; use it twice and the second call is refused (TOKEN_REUSED).

variabledefault
MCP_CONFIRM_MODEask-userWhat a write does on a client that cannot show a confirmation prompt (claude.ai, Claude Desktop). ask-user: two steps — the first call does nothing and returns a preview plus a token, and the model must get your approval in chat before calling again with it. auto: the same two steps, but the model may use the token after reviewing the preview itself. refuse: writes are refused on such clients. A client that can show prompts (Claude Code) always gets the real prompt, unless MCP_CONFIRM_ELICITATION=off. An unrecognised value is treated as refuse.
MCP_CONFIRM_ELICITATIONonoff never shows a confirmation prompt, so every client gets the MCP_CONFIRM_MODE behaviour. Set it for a client that says it can show prompts but never does (the write hangs — opencode 2.0.x). Any other value is treated as on, with a warning on stderr.
MCP_CONFIRM_TTL_SECONDS600How long a token stays valid.
MCP_CONFIRM_SECRETrandom per processSigning key; set it only if tokens must survive a server restart.
MCP_HOST_CONFIRM_SECRETunsetSet by mcp-host for this registration (it has a data dir). Used when MCP_CONFIRM_SECRET is unset and MCP_DATA_DIR is absolute: a token survives the hosted child idling out between the preview and the confirmed call, and spent tokens are recorded under the data dir so a restart cannot re-accept one.

Tools

Account and session

ToolNotes
kia_session_statusConfigured? Bootstrapped? Which write mode? No network call, no secrets — the email is masked and the device id truncated.
kia_start_loginStep 1 of the MFA bootstrap. Confirmation-gated, because a rejection has a permanent cost.
kia_send_otpStep 2 — delivers the passcode by SMS or EMAIL.
kia_verify_otpStep 3 — exchanges the passcode for a stored session. Returns no secret.
kia_forget_sessionDiscards the stored token so the bootstrap can be re-run. Local only; confirmation-gated.

Reads

ToolNotes
kia_list_vehiclesEvery enrolled vehicle with its vehicleKey, nickname, model, mileage. VINs are masked to the last 6 characters.
kia_vehicle_statusCached status: door lock, ignition (ign3 — on an EV engine stays false), the nested climate block, and more with include_raw. Fast, but only as fresh as the last upload.
kia_refresh_statusWakes the telematics unit for a fresh reading. Slower, draws a little power, and returns no data itself — read kia_vehicle_status afterwards.
kia_vehicle_locationLast reported position plus a map link. Not a live GPS fix.
kia_charge_targetsTarget state of charge per plug type.

Commands

ToolModeNotes
kia_start_climatecomfortPreconditioning. Temperature is best-effort: the car may report its own last-set target instead of the one requested.
kia_stop_climatecomfortVerified by re-reading climate.airCtrl.
kia_start_chargecomfortVerified. Needs the car plugged in — unplugged, Kia accepts the request and nothing happens. Confirm via evStatus.batteryCharge.
kia_stop_chargecomfortVerified. Confirm via evStatus.batteryCharge.
kia_set_charge_limitscomfortVerified, and re-read against evc/gts afterwards. Send both plug types — the list replaces the stored one.
kia_lock_doorsallVerified by re-reading doorLock.
kia_unlock_doorsallLeaves the car physically unsecured. Only run it when the user explicitly asked.

Every endpoint here was verified live against a 2024 EV9 — the reads and the four door/climate commands on 2026-07-27, and the three evc/* charging commands on 2026-07-28 against a plugged-in car. Each was proven by re-reading state, never by the success status: Kia answers statusCode: 0 the moment it accepts a command, seconds before the car acts, and on an unplugged car it answers success and does nothing at all. Every command result therefore reports "accepted" and "confirmed" separately. The full protocol write-up is in docs/KIA-API.md.

Development

bash
npm test              # unit tests (no network — fetch is mocked throughout)npm run test:coverage # the same, with the enforced 100% thresholdsnpm run build         # tsc + esbuild bundle

License

MIT

来源:README.md,提交 1af7bec

工具

16

kia_healthcheck

Verify credentials and upstream reachability

Resolves the credential the way real tools do, then makes one authenticated request to Kia Connect. Reports which source supplied the credential, whether Kia Connect accepted it, the round-trip time, and a plain-English hint distinguishing 'no credential' from 'credential rejected' from 'a Kia Connect-side problem'. Read-only; never returns the credential itself. Call this when a real tool fails and you want to know which hop broke.

无需输入参数。

kia_session_status

Kia session status

Whether this server is configured and logged in to Kia: are credentials present, has the one-time MFA bootstrap been completed on this device, and which vehicle commands are registered (KIA_WRITE_MODE). Makes NO network call and returns no secret — the account email is masked, the device id is truncated, and neither the session id nor the remember-me token is ever included. Start here when a Kia tool reports it is not configured.

无需输入参数。

kia_start_login

Start Kia login (MFA bootstrap)

Step 1 of the ONE-TIME Kia MFA bootstrap (prof/authUser): send the configured credentials and get back the `otpKey` and `xid` the next two steps need. Only needed when kia_session_status reports hasSession:false — once the bootstrap is done the stored remember-me token refreshes sessions silently forever. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call makes NO network call and returns a preview plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). The gate is real: Kia counts failed logins and eventually enforces reCAPTCHA, which breaks server-side login for this account PERMANENTLY — so a rejection is never retried, and a wrong password must be fixed in the environment rather than guessed at.

输入参数confirmToken

kia_send_otp

Send Kia login passcode

Step 2 of the Kia MFA bootstrap (cmm/sendOTP): deliver a one-time passcode to the account by SMS or email. Takes the `otpKey` and `xid` from kia_start_login — it cannot run without them, which is why it has no separate confirmation gate. Ask the user which channel they want (kia_start_login reports the masked destinations Kia has on file). The passcode expires in about two minutes; `expiresAt` reports when.

输入参数xid必填otpKey必填notifyType必填

kia_verify_otp

Verify Kia login passcode

Step 3 of the Kia MFA bootstrap (cmm/verifyOTP): exchange the passcode for a session. The resulting remember-me token is stored locally and is NOT returned — from here on every Kia tool refreshes its own session silently and MFA is never needed again on this device. Takes the `otpKey` and `xid` from kia_start_login plus the code the user received.

输入参数otp必填xid必填otpKey必填

kia_forget_session

Forget stored Kia session

Discard the locally stored Kia session (the remember-me token), so the next Kia call needs the one-time MFA bootstrap again. This is the recovery path when the stored token no longer works — Kia revoked it, the password changed, or the account moved to another device — and the only alternative is deleting the session file by hand. It makes NO network call: Kia is not told anything, only this machine forgets. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call makes NO network call and returns a preview plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). Nothing is deleted until it is confirmed.

输入参数confirmToken

kia_list_vehicles

List Kia vehicles

List the vehicles enrolled on this Kia Owners account (ownr/gvl). Returns each vehicleKey — the id every other Kia tool takes — plus nickname, model year/name/trim, mileage, fuel type and telematics unit. VINs are masked to their last 6 characters.

无需输入参数。

kia_vehicle_status

Kia vehicle status

Read the vehicle's CACHED status (cmm/gvi): door lock, ignition, and the remote-climate block. Fast, but it reports whatever the telematics unit last uploaded — use kia_refresh_status first when freshness matters. Requested with airTempRange/seatHeatCoolOption = "1" so the nested `climate` object is present; when it is still absent the result says so rather than reporting climate as off. Note `ign3` (not `engine`) is the ignition on an EV, and `syncDate` advances on every read, so it never proves anything changed. Per-seat heat/vent state is reported under `climate.seats` as the RAW numbers Kia sends: the `heatVentType`/`heatVentLevel` encoding is UNVERIFIED, so do not tell the user a seat is heating, ventilating or off based on them. An absent seat block means this read carried no seat data — it does NOT mean the car lacks heated seats, which this server cannot currently determine. Pass include_raw for the untrimmed status block (battery/EV detail, doors, tyres, …).

输入参数include_rawvehicle_key

kia_refresh_status

Refresh Kia vehicle status

Ask the car for a fresh reading (rems/rvs, requestType 0). This WAKES THE TELEMATICS UNIT, so it is much slower than kia_vehicle_status and draws a little power — prefer the cached read unless staleness matters. Kia only acknowledges the request; it does not return the new data and gives no completion signal, so read kia_vehicle_status afterwards to see the refreshed values.

输入参数vehicle_key

kia_vehicle_location

Kia vehicle location

The vehicle's last known location, from the `location` block of the cached cmm/gvi read. This is where the telematics unit last reported being, not a live GPS fix — run kia_refresh_status first for a recent one. Latitude/longitude and a map link are derived when the block carries `coord.lat`/`coord.lon`; otherwise the raw block is returned as-is (its exact field names are not verified).

输入参数vehicle_key

kia_start_climate

Start climate

Start remote climate control / preconditioning (Kia `rems/start`, live-verified). Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call makes NO network call and returns a preview plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). Once confirmed it sends the command and re-reads cmm/gvi until the NESTED `climate.airCtrl` reads true (there is no flat `airCtrlOn` field). On an EV `engine` stays false while climate runs — `ign3` is the ignition proxy and is reported alongside. `commandAccepted` (Kia took the request) and `stateConfirmed` (the car actually reads running) are separate; state changes were observed to take 30–60s. TEMPERATURE IS BEST-EFFORT AND UNCONFIRMED: per docs/KIA-API.md a start requesting 70°F still read back 72°F, so the car may report its own last-set target rather than the requested one — do not promise the user a specific cabin temperature. Seat and steering-wheel/rear-window heating are not sent at all: the request body deliberately omits `heatVentSeat` (Kia validates seat capability per car) and leaves every `heatingAccessory` field at 0.

输入参数defrosttemperaturevehicle_key必填waitSecondsconfirmTokendurationMinutes

kia_stop_climate

Stop climate

Stop remote climate control (Kia `rems/stop`, live-verified). Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call makes NO network call and returns a preview plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). Once confirmed it sends the command and re-reads cmm/gvi until the NESTED `climate.airCtrl` reads false (there is no flat `airCtrlOn` field); `ign3` — the EV ignition proxy — is reported alongside. `commandAccepted` (Kia took the request) and `stateConfirmed` (the car actually reads stopped) are separate. State changes were observed to take 30–60s.

输入参数vehicle_key必填waitSecondsconfirmToken

kia_charge_targets

Kia EV charge targets

Read the EV charge targets (`evc/gts`): the target state of charge per plug type (one entry for AC, one for DC). Verified live against a real vehicle. Read-only — makes no changes.

输入参数vehicle_key必填

kia_start_charge

Start Kia EV charging

Ask the vehicle to start charging (`evc/charge`). Verified against a plugged-in vehicle: evStatus.batteryCharge goes true within ~30-60s. Requires the car to be plugged in — on an unplugged car Kia still accepts the request and nothing happens. Confirm with kia_vehicle_status rather than trusting the success status. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call makes NO network call and returns a preview plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

输入参数chargeRatiovehicle_key必填confirmToken

kia_stop_charge

Stop Kia EV charging

Ask the vehicle to stop charging (`evc/cancel`). Verified against a charging vehicle: evStatus.batteryCharge goes false within ~30-60s. Confirm with kia_vehicle_status rather than trusting the success status. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call makes NO network call and returns a preview plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE).

输入参数vehicle_key必填confirmToken

kia_set_charge_limits

Set Kia EV charge limits

Set the target state of charge per plug type (`evc/sts`). Verified against a real vehicle. The write is checked: afterwards the targets are re-read from evc/gts and compared, and the result reports whether the change actually landed. Send BOTH plug types — the list replaces the stored one, so omitting an entry drops that target. Asks the user to confirm first: a confirmation prompt where the client supports one; otherwise the first call makes NO network call and returns a preview plus a confirmToken, and only a repeat call with that token proceeds (see MCP_CONFIRM_MODE). The preview step makes no call at all, not even the baseline read.

输入参数verifytargets必填vehicle_key必填confirmToken

版本历史

15
  1. v2.1.0最新Nov 4, 2026
  2. v2.0.1Oct 16, 2026
  3. v2.0.0Oct 10, 2026
  4. v1.1.5Oct 7, 2026
  5. v1.1.4Oct 5, 2026
  6. v1.1.3Oct 3, 2026
  7. v1.1.2Sep 30, 2026
  8. v1.1.1Sep 25, 2026
  9. v1.1.0Sep 24, 2026
  10. v1.0.3Sep 23, 2026
  11. v1.0.2Sep 23, 2026
  12. v1.0.1Sep 21, 2026
  13. v1.0.0Sep 20, 2026
  14. v0.9.0Sep 18, 2026
  15. v0.8.2Sep 16, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分