Content
# mcp233-game-config-excel
Offline Excel game configuration MCP CLI. Compatible with the fixed Excel format of `config233` in this project, based on `I18nTipsConfig`: row 5 `SERVER`, fields from column B, data from row 6.
- Go `1.26.0`
- stdio MCP / JSON-RPC 2.0
- Only read and write local `.xlsx`; no HTTP, database, telemetry, or account logic
- Built-in `I18nTipsConfig` template: `id:string`, `tips_CN:string`
## Installation and Offline Build
The release package contains a binary. For offline building from source, use the `vendor/` directory provided in the repository:
```powershell
go build -mod=vendor -o .\\dist\\mcp233-game-config-excel.exe ./cmd/mcp233-game-config-excel
```
## CLI
```powershell
# Create a template compatible with I18nTipsConfig
./mcp233-game-config-excel.exe init-i18n --file .\I18nTipsConfig.xlsx
# Validate fixed rows, field names, and unique IDs
./mcp233-game-config-excel.exe validate --file .\I18nTipsConfig.xlsx --expected-columns id,tips_CN
# Read configuration
./mcp233-game-config-excel.exe read --file .\I18nTipsConfig.xlsx
# Insert or update by ID. Unknown SERVER fields will refuse to write.
./mcp233-game-config-excel.exe upsert --file .\I18nTipsConfig.xlsx --uid network_error --values '{"tips_CN":"Network exception, please try again"}'
# Add CLIENT / TYPE / SERVER columns: inherit adjacent column styles and set to Excel text format uniformly
./mcp233-game-config-excel.exe add-column --file .\FishingWeaponConfig.xlsx --name handbookIconPath --client-name handbookIconPath --display-name "Weapon icon displayed in handbook" --type string --comment "Weapon icon displayed in handbook" --after-column skillId
# Delete a column or check if all cells in the target column maintain text format
./mcp233-game-config-excel.exe delete-column --file .\FishingWeaponConfig.xlsx --name handbookIconPath
./mcp233-game-config-excel.exe check-column --file .\FishingWeaponConfig.xlsx --name handbookIconPath --require-text true
# Full export: automatically identify columns like tips_CN / tips_EN; generate independent JSON for each language
./mcp233-game-config-excel.exe export-i18n --file .\I18nTipsConfig.xlsx --output-dir .\i18n --format json --mode full
# Incremental export: compare with the previous Excel version, output upsert and delete
./mcp233-game-config-excel.exe export-i18n --file .\I18nTipsConfig.xlsx --output-dir .\i18n-delta --format tsv --mode incremental --baseline-file .\I18nTipsConfig.previous.xlsx
```
## Multi-Language Export
`export-i18n` automatically extracts columns with uppercase language suffixes: `tips_CN`, `tips_EN`, `name_JP`, and also supports regional formats like `tips_zh_CN`. Non-standard columns can be explicitly mapped using `--language-columns title=CN,description=EN`.
- `full`: output complete dictionaries for each language. JSON is `{ "key": "text" }`; CSV/TSV is `key,value`.
- `incremental`: must provide `--baseline-file`. JSON is `{ "upsert": {...}, "delete": [...] }`; CSV/TSV is `operation,key,value`.
- When multiple localizable fields are on the same row, keys automatically become `id.fieldPrefix` to avoid conflicts like `name_CN` and `tips_CN`.
- Output is always UTF-8 without BOM, suitable for Git diff and client pipelines.
## MCP Configuration
`mcp233-game-config-excel` starts stdio MCP by default; `serve` is equivalent to `--stdio`.
```json
{
"mcpServers": {
"game-config-excel": {
"command": "C:\\tools\\mcp233-game-config-excel.exe",
"args": ["serve"]
}
}
}
```
Tools:
| Tool | Purpose |
| --- | --- |
| `config_excel_inspect` | Inspect CLIENT / TYPE / SERVER fields and data row count |
| `config_excel_validate` | Validate fixed rows, field order, and UID uniqueness |
| `config_excel_read_rows` | Read data rows, preserving original text values |
| `config_excel_upsert_row` | Insert or update a row by UID (write file) |
| `config_excel_create_i18n_template` | Create an `I18nTipsConfig` compatible table (write file) |
| `config_excel_export_i18n` | Export JSON / CSV / TSV; support full and baseline incremental (write file) |
| `config_excel_add_column` | Add a column, inheriting adjacent cell styles, defaulting to Excel text format (write file) |
| `config_excel_delete_column` | Delete a column by field name (write file) |
| `config_excel_check_column_format` | Check column position, text format, and abnormal cells |
## config233 Row Format
| Row | Column A | B+ |
| --- | --- | --- |
| 1 | Comment | Field comment |
| 2 | Chinese field name | For planner reading |
| 3 | CLIENT | Client field |
| 4 | TYPE | `string`, `int`, `long`, etc. |
| 5 | SERVER | Go `config233_column` field |
| 6+ | Empty | Configuration data |
Interactive documentation: <a href="docs/index.html">docs/index.html</a>.