trucksim-mcp
trucksim-mcp
一个 MCP 服务器,将 Euro Truck Simulator 2 和 American Truck Simulator 的遥测数据 —— 以及实时驾驶分析 —— 流式传给任何 AI 宿主(Claude Desktop、Claude Code、Cursor、Cline……)。其中还包含一个无头 Claude 分析代理,扮演驾驶室内的调度员/驾驶教练。
问问你的助手*”我超速了吗?“、”我能准时完成交货吗?“、“我的燃油还能跑多远?”* 或 “给我目前的驾驶打个分” —— 它都能基于实时游戏遥测数据作答。这是一个只读遥测与分析服务器:它永远不会控制卡车。
注意: “American Truck Simulator 2” 并不是一个独立的游戏 —— 至今仍只有原版 ATS。ATS 与 ETS2 使用同一引擎和同一套遥测 SDK,因此
trucksim-mcp无需任何配置即可同时支持两者。
工作原理
ETS2 / ATS ──(SCS Telemetry SDK)──▶ telemetry source ──▶ trucksim-mcp ──▶ any MCP client
(mmap | http | mock) (tools+analytics) (Claude, Cursor…)由于 SCS SDK 写入的是 Windows 共享内存,trucksim-mcp 通过一个可插拔的来源来读取遥测数据:
数据源 | 适用场景 | 需要游戏? |
| 演示、CI、开发 —— 内置脚本化行程行程 | 否 |
| 游戏运行在 Windows PC 上,暴露 JSON 遥测数据流(Funbit / trucksim-gps);可从任何位置读取 | 是(远程) |
|
| 是(本地) |
mock 数据源意味着整个流水线无需安装游戏即可在任何操作系统上端到端运行。
快速开始
ETS2 / ATS ──(SCS Telemetry SDK)──▶ telemetry source ──▶ trucksim-mcp ──▶ any MCP client
(mmap | http | mock) (tools+analytics) (Claude, Cursor…)# no install, straight from GitHub (PyPI release pending)
TRUCKSIM_SOURCE=mock uvx --from git+https://github.com/rachittshah/trucksim-mcp trucksim-mcp有关 Claude Desktop / Cursor / Cline 的配置,请参阅 docs/clients.md;
有关接入真实 ETS2/ATS 遥测数据,请参阅 docs/sources.md。
连接本地的 ETS2 / ATS
mock 数据源不需要游戏;要读取真实游戏,请选择一种数据源(0docs/sources.md 有完整指南):
跨平台(推荐) —— 游戏运行在 Windows 上,trucksim-mcp 可以放在局域网内的任何设备上:
安装 RenCloud/scs-sdk-plugin 插件到游戏的
bin/win_x64/plugins/目录。运行一个遥测 HTTP 服务(Funbit/ets2-telemetry-server,端口 25555)。
在接入 MCP 客户端之前,先配置并验证数据链路:
export TRUCKSIM_SOURCE=http export TRUCKSIM_HTTP_URL=http://<game-pc-ip>:25555/api/ets2/telemetry uvx --from git+https://github.com/rachittshah/trucksim-mcp trucksim-mcp selftestsource: http connected: True game: ets2 speed: 84 km/h (limit 90) job: Reefer Frankfurt -> Munich ✅ Telemetry is live. Point your MCP client at this same config.
原生 Windows —— trucksim-mcp 与游戏运行在同一台 PC 上:设置 TRUCKSIM_SOURCE=mmap(实验性)并运行 trucksim-mcp selftest。
然后在 MCP 客户端配置中或 agent/mcp.json 里使用同样的环境变量。
工具
10 个只读工具 —— 完整参考见 docs/tools.md:
状态 ——
get_truck_state、get_navigation、get_fuel_status、get_raw_ telemetry任务 ——
get_active_job分析 ——
check_speeding、get_eco_score、get_trip_summary、get_rest_advisor、list_recent_events
示例提示
连接成功(即使只用 TRUCKSIM_SOURCE=mock)后,可以问你的助手:
“我的卡车现在在做什么?” →
get_truck_state“我超速了吗?” →
check_speeding“我有足够燃油到达目的地吗?” →
get_fuel_status“我能赶上交货期限吗?” →
get_active_job“给这次驾驶打个分,告诉我该怎么改进。” →
get_eco_score+get_trip_summary“我应该休息一下吗?” →
get_rest_advisor
教练代理的实际演示
针对内置的 mock 行程运行无头代理 —— 一个真实的 claude -p(Sonnet 5)经由本服务器读取遥测数据:
$ TRUCKSIM_AGENT_ONCE=1 ./agent/coach.sh
Heads up: your Hamburg steel-tubes job is projected LATE — ETA 7h7m vs a 4h59m
deadline, a 2h7m shortfall, so this delivery needs a route/time fix, not just
steady driving. Speed and fuel are fine: you're well under the 90 km/h limit,
damage is only 3%, and fuel (688L, ~2149 km range) easily covers the 285 km
trip. Recommendation: check for a faster route or accept the late penalty now.无头分析代理
agent/ 里有一个后台运行的 Claude Code 无头(claude -p,Sonnet 5) runner,它连接本 MCP 服务器,并根据实时遥测产生周期性的驾驶室指导 —— 一个没有语音的调度员。详见 agent/README.md。
许可证
MIT © describe Shah。与 SCS Software 无关联,也未获其支持。Euro Truck Simulator 2 和 American Truck Simulator 是 SCS Software 的商标。
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
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.
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/rachittshah/trucksim-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server