Smartcar MCP Server
Smartcar MCP 服务器
一个 MCP (Model Context Protocol) 服务器,将 Smartcar 的车辆 API 作为工具公开给 AI 代理。使 Claude、ChatGPT 和其他兼容 MCP 的客户端能够使用自然语言查询车辆遥测数据并发送指令。
概览
此服务器使用 OAuth2 客户端凭据封装了 Smartcar 的 M2M(机器对机器)API。它会自动处理令牌获取和缓存,因此 AI 代理无需管理身份验证即可与车辆交互。
涵盖 4 个类别的 16 个工具:
类别 | 工具 |
连接 |
|
信号(遥测) |
|
车辆指令 |
|
管理 |
|
Related MCP server: agentforge
使用方法
无需安装。将其添加到您的 claude_desktop_config.json(或等效的 MCP 客户端配置)中:
{
"mcpServers": {
"smartcar": {
"command": "npx",
"args": ["-y", "smartcar-mcp"],
"env": {
"SMARTCAR_CLIENT_ID": "your-client-id",
"SMARTCAR_CLIENT_SECRET": "your-client-secret"
}
}
}
}环境变量
变量 | 必需 | 默认值 | 描述 |
| 是 | — | 您的 Smartcar M2M 客户端 ID |
| 是 | — | 您的 Smartcar M2M 客户端密钥 |
| 否 |
| 车辆 API 基础 URL |
| 否 |
| 身份验证令牌端点 |
| 否 |
| 管理 API 基础 URL |
开发
git clone https://github.com/thachdoSC/smartcar-mcp-test
cd smartcar-mcp
npm install
npm run dev # run from source
npm run build # compile to dist/工具参考
连接
list_connections — 列出车辆连接,支持可选过滤器。
参数 | 类型 | 描述 | |
| string? | 按用户 ID 过滤 | |
| string? | 按车辆 ID 过滤 | |
|
|
| 按车辆模式过滤 |
| number? | 页码 | |
| number? | 每页结果数 |
get_connection — 通过 ID 获取单个连接。
delete_connection — 通过 ID 删除连接。
delete_user — 删除用户及所有关联数据。
信号(遥测)
get_signals — 列出车辆的所有可用信号。
参数 | 类型 | 描述 |
| string | 车辆 ID |
| string | 用户 ID |
| number? | 页码 |
| number? | 每页结果数 |
get_signal — 获取特定信号的当前值。
参数 | 类型 | 描述 |
| string | 车辆 ID |
| string | 用户 ID |
| string | 信号代码(见下文) |
充电: charge.ischarging, charge.voltage, charge.wattage, charge.amperage, charge.limit, charge.estimation.durationtocompletion, charge.estimation.distance_added, charge.estimation.kwh_added, charge.estimation.percent_added, charge.session.id, charge.session.starttime, charge.session.endtime, charge.session.kwhadded, charge.session.milesadded, charge.session.porttype, charge.session.cost, charge.schedule.type, charge.schedule.starttime, charge.schedule.day, charge.schedule.enabled, charge.porttype, charge.portstatus
空调: climate.externaltemperature, climate.internaltemperature
闭合件: closure.door, closure.lock, closure.window, closure.sunroof, closure.fronttrunk, closure.reartrunk, closure.chargeport
连接性: connectivity.firmware, connectivity.isonline, connectivity.sleepstate, connectivity.lastseenat
诊断: diagnostics.faultcodes, diagnostics.oil, diagnostics.emissions, diagnostics.abs, diagnostics.airbag, diagnostics.battery.maintenancestatus, diagnostics.battery.range, diagnostics.battery.soc, diagnostics.brakebooster, diagnostics.brakefluid, diagnostics.collision, diagnostics.coolant, diagnostics.cruisecontrol, diagnostics.enginelight, diagnostics.hazardlights, diagnostics.headlights, diagnostics.park, diagnostics.stabilitycontrol, diagnostics.steeringlock, diagnostics.transmission, diagnostics.washerfluid
暖通空调 (HVAC): hvac.cabintemperature, hvac.defroster, hvac.heater, hvac.temperatureset, hvac.ventilation
内燃机 (ICE): ice.fuel.level, ice.fuel.range, ice.fuel.percentremaining, ice.oillife
位置: location.precise, location.ishome
低压电池: lowvoltagebattery.stateofcharge, lowvoltagebattery.status
运动: motion.speed
里程表: odometer.distance
服务: service.isinservice, service.records
监控: surveillance.brand, surveillance.isenabled
动力电池: tractionbattery.stateofcharge, tractionbattery.range, tractionbattery.heating, tractionbattery.capacity.kwh, tractionbattery.capacity.usableKwh, tractionbattery.limit, tractionbattery.temperature, tractionbattery.chargecompletiontime, tractionbattery.fullchargetime
变速箱: transmission.drivemode, transmission.gear
车辆 ID: vehicleid.vin, vehicleid.color, vehicleid.trim, vehicleid.packages, vehicleid.nickname
车辆用户账户: vehicleuseraccount.grantedpermissions, vehicleuseraccount.role
车轮: wheel.style, wheel.tires
车辆指令
所有指令工具都需要 vehicle_id 和 user_id。
lock_vehicle — 锁定车门。
unlock_vehicle — 解锁车门。
start_charge — 开始电动汽车充电。
stop_charge — 停止电动汽车充电。
set_charge_limit — 设置最大充电电量。
参数 | 类型 | 描述 |
| number | 目标充电百分比 (50–100) |
set_navigation_destination — 将 GPS 目的地发送到车辆导航系统。
参数 | 类型 | 描述 |
| number | 纬度 (-90 到 90) |
| number | 经度 (-180 到 180) |
管理
list_applications — 列出组织中的所有 Smartcar 应用程序。
get_application — 获取特定应用程序的详细信息(按 ID)。
list_application_secrets — 列出应用程序的凭据(不返回密钥值)。
项目结构
src/
├── index.ts # Server entry point — wires up tools and transport
├── auth.ts # OAuth2 token manager with in-memory caching
├── client.ts # HTTP client for Smartcar REST APIs
└── tools/
├── connections.ts # Connection and user management tools
├── signals.ts # Vehicle telemetry tools
├── commands.ts # Vehicle control command tools
└── management.ts # Application management tools身份验证
服务器使用 OAuth2 客户端凭据(M2M 流程)。令牌缓存在内存中,并在过期前 60 秒自动刷新。无需手动管理令牌。
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 Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that connects Bouncie OBD2 vehicle tracking data to AI assistants. It enables users to retrieve real-time vehicle stats, health diagnostics, and detailed trip history through the Bouncie API.
- FlicenseAqualityFmaintenanceMCP server that exposes 300+ AI agents as tools via a single API key. Supports listing agents, invoking any agent with chat-completion style messages, checking agent health, and retrieving platform statistics.53

VoIPbin MCP Serverofficial
AlicenseBqualityCmaintenanceAn MCP server that enables AI assistants to interact with the VoIPbin CPaaS platform, exposing tools for managing calls, flows, messaging, conferencing, and more.521MIT- AlicenseNot gradedqualityBmaintenanceAn MCP (Model Context Protocol) server that exposes Polestar 2 vehicle data to AI assistants like Claude. Query your car's battery status, vehicle info, and health data through natural conversation.MIT
Related MCP Connectors
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
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/thachdoSC/smartcar-mcp-test'
If you have feedback or need assistance with the MCP directory API, please join our Discord server