ac-race-engineer
ac-race-engineer
MCP 服务器,将 Claude 变成原始 Assetto Corsa 的赛车工程师。 它读取 AC 的共享内存遥测数据,将圈速存储在 SQLite 中,将数据缩减为 工程师级别的摘要,并且可以读写直接在游戏内设置菜单中出现的设置文件。
在运行 Assetto Corsa 的 Windows 机器上运行。仅支持原始 AC(使用
acpmf_* 共享内存布局,非 ACC 的)。
安装(Windows — 简单方式)
前提条件: 来自 python.org 的 Python 3.10+。 在安装程序的第一个屏幕上勾选 “Add python.exe to PATH”。不要使用 Microsoft Store 版本 — 其沙箱机制会破坏共享内存访问。
然后,在此文件夹中:右键单击 install-windows.bat → 打开(或直接
双击它)。
就是这样。安装程序会找到 Python,安装包,写入 Claude Desktop
配置(与您已有的任何 MCP 服务器合并,并先进行备份),定位您的 Assetto Corsa
安装目录,并将游戏内 Lua 应用复制到位。在 git pull 后的任何时间重新运行它;它会就地更新。
如果找不到 Assetto Corsa,请告诉它去哪里找。标志应放在 .bat 上,而不是
.ps1 上 — Windows 在默认执行策略下会阻止 .ps1 文件直接运行,而 .bat 的存在正是为了绕过这个问题:
install-windows.bat -AcPath "D:\Games\steamapps\common\assettocorsa"其他标志:-SkipLuaApp、-Uninstall。
安装后,完全退出并重新打开 Claude Desktop。 仅关闭窗口
是不够的 — 右键单击系统托盘(右下角,可能隐藏在 ^ 箭头下)中的 Claude 图标,然后选择退出。
Related MCP server: fastf1-mcp-server
安装(手动)
python -m pip install -e .然后将服务器添加到 claude_desktop_config.json 中。打开该文件的
最快方法是 Claude Desktop → 设置 → 开发者 → 编辑配置,如果文件不存在则会创建,并打开包含的文件夹 — 无需进行文件系统考古。
%APPDATA% 是一个环境变量,而不是字面路径。它扩展为
C:\Users\<你>\AppData\Roaming — 而 AppData 是一个隐藏文件夹,因此
在资源管理器中浏览到它时什么也看不到,除非您启用查看 → 隐藏的项目。
更大的陷阱:%VAR% 是 cmd.exe 语法。Windows 终端默认使用
PowerShell,其中相同的变量拼写为 $env:VAR。因此:
位置 | 应键入的内容 |
PowerShell / Windows 终端 |
|
cmd.exe |
|
资源管理器地址栏 |
|
Win+R(运行对话框) |
|
要打开文件夹而不是文件,请在 PowerShell 中使用 explorer $env:APPDATA\Claude。
{
"mcpServers": {
"ac-race-engineer": {
"command": "C:\\Users\\<you>\\AppData\\Local\\Programs\\Python\\Python312\\python.exe",
"args": ["-m", "ac_race_engineer.server"]
}
}
}使用 python.exe 的绝对路径,而不是裸的 "python"。Claude Desktop
启动 MCP 服务器时不会使用您的 shell 的 PATH,因此裸命令经常会静默失败。使用以下命令获取正确的路径:
py -c "import sys; print(sys.executable)"不要使用 (Get-Command python).Source — 在标准 Windows 上,这通常会返回
...\WindowsApps\python.exe,即 Microsoft Store 别名存根,这是错误的答案。请记住 JSON 需要将反斜杠加倍(\\)。
(如果您使用 Claude Code 代替:
claude mcp add ac-race-engineer -- python -m ac_race_engineer.server)
可选的环境变量覆盖:
AC_DOCS_DIR— AC 文档文件夹(默认~/Documents/Assetto Corsa)AC_ENGINEER_DATA— 数据库 + 范围位置(默认~/.ac-race-engineer)AC_ENGINEER_BRIDGE_PORT— 游戏内应用桥接端口(默认9666)
故障排除
Claude 没有列出工具。 确认您已完全退出并重新打开 Claude Desktop (托盘图标 → 退出)。然后读取服务器日志:
notepad $env:APPDATA\Claude\logs\mcp-server-ac-race-engineer.log键入 python 会打开 Microsoft Store(或显示“未识别”)。
Windows 在 %LOCALAPPDATA%\Microsoft\WindowsApps\python.exe 处提供了一个应用执行别名存根,
当 PATH 上没有真正的 Python 时,它会劫持该名称。从 python.org 安装 Python,并勾选“Add python.exe to
PATH”,或使用 py 启动器(py -3 -m pip install -e .)— python.org 安装程序默认会设置该启动器。您还可以在
设置 → 应用 → 高级应用设置 → 应用执行别名中删除该存根。
安装程序已经忽略了 WindowsApps 下的任何内容,因此这仅在手动安装时才会影响您。
.ps1 cannot be loaded because running scripts is disabled(无法加载 .ps1,因为在此系统上禁用了运行脚本)。 这是执行策略。请改用 install-windows.bat — 它会在不更改任何系统设置的情况下绕过该脚本的策略。
设置值在游戏中无法生效。 您正在写入车辆合法范围之外的值,AC 正在静默忽略它们 — 请参阅下一节。
调校循环
启动 AC,驶上赛道。
告诉 Claude:“开始录制并确认您可以看到会话” (
start_recording、live_snapshot)。驾驶 3-5 圈。圈速会在完成后自动存储;驶出赛道(>2 个轮胎出界)会标记该圈无效。
“总结我的上一圈并读取我当前的设置” (
list_laps、lap_summary、read_setup)。总结包括每个弯角的 最低速度、刹车点、轮胎压力/温度,以及一个滑移平衡指标 (正数 = 转向不足,负数 = 转向过度)。讨论赛车的表现;Claude 使用
write_setup写入修订后的设置 (例如作为claude_v1)。进站,从设置屏幕加载
claude_v1,再次驾驶。“比较我在新设置下的最佳圈速与第 N 圈”(
compare_laps)— 逐弯角的最低速度和刹车点差异显示更改是否实际有效。
设置值钳位(推荐)
AC 静默忽略超出赛车 setup.ini(位于 data.acd 内)中定义的范围的设置值。为了让服务器将值钳位并捕捉到每个赛车合法的
最小值/最大值/步长:
在 Content Manager 中:赛车页面 → 解包数据(或使用 QuickBMS)。
将赛车的
setup.ini复制到 ranges 文件夹中,以赛车文件夹名称 命名 — 例如ks_mazda_mx5_cup.ini。
要打开该文件夹(安装程序已创建):
explorer $env:USERPROFILE\.ac-race-engineer\ranges(cmd.exe:explorer %USERPROFILE%\.ac-race-engineer\ranges)
如果没有 ranges 文件,写入操作仍然有效,但会附带警告,您应该 在设置屏幕中检查值的合理性。
游戏内应用(CSP Lua)
install-windows.bat 会为您将其复制过来。要手动操作,请复制
lua_app/race_engineer/ 到 assettocorsa/apps/lua/race_engineer/(需要
Custom Shaders Patch;如果您使用启用了 CSP 的 Content Manager,则已拥有)。从游戏内应用侧边栏启用它 — 在会话期间将鼠标移动到屏幕右边缘。
不确定 Assetto Corsa 安装在何处?在 Steam 中,右键单击 Assetto Corsa → 管理 → 浏览本地文件。
它的功能:
驾驶时的投诉标签 — 转向不足 / 转向过度 / 刹车 / 牵引力 按钮,每个都可以通过应用的设置窗口绑定到方向盘按钮(它们会作为 CSP 控制绑定显示)。按下一个按钮会记录您精确的样条线位置、圈速和速度。Claude 使用
get_driver_notes读取它们,并将其与弯角遥测数据关联起来:“您在样条线 0.34 处标记了两次转向不足 — 那是前轮滑移 超过后轮 0.09 的弯角”。状态覆盖 — 录制指示器 + 已存储圈速,因此您无需 切换窗口来检查。
来自 Claude 的消息 —
send_driver_message会在覆盖层上放置一条 通知(“claude_v2 已保存 — 进站并加载它”);按 OK 关闭。
该应用通过 127.0.0.1:9666 与服务器的 HTTP 桥接通信(使用
AC_ENGINEER_BRIDGE_PORT 更改,并编辑 Lua 中的 BASE 以匹配)。桥接仅绑定本地主机。
布局
ac_race_engineer/
sim_info.py shared memory structs (physics / graphics / static)
collector.py background sampler -> SQLite, lap boundary detection
db.py schema + storage
analysis.py corner detection, lap summaries, lap comparison
setups.py setup INI read/write, range clamping
bridge.py localhost HTTP bridge for the in-game app
server.py MCP tools
lua_app/
race_engineer/ CSP Lua in-game app (copy to apps/lua/)
install-windows.ps1 one-shot Windows installer
install-windows.bat double-clickable wrapper for the above备注 / 未来想法
采样率为 25Hz — 足以进行设置工作,同时保持数据库小巧。 如果您需要更精细的轨迹,请提高 collector.py 中的
TARGET_HZ。出场圈(无有效时间)会自动跳过。
弯角检测是通用的(速度最小值);每个赛道的弯角名称映射 会使 Claude 的建议读起来更好(“T3/Variante” vs “0.34 处的弯角”)。
CSP/Lua 可以暴露减震器速度以及比标准共享内存更多的通道, 如果您希望进行更深入的悬挂工作 — Telemetrick 的源代码是一个很好的参考。
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
- Alicense-qualityDmaintenanceEnables AI-powered racing coaching and telemetry analysis for iRacing, providing real-time racing advice, car spotting, lap analysis, and conversational interaction with racing data through live telemetry streaming.2MIT
- AlicenseAqualityCmaintenanceMCP server for Formula 1 data via the FastF1 library. Ask Claude (or any MCP-compatible client) about race results, lap times, telemetry, standings, pit stops, and qualifying — with historical data back to 1950 via the Ergast API.21MIT
- AlicenseAqualityCmaintenanceA local MCP server that gives Claude (or any MCP-compatible AI client) access to Formula 1 race data. Load any session from 2018 onwards, ask questions in natural language, and get answers backed by real telemetry, timing, and strategy data.171MIT
- AlicenseAqualityAmaintenanceTurn Claude into your F1 race engineer.307MIT
Related MCP Connectors
Garmin data in Claude: 135 tools — activities, sleep, HRV, training, workouts. Free, open source.
WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
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/mishan/assetto-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server