Commit 00a573f
feat(mcp): remove, enable, disable, test, reauth, unauth, reconnect, resources, prompts, notifications (#543)
Brings `moshcode mcp` and the pit's `/mcp` to parity with omp's MCP surface,
adapted to what a wrapper can honestly deliver. Both surfaces call the same
`mcpCommand`, so every verb lands in the CLI and the pit at once.
Ten new verbs, plus a wizard and a search.
Fan-out verbs, each driving the engine's own native command and never editing
an engine config file:
remove claude/gemini/qwen/codex `mcp remove`
enable re-register the kept spec
disable deregister everywhere, keep the spec
reauth claude/codex `mcp login`, opencode/privacycode `mcp auth`
unauth the matching `mcp logout`
reconnect gemini/qwen `mcp reconnect` (nobody else has one)
Probe verbs, delegating to mcpjam, which TOOLS already installs and already
describes as the companion to this command:
test mcpjam server info
resources mcpjam resources list
prompts mcpjam prompts list
notifications mcpjam server capabilities, or subscriptions listen
`add` grows `--url`, `--token`, `--engine-scope`, `--engines`, and a wizard
when it is called with no arguments. `catalog` grows `search`. `list` grows
`--servers`. `help` renders the command's own help.
Scope is two axes here, not one. `--engine-scope user|project` is the config
file each engine writes; `--engines claude,codex` is which of the six engines
get the server at all. Neither is spelled `--scope`, because that already means
the OAuth permissions of a `/mcp answer` share, and a bare `--scope` on these
verbs now fails pointing at the two that exist.
New: `~/.moshcode/mcp.json`, moshcode's own record of what it registered, so a
name has something to resolve against. It keeps header NAMES and the variable a
token came from, never a value. `--token env:VAR` is the form that keeps a
credential out of the shell history and out of this file.
Every new verb satisfies the standard test/mcp-add-fanout.test.mjs sets: the
plan covers every engine, and an engine that cannot do the thing says why.
omp moves off the blanket "no MCP support" onto a stated reason: it has the
richest MCP surface here and no scriptable `mcp` subcommand at all.
Left out on purpose: `reload`, and the three Smithery-branded verbs.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent bbaf5ff commit 00a573f
12 files changed
Lines changed: 2033 additions & 74 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1679 | 1679 | | |
1680 | 1680 | | |
1681 | 1681 | | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
1682 | 1744 | | |
1683 | 1745 | | |
1684 | 1746 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | | - | |
406 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
407 | 413 | | |
408 | 414 | | |
409 | 415 | | |
| |||
1122 | 1128 | | |
1123 | 1129 | | |
1124 | 1130 | | |
| 1131 | + | |
1125 | 1132 | | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
1126 | 1136 | | |
1127 | 1137 | | |
1128 | 1138 | | |
1129 | 1139 | | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
1130 | 1143 | | |
1131 | 1144 | | |
1132 | 1145 | | |
1133 | | - | |
| 1146 | + | |
1134 | 1147 | | |
1135 | | - | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
1136 | 1160 | | |
1137 | 1161 | | |
1138 | 1162 | | |
1139 | 1163 | | |
1140 | 1164 | | |
1141 | 1165 | | |
1142 | | - | |
1143 | 1166 | | |
1144 | | - | |
1145 | | - | |
1146 | | - | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1147 | 1233 | | |
1148 | 1234 | | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
1149 | 1286 | | |
1150 | 1287 | | |
1151 | 1288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
| 137 | + | |
132 | 138 | | |
133 | 139 | | |
134 | 140 | | |
| |||
143 | 149 | | |
144 | 150 | | |
145 | 151 | | |
146 | | - | |
| 152 | + | |
| 153 | + | |
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
| |||
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
| 206 | + | |
| 207 | + | |
199 | 208 | | |
200 | 209 | | |
201 | 210 | | |
| |||
299 | 308 | | |
300 | 309 | | |
301 | 310 | | |
302 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
303 | 314 | | |
304 | 315 | | |
305 | 316 | | |
| |||
434 | 445 | | |
435 | 446 | | |
436 | 447 | | |
437 | | - | |
| 448 | + | |
438 | 449 | | |
439 | 450 | | |
440 | 451 | | |
| 452 | + | |
| 453 | + | |
441 | 454 | | |
442 | 455 | | |
443 | 456 | | |
| |||
579 | 592 | | |
580 | 593 | | |
581 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
582 | 605 | | |
583 | 606 | | |
584 | 607 | | |
| |||
0 commit comments