beamng-modding

beamng-modding

A local MCP server for BeamNG.drive mod development that provides official documentation search, mod scaffolding, validation, and packaging tools.

Category
访问服务器

README

BeamNG Modding MCP

A local Model Context Protocol server for researching, scaffolding, reviewing, validating, and packaging BeamNG.drive mods. Official BeamNG documentation results include their source URL and freshness metadata; optional game-source searches are read-only.

Requirements and setup

  • Node.js 20 or newer
  • A directory dedicated to your mod projects
cd /Users/joaorodrigues/Documents/beamng-mcp
npm install
npm run build

Choose a workspace. Every server write is confined to this directory:

mkdir -p /absolute/path/to/beamng-mod-workspace

Optional environment variables:

Variable Purpose
BEAMNG_MOD_ROOT Required writable mod workspace
BEAMNG_GAME_ROOT Optional read-only BeamNG installation/content root
BEAMNG_DOCS_CACHE Optional documentation cache location
BEAMNG_DOCS_TTL_HOURS Cache freshness interval; defaults to 24

Connect an MCP client

Replace /absolute/path/to/beamng-mod-workspace in these examples.

Codex

The installed Codex CLI can create the stdio registration directly:

codex mcp add beamng-modding \
  --env BEAMNG_MOD_ROOT=/absolute/path/to/beamng-mod-workspace \
  -- node /Users/joaorodrigues/Documents/beamng-mcp/dist/index.js

Add optional environment variables by repeating --env. Confirm the registration with:

codex mcp get beamng-modding

Start a new Codex task after adding the server so its tools are discovered.

Claude Desktop

Add this server under mcpServers in Claude Desktop's MCP configuration:

{
  "mcpServers": {
    "beamng-modding": {
      "command": "node",
      "args": ["/Users/joaorodrigues/Documents/beamng-mcp/dist/index.js"],
      "env": {
        "BEAMNG_MOD_ROOT": "/absolute/path/to/beamng-mod-workspace"
      }
    }
  }
}

Restart Claude Desktop after saving the configuration.

Cursor

Create .cursor/mcp.json in the project that should use the server:

{
  "mcpServers": {
    "beamng-modding": {
      "command": "node",
      "args": ["/Users/joaorodrigues/Documents/beamng-mcp/dist/index.js"],
      "env": {
        "BEAMNG_MOD_ROOT": "/absolute/path/to/beamng-mod-workspace"
      }
    }
  }
}

VS Code

Create .vscode/mcp.json:

{
  "servers": {
    "beamng-modding": {
      "type": "stdio",
      "command": "node",
      "args": ["/Users/joaorodrigues/Documents/beamng-mcp/dist/index.js"],
      "env": {
        "BEAMNG_MOD_ROOT": "/absolute/path/to/beamng-mod-workspace"
      }
    }
  }
}

Run MCP: List Servers from the Command Palette to start or inspect it.

First use

Populate the local official-documentation index. Either ask the client:

Synchronize the BeamNG modding documentation with beamng_docs_sync, then find the official guidance for creating a vehicle configuration.

Or run the CLI task with the same environment:

BEAMNG_MOD_ROOT=/absolute/path/to/beamng-mod-workspace npm run docs:sync

The server keeps cached pages available when offline. Refreshes are same-origin and restricted to https://documentation.beamng.com/modding/.

Example requests:

  • “Plan a BeamNG Lua extension, citing the official docs.”
  • “Dry-run a vehicle mod scaffold named rally_buggy in rally-buggy.”
  • “Validate the mod in rally-buggy and explain every error with sources.”
  • “Search my configured BeamNG source for onExtensionLoaded examples.”
  • “Package rally-buggy as releases/rally-buggy.zip after it passes validation.”

Scaffolding and general file writes default to dryRun: true. Ask explicitly to apply the operation after reviewing the planned paths.

Tools

Tool Purpose
beamng_docs_search Search the synchronized official documentation
beamng_docs_get Read a cached page/section or fetch one approved URL
beamng_docs_sync Refresh the bounded documentation cache
beamng_source_search Search optional local game text files read-only
beamng_mod_scaffold Generate one of seven text-only mod templates
beamng_mod_write_files Atomically write bounded UTF-8 changes
beamng_mod_validate Check structure, JBeam, JSON, materials, references, and metadata
beamng_mod_package Validate and create a deterministic ZIP
beamng_best_practices Return evidence-backed rules by mod type/topic

The server also publishes documentation, templates, best practices, and the latest validation report as MCP resources, plus four reusable workflow prompts.

Development

npm run check

The tests cover path traversal and symlink containment, atomic overwrite behavior, documentation extraction/search, tolerant JBeam parsing, all scaffold profiles, deterministic archive layout, and MCP discovery/tool execution.

Safety and limitations

  • The server never installs mods or changes BeamNG game files.
  • All authoring paths are relative to BEAMNG_MOD_ROOT; symlink escapes and traversal are rejected.
  • Static validation cannot prove physics, rendering, Lua runtime behavior, or gameplay correctness. Test the packaged ZIP in BeamNG.drive.
  • Documentation is incomplete in some areas. Official docs, configured local game source, and curated guidance are always labeled separately.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选