CET MCP
MCP server that connects Claude Code to Cyber Engine Tweaks (CET) in Cyberpunk 2077, enabling Lua code execution, game state queries, TweakDB manipulation, inventory management, and event observation from the terminal while the game is running.
README
CET MCP — Cyberpunk 2077 AI Bridge
MCP server that connects Claude Code to Cyber Engine Tweaks (CET) in Cyberpunk 2077. Execute Lua code, query game state, manipulate TweakDB, manage inventory, and observe game events — all from your terminal while the game is running.
How it works
Claude Code → stdio/JSON-RPC → MCP Server → TCP (RedSocket) → CET Bridge Mod → Game Engine
The MCP server runs as a Claude Code subprocess. It opens a TCP server on localhost:27010. The CET Bridge Mod (Lua) connects to it via RedSocket and executes commands in the game's Lua VM. Falls back to file-based IPC automatically if RedSocket is not installed or if the TCP port is already in use (multiple sessions supported).
Pairs with WolvenKit MCP for a complete AI-assisted modding pipeline.
Requirements
- Node.js >= 18
- Cyberpunk 2077 with Cyber Engine Tweaks >= 1.32
- RED4ext >= 1.25
- RedSocket (recommended — enables TCP transport, ~1ms latency vs ~16-33ms with file IPC)
Setup
# 1. Clone and build
git clone https://github.com/y4rd13/cyber-engine-tweak-mcp.git
cd cyber-engine-tweak-mcp
npm install
npm run build
# 2. Copy CET mod to game directory
cp -r cet-mod/CETBridge "/path/to/Cyberpunk 2077/bin/x64/plugins/cyber_engine_tweaks/mods/CETBridge"
# 3. Add to Claude Code globally
claude mcp add cet-bridge -s user \
-e "CET_BRIDGE_DIR=/path/to/cyber_engine_tweaks/mods/CETBridge" \
-e "CET_TRANSPORT=tcp" \
-- node /path/to/cyber-engine-tweak-mcp/build/index.js
Tools (37)
Execution
| Tool | Description |
|---|---|
execute_lua |
Run Lua code in the CET console |
evaluate_expression |
Evaluate a Lua expression and return the result |
batch_execute |
Execute multiple Lua statements in one round-trip |
Game State
| Tool | Description |
|---|---|
get_player_info |
Player level, health, street cred, position |
get_game_state |
In-game time, scene tier, weather, zone type |
add_item |
Add item to inventory by TweakDB ID |
teleport |
Teleport player to world coordinates |
set_time |
Change in-game time of day |
set_weather |
Change weather (Sunny, Rain, Fog, Sandstorm, etc.) |
Inventory
| Tool | Description |
|---|---|
get_inventory |
List player inventory with type filtering |
remove_item |
Remove items from inventory |
get_equipped |
Show currently equipped weapons, clothing, cyberware |
Player
| Tool | Description |
|---|---|
set_stat |
Modify player stats (Health, Armor, Level, etc.) |
apply_status_effect |
Apply buffs/debuffs to the player |
remove_status_effect |
Remove status effects |
get_active_effects |
List all active status effects on the player |
toggle_god_mode |
Toggle invulnerability on/off |
set_level |
Set player level and/or street cred directly |
get_appearance_info |
Get player's current visual appearance |
get_vehicle_list |
List all vehicles in the player's garage |
World
| Tool | Description |
|---|---|
spawn_vehicle |
Spawn a vehicle near the player |
get_nearby_entities |
Scan for nearby NPCs, vehicles, items |
kill_nearby_npcs |
Kill hostile (or all) NPCs in radius |
show_notification |
Show in-game UI notification |
play_sound |
Play a sound event in-game |
get_scanner_info |
Get info about the entity you're looking at |
Quest
| Tool | Description |
|---|---|
get_quest_fact |
Read a quest progression flag |
set_quest_fact |
Set a quest progression flag |
TweakDB
| Tool | Description |
|---|---|
get_tweakdb_value |
Read a TweakDB flat or record |
set_tweakdb_value |
Write a TweakDB flat value |
search_tweakdb |
Search TweakDB records by pattern |
dump_type |
Introspect a game RTTI type (methods, properties) |
Observation
| Tool | Description |
|---|---|
observe_events |
Subscribe to game events via CET Observe |
get_observations |
Read buffered event observations |
Dev Tools
| Tool | Description |
|---|---|
get_connection_status |
Check bridge connectivity and transport type |
read_log |
Read CET scripting.log |
list_mods |
List installed CET mods |
Configuration
| Variable | Default | Description |
|---|---|---|
CET_BRIDGE_DIR |
(see .mcp.json) | Path to CETBridge mod directory |
CET_TRANSPORT |
tcp |
Transport: tcp (RedSocket) or file (fallback) |
CET_TCP_PORT |
27010 |
TCP server port |
Multi-Session Support
Multiple Claude Code sessions can use cet-bridge simultaneously:
- First session: binds TCP port 27010 (fast, ~1ms)
- Additional sessions: automatically fall back to file-based IPC (~16-33ms)
- No session crashes — the fallback is seamless
Architecture
See docs/architecture.md for detailed diagrams.
| Component | Language | Role |
|---|---|---|
| MCP Server | TypeScript | stdio transport for Claude Code, TCP server for game bridge |
| CET Bridge Mod | Lua | Runs in-game, dispatches commands to CET Lua VM |
Development
npm run build # Compile TypeScript
npm run dev # Watch mode
npm run inspect # Test with MCP Inspector
After changing Lua files, copy them to the game directory:
cp cet-mod/CETBridge/*.lua "/path/to/cyber_engine_tweaks/mods/CETBridge/"
Safety
- TCP binds to
localhostonly — no network exposure - All user code runs in
pcall()— errors are caught, never crash the game - This is a development tool — not intended for multiplayer or production use
- Infinite loops in executed Lua will freeze the game (no mitigation possible without native code)
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。