@jojonadam/mriter-mcp 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,171 @@
1
- # Temporary Holding Version
1
+ # @jojonadam/mriter-mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **Mriter** — a local arrangement engine exposed as an MCP server. Give it lyrics, a style and a few parameters; it composes a multi-track arrangement and writes `.mid` and `.gp8` (Guitar Pro 8) files.
4
+ Lyrics and audio **never leave your machine**: no upload, no account, no network calls.
5
+
6
+ > Ships a single-file binary with the engine and corpus baked in — **no local Python needed**. Prebuilt for `darwin-arm64` (Apple Silicon).
7
+ > The engine and corpus live in a private repo; this repo is the packaging layer only.
8
+
9
+ [中文说明 ↓](#中文)
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm i -g @jojonadam/mriter-mcp # or just use npx, no global install
15
+ ```
16
+
17
+ ## Wire it into an MCP host (Claude Desktop / WorkBuddy / others)
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "mriter": {
23
+ "command": "npx",
24
+ "args": ["-y", "@jojonadam/mriter-mcp"]
25
+ }
26
+ }
27
+ }
28
+ ```
29
+
30
+ ## Tools
31
+
32
+ | Tool | What it does |
33
+ |---|---|
34
+ | `mriter_compose` | Full arrangement: lyrics / style / params → multi-track song, writes `.mid` + `.gp8`, returns section coordinates, lineup, reproducible seed, symbol fingerprints, and hand-off prompts for Suno / Qishui. Supports `scope` partial re-roll (regenerate one track of one section); same seed + same params = identical output |
35
+ | `mriter_styles` | 33 arrangement styles across 6 families + the default. Its `id` is the only legal value for the `style` argument elsewhere |
36
+ | `mriter_sources` | Sound-source panel for a style: acoustic/synth options per seat, defaults, switching cost (timbre only — never touches notes) |
37
+ | `mriter_random` | Draw a reproducible parameter set for a style |
38
+ | `mriter_suggest` | Suggest style and direction from a line of lyrics or a short text |
39
+ | `mriter_diagnose` | Lyrics health check: rhyme, clichés, line-length spread, particle/adverb density (suggestions only, never rewrites) |
40
+
41
+ ## Tiers (gates are enforced inside the engine)
42
+
43
+ | Tier | Tracks | Export |
44
+ |---|---|---|
45
+ | `free` | 4 | MIDI only |
46
+ | `base` | 6 | MIDI + GP8 |
47
+ | `pro` | unlimited (10-track layering for electro styles) | MIDI + GP8 |
48
+
49
+ Over-tier selections are clamped rather than rejected, and reported in `lineup.tier_cap`.
50
+
51
+ ## Notes
52
+
53
+ - `bars` only applies to **instrumental** (club-form) arrangements: **minimum 64 bars** (8 blocks × 8), snapped to multiples of 8.
54
+ When clamped, the response carries `bars_requested` + `bars_note` — it never silently shrinks. With lyrics, form comes from the lyrics and `bars` is ignored.
55
+ - Output dir: `out_dir` argument, or env `MRITER_OUT`; default `./mriter-out`.
56
+ - Engine unpack cache: `~/.cache/mriter-mcp/` (override with `MRITER_CACHE`).
57
+
58
+ ## Repo layout
59
+
60
+ ```
61
+ bin/mriter-mcp.js launcher — picks the prebuilt binary for this platform and execs it
62
+ bin/<plat>/mriter-mcp prebuilt binary (not in git; produced by build.sh)
63
+ build.sh build the binary from the engine repo (PyInstaller onefile, injects _bundle)
64
+ package.json npm metadata and bin mapping
65
+ ```
66
+
67
+ Build it yourself:
68
+
69
+ ```bash
70
+ ./build.sh # defaults to the engine repo at ~/AI_Projects/Mriter
71
+ MRITER_HOME=/path ./build.sh
72
+ ```
73
+
74
+ Requires the engine repo's `packaging/mcp-server` plus a venv with PyInstaller:
75
+ `python3 -m venv /tmp/mbuild && /tmp/mbuild/bin/pip install pyinstaller`.
76
+
77
+ ## Other install paths
78
+
79
+ - Python: `pip install mriter-mcp` → `mriter-mcp`
80
+ - uvx: `uvx --from mriter-mcp mriter-mcp`
81
+ - Other platforms: this package only bundles `darwin-arm64`; use one of the two paths above
82
+
83
+ ## License
84
+
85
+ UNLICENSED (proprietary engine). The binary is distributed via npm for normal npm-style use; no source license is granted.
86
+
87
+ ---
88
+
89
+ # 中文
90
+
91
+ **Mriter(我的制作人)的 MCP server** —— 本地编曲引擎,把「歌词 / 风格 / 参数」编成多轨曲,直出 `.mid` 与 `.gp8`(Guitar Pro 8)。
92
+ 词与音频**不出设备**:无上传、无账号、无联网调用。
93
+
94
+ > 自带单文件二进制(含引擎与语料),**不需要本机 Python**。当前预编译平台:`darwin-arm64`。
95
+ > 引擎与语料在私有仓,本仓只放打包层。
96
+
97
+ ## 装
98
+
99
+ ```bash
100
+ npm i -g @jojonadam/mriter-mcp # 或用 npx,无需全局安装
101
+ ```
102
+
103
+ ## 接到 MCP 宿主(Claude Desktop / WorkBuddy / 其它)
104
+
105
+ ```json
106
+ {
107
+ "mcpServers": {
108
+ "mriter": {
109
+ "command": "npx",
110
+ "args": ["-y", "@jojonadam/mriter-mcp"]
111
+ }
112
+ }
113
+ }
114
+ ```
115
+
116
+ ## 工具
117
+
118
+ | 工具 | 做什么 |
119
+ |---|---|
120
+ | `mriter_compose` | 完整编曲:歌词/风格/参数 → 多轨曲,写 `.mid` + `.gp8`,返回段落坐标、编制、可复现 seed、符号指纹、给 Suno/汽水 的落地提示词。支持 `scope` 局部重 Roll(只重生成一段的一轨);同 seed 同参数必出同一产物 |
121
+ | `mriter_styles` | 33 种编曲风格(6 大家族)+ 默认风格。`id` 是其它工具 `style` 的唯一合法取值 |
122
+ | `mriter_sources` | 某风格的声源面板:每席位原声/合成器选项、默认声源、切换代价(只改音色不改音符) |
123
+ | `mriter_random` | 按风格随机给一组可复现参数(抽签) |
124
+ | `mriter_suggest` | 从一句词/一段文本推风格与方向建议 |
125
+ | `mriter_diagnose` | 歌词体检:韵脚、套话、句长落差、助词/副词密度(只建议不改词) |
126
+
127
+ ## 计费与档位(引擎内置闸门)
128
+
129
+ | 档 | 轨数 | 可导出 |
130
+ |---|---|---|
131
+ | `free` | 4 轨 | 仅 MIDI |
132
+ | `base` | 6 轨 | MIDI + GP8 |
133
+ | `pro` | 不限(电子风格 10 轨分层) | MIDI + GP8 |
134
+
135
+ 超档不报错、只钳制,并在返回的 `lineup.tier_cap` 里说明。
136
+
137
+ ## 注意
138
+
139
+ - `bars` 只在**无词**(club 曲式)时生效:**最小 64 小节**(8 段×8),按 8 的倍数吸附;
140
+ 被吸附时返回 `bars_requested` + `bars_note`,不会静默改小。有词时曲式由歌词决定,`bars` 不参与。
141
+ - 输出目录:参数 `out_dir`,或环境变量 `MRITER_OUT`,默认 `./mriter-out`。
142
+ - 引擎解包缓存:`~/.cache/mriter-mcp/`(`MRITER_CACHE` 可改)。
143
+
144
+ ## 本仓结构
145
+
146
+ ```
147
+ bin/mriter-mcp.js 启动器(挑本平台预编译二进制并 exec,缺平台时给出来路)
148
+ bin/<plat>/mriter-mcp 预编译二进制(不进 git,由 build.sh 现打)
149
+ build.sh 从引擎仓构建(PyInstaller onefile,注入 _bundle)
150
+ package.json npm 元数据与 bin 映射
151
+ ```
152
+
153
+ 自己构建:
154
+
155
+ ```bash
156
+ ./build.sh # 默认引擎仓 ~/AI_Projects/Mriter
157
+ MRITER_HOME=/path ./build.sh
158
+ ```
159
+
160
+ 需要引擎仓的 `packaging/mcp-server` + 一个装了 PyInstaller 的 venv:
161
+ `python3 -m venv /tmp/mbuild && /tmp/mbuild/bin/pip install pyinstaller`。
162
+
163
+ ## 其它安装方式
164
+
165
+ - Python 版:`pip install mriter-mcp` → `mriter-mcp`
166
+ - uvx 版:`uvx --from mriter-mcp mriter-mcp`
167
+ - 其它平台:本包只带 `darwin-arm64` 二进制,其它平台走上面两条
168
+
169
+ ## 许可
170
+
171
+ UNLICENSED(引擎私有)。二进制随 npm 分发,允许按 npm 常规方式使用;不含源码授权。
Binary file
@@ -0,0 +1,33 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @jojonadam/mriter-mcp — MCP server 启动器。
4
+ *
5
+ * 包内自带 <platform>-<arch>/mriter-mcp 单文件二进制(PyInstaller,含 _bundle 引擎),
6
+ * 不需要本机 Python。找不到本平台二进制时给出去路(pip/uvx 版),不要假装能跑。
7
+ */
8
+ import { spawn } from "node:child_process";
9
+ import { existsSync } from "node:fs";
10
+ import { dirname, join } from "node:path";
11
+ import { fileURLToPath } from "node:url";
12
+
13
+ const HERE = dirname(fileURLToPath(import.meta.url));
14
+ const PLAT = `${process.platform}-${process.arch}`;
15
+ const EXE = join(HERE, PLAT, "mriter-mcp");
16
+
17
+ if (!existsSync(EXE)) {
18
+ console.error(
19
+ `[mriter-mcp] 本平台(${PLAT})暂无预编译二进制。\n` +
20
+ `可选:\n` +
21
+ ` · Python 版:pip install mriter-mcp && mriter-mcp\n` +
22
+ ` · uvx 版: uvx --from mriter-mcp mriter-mcp\n` +
23
+ ` · 自建: 见 https://github.com/JOJO-Adam/mriter-mcp`
24
+ );
25
+ process.exit(1);
26
+ }
27
+
28
+ const child = spawn(EXE, process.argv.slice(2), { stdio: "inherit" });
29
+ child.on("exit", (code, signal) => process.exit(signal ? 1 : (code ?? 1)));
30
+ child.on("error", (err) => {
31
+ console.error(`[mriter-mcp] 启动失败:${err.message}`);
32
+ process.exit(1);
33
+ });
package/package.json CHANGED
@@ -1,6 +1,34 @@
1
1
  {
2
2
  "name": "@jojonadam/mriter-mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.1",
4
+ "description": "Mriter MCP server: local arrangement engine that writes MIDI and Guitar Pro 8. Lyrics and audio never leave your machine. / Mriter(我的制作人)MCP server:本地编曲引擎,直出 MIDI 与 GP8,词与音频不出设备。",
5
+ "type": "module",
6
+ "bin": {
7
+ "mriter-mcp": "./bin/mriter-mcp.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "README.md"
12
+ ],
13
+ "engines": {
14
+ "node": ">=18"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "mcp-server",
19
+ "model-context-protocol",
20
+ "music",
21
+ "midi",
22
+ "guitar-pro",
23
+ "arrangement",
24
+ "songwriting",
25
+ "mriter"
26
+ ],
27
+ "author": "JOJO",
28
+ "license": "UNLICENSED",
29
+ "homepage": "https://mriter.com",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/JOJO-Adam/mriter-mcp.git"
33
+ }
34
+ }