@maincode-ai/matilda-code 0.21.12 → 0.21.13-nightly.20261027.e00306cd3
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/chunks/agent-H5JE3RJQ.js +3 -0
- package/chunks/agent-headless-H2JZZ7UV.js +3 -0
- package/chunks/{askUserQuestion-2QI4NSFJ.js → askUserQuestion-L3WDL2T4.js} +3 -3
- package/chunks/ca-UBWUTZVZ.js +25 -0
- package/chunks/chunk-4CVGYUEL.js +3 -0
- package/chunks/{chunk-RNKDFE2S.js → chunk-5B2QERWR.js} +1 -1
- package/chunks/chunk-62GTGPTP.js +8 -0
- package/chunks/chunk-6365AZBW.js +56 -0
- package/chunks/chunk-6PFK4XTH.js +207 -0
- package/chunks/chunk-7ZODGQO6.js +4 -0
- package/chunks/chunk-DB5LMKXU.js +31 -0
- package/chunks/chunk-EYZPVR7N.js +13 -0
- package/chunks/chunk-FKHUEFMK.js +8 -0
- package/chunks/{chunk-6T2GIM76.js → chunk-GILXFDEG.js} +1 -1
- package/chunks/{chunk-VTGICC67.js → chunk-GKEUZTOB.js} +1 -1
- package/chunks/chunk-GSRXW64P.js +120 -0
- package/chunks/chunk-GT6MSEK4.js +3 -0
- package/chunks/chunk-HEJO7OBH.js +3 -0
- package/chunks/chunk-HPO2YWG4.js +78 -0
- package/chunks/chunk-I3CV4LOD.js +8 -0
- package/chunks/{chunk-DOOFGSRV.js → chunk-J3AMKDX6.js} +1 -1
- package/chunks/chunk-JU7QTSKS.js +14 -0
- package/chunks/chunk-LBQNFSZ2.js +9 -0
- package/chunks/chunk-LOB42ODE.js +9 -0
- package/chunks/chunk-LVDDFAK4.js +89 -0
- package/chunks/{chunk-27Q5KW3A.js → chunk-NK2QMGCC.js} +13 -13
- package/chunks/{chunk-YRQP3SLC.js → chunk-O7VPFJ3R.js} +1 -1
- package/chunks/chunk-OBE5S4GG.js +9 -0
- package/chunks/{chunk-CZGZ3KK7.js → chunk-ONANBLIE.js} +1 -1
- package/chunks/chunk-QXSBPCBA.js +8 -0
- package/chunks/chunk-TUKNB5CQ.js +33 -0
- package/chunks/chunk-UM6CLO7D.js +7 -0
- package/chunks/chunk-V4D3LER3.js +2615 -0
- package/chunks/{chunk-HYVP4472.js → chunk-V6UPUMP3.js} +1 -1
- package/chunks/chunk-VUJRLLGL.js +8 -0
- package/chunks/{chunk-MCQUPLRE.js → chunk-WTU6GSZH.js} +1 -1
- package/chunks/chunk-XBTBZHRC.js +8 -0
- package/chunks/{chunk-WV3IUPZS.js → chunk-YTB3OFTT.js} +1 -1
- package/chunks/chunk-ZQKABJBB.js +8 -0
- package/chunks/chunk-ZSGBDQXU.js +11 -0
- package/chunks/{computer-use-WKDNUTLD.js → computer-use-N6KGNST6.js} +1 -1
- package/chunks/{cron-create-F2LXM2OA.js → cron-create-4XBY5RVI.js} +1 -1
- package/chunks/cron-delete-BH4VP3LX.js +3 -0
- package/chunks/cron-list-XXRFKNGM.js +5 -0
- package/chunks/de-LEEHWWJ2.js +25 -0
- package/chunks/{devtools-5JRKK3E7.js → devtools-7YNCRYZV.js} +1 -1
- package/chunks/{chunk-OOEH6ZSV.js → dist-UWUWLWTO.js} +2 -2
- package/chunks/{edit-QQNJZ55P.js → edit-6ULTLTJQ.js} +1 -1
- package/chunks/{en-EJLDYIBM.js → en-LNOIHFSQ.js} +4 -4
- package/chunks/{enter-worktree-5X5SAMBJ.js → enter-worktree-V2VANZYJ.js} +1 -1
- package/chunks/enterPlanMode-75H54S3Z.js +18 -0
- package/chunks/{exit-worktree-SRKZBEYF.js → exit-worktree-KPB32K6P.js} +1 -1
- package/chunks/{exitPlanMode-WSPTGGVN.js → exitPlanMode-K7JRP22Y.js} +2 -2
- package/chunks/fr-4TA2AIU6.js +25 -0
- package/chunks/{getMachineId-bsd-ZYBNK2JG.js → getMachineId-bsd-ETKQTB6C.js} +1 -1
- package/chunks/{getMachineId-darwin-CM2MQGUI.js → getMachineId-darwin-AKNRWOWB.js} +1 -1
- package/chunks/{getMachineId-linux-SYE2KMCW.js → getMachineId-linux-2QSD7FTP.js} +1 -1
- package/chunks/{getMachineId-unsupported-6IHVG2XO.js → getMachineId-unsupported-UXSV7I24.js} +1 -1
- package/chunks/{getMachineId-win-S3J3JSUM.js → getMachineId-win-4MTFXGP3.js} +1 -1
- package/chunks/glob-ACAIHWST.js +22 -0
- package/chunks/{goal-tools-C6BSBHCF.js → goal-tools-VPFXBI6M.js} +3 -3
- package/chunks/{grep-MVCOBUYW.js → grep-R4K75RXS.js} +1 -1
- package/chunks/{ja-GGNJR7AR.js → ja-VXDMQKRW.js} +5 -5
- package/chunks/keychain-token-storage-7VYNARRB.js +3 -0
- package/chunks/ls-4ZEICYPK.js +15 -0
- package/chunks/{lsp-DYDK6XCS.js → lsp-4US2RIIV.js} +1 -1
- package/chunks/mcp-client-ZKQFYCFN.js +3 -0
- package/chunks/monitor-KSNFIY54.js +32 -0
- package/chunks/{multipart-parser-JI75T2O5.js → multipart-parser-FKHYAVGR.js} +1 -1
- package/chunks/notebook-edit-655ZNV6Q.js +17 -0
- package/chunks/openaiContentGenerator-BG3OM453.js +52 -0
- package/chunks/pt-WEIMCOKI.js +25 -0
- package/chunks/read-file-4VSUKSRB.js +3 -0
- package/chunks/ripGrep-PNALN2GG.js +3 -0
- package/chunks/ru-WFLK34ZL.js +25 -0
- package/chunks/scheduler-AVYCIBEK.js +8 -0
- package/chunks/send-message-ND2SRKX5.js +8 -0
- package/chunks/shell-GUHQNOMZ.js +3 -0
- package/chunks/{skill-HZPFEAPF.js → skill-AB2X2DTC.js} +1 -1
- package/chunks/src-LZEU4AYF.js +5 -0
- package/chunks/symbol-search-VICSUEZH.js +19 -0
- package/chunks/{syntheticOutput-432LXITX.js → syntheticOutput-Z7DQKMRI.js} +1 -1
- package/chunks/task-create-BQ73FRTH.js +3 -0
- package/chunks/{task-detach-XMSJ3HBM.js → task-detach-JCHSLUOR.js} +1 -1
- package/chunks/task-list-6ESRFO5F.js +9 -0
- package/chunks/{task-stop-NTS62FLG.js → task-stop-74H2CPAJ.js} +1 -1
- package/chunks/{task-update-AR26UFYZ.js → task-update-R3BN6KPQ.js} +1 -1
- package/chunks/{team-create-PYXFVIR5.js → team-create-UTKRPUPZ.js} +3 -3
- package/chunks/team-delete-PCCGTLGL.js +8 -0
- package/chunks/todoWrite-BZI75DFV.js +3 -0
- package/chunks/{tool-search-RKZDSRYS.js → tool-search-FJ5MAPQ6.js} +1 -1
- package/chunks/{web-fetch-VW3SVDQ6.js → web-fetch-DEUGZQZS.js} +17 -17
- package/chunks/{web-search-XQUIZARL.js → web-search-PUUIEFJO.js} +3 -3
- package/chunks/{workflow-YXNXDRWZ.js → workflow-CBADL3IM.js} +2 -2
- package/chunks/write-file-QGCL2AJL.js +15 -0
- package/cli.js +644 -679
- package/examples/starter/README.md +0 -3
- package/locales/ca.js +1 -37
- package/locales/de.js +1 -42
- package/locales/en.js +1 -43
- package/locales/fr.js +1 -39
- package/locales/ja.js +1 -42
- package/locales/pt.js +1 -42
- package/locales/ru.js +1 -42
- package/package.json +2 -2
- package/sandbox-macos-permissive-closed.sb +0 -1
- package/sandbox-macos-permissive-open.sb +0 -1
- package/sandbox-macos-permissive-proxied.sb +1 -2
- package/sandbox-macos-restrictive-closed.sb +14 -2
- package/sandbox-macos-restrictive-open.sb +14 -2
- package/sandbox-macos-restrictive-proxied.sb +15 -3
- package/bundled/mainy/SKILL.md +0 -157
- package/bundled/mainy/docs/_meta.ts +0 -32
- package/bundled/mainy/docs/common-workflow.md +0 -571
- package/bundled/mainy/docs/configuration/_meta.ts +0 -7
- package/bundled/mainy/docs/configuration/auth.md +0 -82
- package/bundled/mainy/docs/configuration/matilda-ignore.md +0 -55
- package/bundled/mainy/docs/configuration/model-providers.md +0 -598
- package/bundled/mainy/docs/configuration/settings.md +0 -790
- package/bundled/mainy/docs/configuration/themes.md +0 -199
- package/bundled/mainy/docs/configuration/trusted-folders.md +0 -67
- package/bundled/mainy/docs/extension/_meta.ts +0 -9
- package/bundled/mainy/docs/extension/extension-releasing.md +0 -204
- package/bundled/mainy/docs/extension/getting-started-extensions.md +0 -299
- package/bundled/mainy/docs/extension/introduction.md +0 -338
- package/bundled/mainy/docs/features/_meta.ts +0 -27
- package/bundled/mainy/docs/features/approval-mode.md +0 -388
- package/bundled/mainy/docs/features/arena.md +0 -219
- package/bundled/mainy/docs/features/auto-mode.md +0 -308
- package/bundled/mainy/docs/features/channels/_meta.ts +0 -8
- package/bundled/mainy/docs/features/channels/dingtalk.md +0 -134
- package/bundled/mainy/docs/features/channels/feishu.md +0 -186
- package/bundled/mainy/docs/features/channels/overview.md +0 -336
- package/bundled/mainy/docs/features/channels/plugins.md +0 -87
- package/bundled/mainy/docs/features/channels/telegram.md +0 -120
- package/bundled/mainy/docs/features/channels/weixin.md +0 -106
- package/bundled/mainy/docs/features/code-review.md +0 -291
- package/bundled/mainy/docs/features/commands.md +0 -528
- package/bundled/mainy/docs/features/dual-output.md +0 -627
- package/bundled/mainy/docs/features/followup-suggestions.md +0 -109
- package/bundled/mainy/docs/features/headless.md +0 -448
- package/bundled/mainy/docs/features/hooks.md +0 -1306
- package/bundled/mainy/docs/features/language.md +0 -171
- package/bundled/mainy/docs/features/lsp.md +0 -496
- package/bundled/mainy/docs/features/markdown-rendering.md +0 -183
- package/bundled/mainy/docs/features/mcp.md +0 -423
- package/bundled/mainy/docs/features/memory.md +0 -185
- package/bundled/mainy/docs/features/sandbox.md +0 -249
- package/bundled/mainy/docs/features/scheduled-tasks.md +0 -139
- package/bundled/mainy/docs/features/skills.md +0 -347
- package/bundled/mainy/docs/features/status-line.md +0 -397
- package/bundled/mainy/docs/features/structured-output.md +0 -309
- package/bundled/mainy/docs/features/sub-agents.md +0 -737
- package/bundled/mainy/docs/features/tips.md +0 -54
- package/bundled/mainy/docs/features/token-caching.md +0 -29
- package/bundled/mainy/docs/features/tool-use-summaries.md +0 -178
- package/bundled/mainy/docs/features/worktree.md +0 -345
- package/bundled/mainy/docs/ide-integration/_meta.ts +0 -4
- package/bundled/mainy/docs/ide-integration/ide-companion-spec.md +0 -182
- package/bundled/mainy/docs/ide-integration/ide-integration.md +0 -144
- package/bundled/mainy/docs/integration-github-action.md +0 -241
- package/bundled/mainy/docs/integration-jetbrains.md +0 -81
- package/bundled/mainy/docs/integration-vscode.md +0 -39
- package/bundled/mainy/docs/integration-zed.md +0 -72
- package/bundled/mainy/docs/matilda-serve-deploy-local.md +0 -221
- package/bundled/mainy/docs/matilda-serve.md +0 -661
- package/bundled/mainy/docs/overview.md +0 -64
- package/bundled/mainy/docs/quickstart.md +0 -234
- package/bundled/mainy/docs/reference/_meta.ts +0 -3
- package/bundled/mainy/docs/reference/keyboard-shortcuts.md +0 -91
- package/bundled/mainy/docs/support/Uninstall.md +0 -65
- package/bundled/mainy/docs/support/_meta.ts +0 -6
- package/bundled/mainy/docs/support/tos-privacy.md +0 -94
- package/bundled/mainy/docs/support/troubleshooting.md +0 -127
- package/chunks/agent-WM63A6NK.js +0 -3
- package/chunks/agent-headless-QIUBDKPW.js +0 -3
- package/chunks/anthropicContentGenerator-VKFTAIU3.js +0 -39
- package/chunks/ca-I2HEEIL7.js +0 -25
- package/chunks/chunk-2HTPVSGT.js +0 -3
- package/chunks/chunk-2MOGYHWM.js +0 -8
- package/chunks/chunk-3IRGBRSP.js +0 -113
- package/chunks/chunk-3YLXGE6T.js +0 -8
- package/chunks/chunk-47XR7IMP.js +0 -8
- package/chunks/chunk-4F4DA5UI.js +0 -8
- package/chunks/chunk-4J6DC24J.js +0 -59
- package/chunks/chunk-4Q2SNBUH.js +0 -18
- package/chunks/chunk-5C2RJ5RR.js +0 -37
- package/chunks/chunk-6E766NPX.js +0 -31
- package/chunks/chunk-6EQMZNIY.js +0 -8
- package/chunks/chunk-6GBNB5Z2.js +0 -3
- package/chunks/chunk-6Z2MV7ZY.js +0 -186
- package/chunks/chunk-BVOCFLC4.js +0 -56
- package/chunks/chunk-CSJTA7NE.js +0 -101
- package/chunks/chunk-DC7LAFZZ.js +0 -8
- package/chunks/chunk-DE3HKC2W.js +0 -9
- package/chunks/chunk-EQGA7LH7.js +0 -30
- package/chunks/chunk-FPO57O66.js +0 -39
- package/chunks/chunk-FWDMPRKU.js +0 -3
- package/chunks/chunk-G7R2XEEF.js +0 -7
- package/chunks/chunk-GOJCMVJJ.js +0 -8
- package/chunks/chunk-GTVCJCHR.js +0 -8
- package/chunks/chunk-JCE3JAVC.js +0 -25
- package/chunks/chunk-JRECUFB3.js +0 -2630
- package/chunks/chunk-KHHJYBR5.js +0 -9
- package/chunks/chunk-LJR4RZZ2.js +0 -3
- package/chunks/chunk-LUNDTQ3G.js +0 -8
- package/chunks/chunk-M53RP3YP.js +0 -31
- package/chunks/chunk-MO2HXJG5.js +0 -9
- package/chunks/chunk-MTMU7JYZ.js +0 -11
- package/chunks/chunk-O44XK65C.js +0 -8
- package/chunks/chunk-OA56BXPD.js +0 -3
- package/chunks/chunk-PA6532AY.js +0 -6
- package/chunks/chunk-PGXQZVLX.js +0 -8
- package/chunks/chunk-QKYGQLWC.js +0 -8
- package/chunks/chunk-QN6Y6NPA.js +0 -3
- package/chunks/chunk-QVCGLQCI.js +0 -32
- package/chunks/chunk-S3CWEVTS.js +0 -15
- package/chunks/chunk-SDTWBD62.js +0 -8
- package/chunks/chunk-T2T2UEPY.js +0 -4
- package/chunks/chunk-TISQNFB5.js +0 -3
- package/chunks/chunk-U347OO7S.js +0 -9
- package/chunks/chunk-UIRBHC5X.js +0 -3
- package/chunks/chunk-VI74YQQO.js +0 -8
- package/chunks/chunk-VYZOOSMP.js +0 -30
- package/chunks/chunk-WC2VTVCE.js +0 -27
- package/chunks/chunk-WVY2P6WH.js +0 -26
- package/chunks/chunk-WZ75OGYY.js +0 -14
- package/chunks/chunk-XMZIY7XX.js +0 -13
- package/chunks/chunk-YJAKOETP.js +0 -22
- package/chunks/chunk-YV3PUOBU.js +0 -65
- package/chunks/contextCommand-DAB3HOHY.js +0 -3
- package/chunks/cron-delete-DE6Q2S2L.js +0 -3
- package/chunks/cron-list-IAQEJVV7.js +0 -5
- package/chunks/de-AQXFJYZI.js +0 -25
- package/chunks/dist-7UYRLSLE.js +0 -3
- package/chunks/dist-ME6647DQ.js +0 -195
- package/chunks/dist-P6SLWL5V.js +0 -42
- package/chunks/dist-VG3ZDJ2A.js +0 -28
- package/chunks/dist-YTCHM57U.js +0 -23
- package/chunks/enterPlanMode-HP35SPLN.js +0 -18
- package/chunks/fileFromPath-7UCWPD4W.js +0 -3
- package/chunks/fr-6TDHK7F2.js +0 -25
- package/chunks/geminiContentGenerator-RJ73DQAP.js +0 -8
- package/chunks/glob-QQ6LGKDX.js +0 -22
- package/chunks/keychain-token-storage-KQK6MNOJ.js +0 -3
- package/chunks/ls-JYJXFSXN.js +0 -15
- package/chunks/matildaAgentContentGenerator-YUYS4336.js +0 -8
- package/chunks/matildaContentGenerator-O4Z2QPCP.js +0 -8
- package/chunks/matildaOAuth2-7COTQQR2.js +0 -3
- package/chunks/mcp-client-RXVQU5VI.js +0 -3
- package/chunks/monitor-77KXDXPR.js +0 -32
- package/chunks/notebook-edit-TKJD2EQZ.js +0 -17
- package/chunks/openaiContentGenerator-2EALAM3U.js +0 -3
- package/chunks/pt-D6L2QTDM.js +0 -25
- package/chunks/read-file-3KUAH6ND.js +0 -3
- package/chunks/ripGrep-U2PLKXMY.js +0 -3
- package/chunks/ru-BNJCHDYO.js +0 -25
- package/chunks/scheduler-J7VU2V5Y.js +0 -8
- package/chunks/send-message-P3SMWNEE.js +0 -8
- package/chunks/serve-FXH6EBQ6.js +0 -1015
- package/chunks/shell-PXR2AXDD.js +0 -3
- package/chunks/src-RFAEPLY7.js +0 -3
- package/chunks/src-WZTRMETQ.js +0 -5
- package/chunks/symbol-search-EAIZPWN7.js +0 -19
- package/chunks/task-create-Z3QRCMX4.js +0 -3
- package/chunks/task-list-GXAJW3JP.js +0 -9
- package/chunks/team-delete-OMYVUAQU.js +0 -8
- package/chunks/todoWrite-5NZ7CHTC.js +0 -3
- package/chunks/write-file-XDDLTGSG.js +0 -15
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
# Markdown Rendering
|
|
2
|
-
|
|
3
|
-
Matilda Code renders common Markdown structures directly in the TUI so model
|
|
4
|
-
answers are easier to scan without leaving the terminal. The renderer is
|
|
5
|
-
designed to keep the original source reachable, especially for visual blocks
|
|
6
|
-
such as Mermaid diagrams and LaTeX math.
|
|
7
|
-
|
|
8
|
-
## Render and Raw Modes
|
|
9
|
-
|
|
10
|
-
By default, Markdown is shown in `render` mode. Supported blocks render as
|
|
11
|
-
visual previews where possible:
|
|
12
|
-
|
|
13
|
-
- Mermaid fenced code blocks
|
|
14
|
-
- Markdown tables
|
|
15
|
-
- task lists
|
|
16
|
-
- blockquotes
|
|
17
|
-
- inline and block LaTeX math
|
|
18
|
-
- fenced code blocks with syntax highlighting
|
|
19
|
-
|
|
20
|
-
Press `Alt/Option+M` to toggle the current session between modes. On macOS,
|
|
21
|
-
the terminal must send Option as Meta for this shortcut; otherwise Option+M is
|
|
22
|
-
treated as normal text input.
|
|
23
|
-
|
|
24
|
-
- `render`: show rich terminal previews for supported Markdown.
|
|
25
|
-
- `raw`: show source-oriented Markdown for visual blocks such as Mermaid,
|
|
26
|
-
tables, and LaTeX.
|
|
27
|
-
|
|
28
|
-
To start Matilda Code in raw mode by default, set `ui.renderMode`:
|
|
29
|
-
|
|
30
|
-
```json
|
|
31
|
-
{
|
|
32
|
-
"ui": {
|
|
33
|
-
"renderMode": "raw"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Accepted values are `"render"` and `"raw"`. The shortcut only changes the
|
|
39
|
-
current session view; it does not rewrite your settings file.
|
|
40
|
-
|
|
41
|
-
## Mermaid
|
|
42
|
-
|
|
43
|
-
Fenced `mermaid` code blocks render visually in `render` mode. The TUI uses a
|
|
44
|
-
layered strategy:
|
|
45
|
-
|
|
46
|
-
1. If enabled and supported, Matilda Code asks Mermaid CLI (`mmdc`) to render the
|
|
47
|
-
diagram to a PNG and sends it to the terminal image protocol.
|
|
48
|
-
2. If terminal images are unavailable but `chafa` is installed, the same PNG can
|
|
49
|
-
be converted to ANSI block graphics.
|
|
50
|
-
3. Otherwise, Matilda Code falls back to a terminal wireframe or compact text
|
|
51
|
-
preview.
|
|
52
|
-
4. If a Mermaid diagram type cannot be previewed, Matilda Code shows the original
|
|
53
|
-
fenced source instead of hiding it behind a placeholder.
|
|
54
|
-
|
|
55
|
-
Mermaid image rendering is disabled by default because it requires external
|
|
56
|
-
renderers and terminal image support. Enable it with:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
MATILDA_CODE_MERMAID_IMAGE_RENDERING=1 matilda
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Optional environment variables:
|
|
63
|
-
|
|
64
|
-
| Variable | Description |
|
|
65
|
-
| ---------------------------------------------- | -------------------------------------------------------------------------------------- |
|
|
66
|
-
| `MATILDA_CODE_MERMAID_IMAGE_RENDERING=1` | Enables external Mermaid image rendering. |
|
|
67
|
-
| `MATILDA_CODE_DISABLE_MERMAID_IMAGES=1` | Disables Mermaid image rendering even when enabled elsewhere. |
|
|
68
|
-
| `MATILDA_CODE_MERMAID_IMAGE_PROTOCOL=kitty` | Forces Kitty protocol output. Useful for terminals such as Kitty and Ghostty. |
|
|
69
|
-
| `MATILDA_CODE_MERMAID_IMAGE_PROTOCOL=iterm2` | Requests iTerm2 inline images. Interactive TUI rendering falls back to text/ANSI. |
|
|
70
|
-
| `MATILDA_CODE_MERMAID_IMAGE_PROTOCOL=off` | Disables terminal image protocols and allows text or `chafa` fallback. |
|
|
71
|
-
| `MATILDA_CODE_MERMAID_MMD_CLI=/path/to/mmdc` | Uses a specific Mermaid CLI executable. |
|
|
72
|
-
| `MATILDA_CODE_MERMAID_ALLOW_NPX=1` | Allows Matilda Code to run `npx @mermaid-js/mermaid-cli` when `mmdc` is not installed. |
|
|
73
|
-
| `MATILDA_CODE_MERMAID_ALLOW_LOCAL_RENDERERS=1` | Allows project-local renderer binaries under `node_modules/.bin`. |
|
|
74
|
-
| `MATILDA_CODE_MERMAID_RENDER_WIDTH=1200` | Overrides the PNG render width. |
|
|
75
|
-
| `MATILDA_CODE_MERMAID_RENDER_TIMEOUT_MS=10000` | Overrides the external render timeout, capped at 60000 ms. |
|
|
76
|
-
| `MATILDA_CODE_MERMAID_CELL_ASPECT_RATIO=0.5` | Adjusts image row fitting for terminal font cell geometry. |
|
|
77
|
-
|
|
78
|
-
The first image render can be slow, especially when `npx` needs to resolve or
|
|
79
|
-
download Mermaid CLI. During streaming, Matilda Code shows a bounded text preview
|
|
80
|
-
and attempts image rendering only after the model response is complete.
|
|
81
|
-
|
|
82
|
-
### Mermaid Source Copy
|
|
83
|
-
|
|
84
|
-
Every rendered Mermaid block includes a source hint such as:
|
|
85
|
-
|
|
86
|
-
```text
|
|
87
|
-
Mermaid flowchart (TD) · source: /copy mermaid 1
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Use these commands to copy Mermaid source from the last AI response:
|
|
91
|
-
|
|
92
|
-
| Command | Behavior |
|
|
93
|
-
| ---------------------- | --------------------------------------------- |
|
|
94
|
-
| `/copy mermaid` | Copies the last Mermaid block. |
|
|
95
|
-
| `/copy mermaid 1` | Copies the first Mermaid block. |
|
|
96
|
-
| `/copy code mermaid` | Copies the last fenced `mermaid` code block. |
|
|
97
|
-
| `/copy code mermaid 1` | Copies the first fenced `mermaid` code block. |
|
|
98
|
-
|
|
99
|
-
`/copy code 1` counts all fenced code blocks, not only Mermaid blocks. Use
|
|
100
|
-
`/copy mermaid N` when you want the Mermaid-specific sequence shown in the
|
|
101
|
-
rendered title.
|
|
102
|
-
|
|
103
|
-
## LaTeX Math
|
|
104
|
-
|
|
105
|
-
Matilda Code supports basic inline and block LaTeX rendering in the terminal:
|
|
106
|
-
|
|
107
|
-
```markdown
|
|
108
|
-
Inline math: $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$
|
|
109
|
-
|
|
110
|
-
$$
|
|
111
|
-
\sum_{n=1}^{\infty} 1/n^2 = \pi^2/6
|
|
112
|
-
$$
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
The renderer focuses on common symbols and readable terminal output. It is not
|
|
116
|
-
a full TeX engine; complex layouts such as matrices, aligned equations, and
|
|
117
|
-
large nested expressions may be simplified.
|
|
118
|
-
|
|
119
|
-
Inline `$...$` expressions are intentionally bounded to 1024 characters per
|
|
120
|
-
line so malformed or very large generated Markdown cannot stall terminal
|
|
121
|
-
rendering. Longer formulas remain visible as source text and can still be
|
|
122
|
-
copied from raw mode or the original response.
|
|
123
|
-
|
|
124
|
-
### LaTeX Source Copy
|
|
125
|
-
|
|
126
|
-
Use these commands to copy LaTeX source from the last AI response:
|
|
127
|
-
|
|
128
|
-
| Command | Behavior |
|
|
129
|
-
| ---------------------- | --------------------------------------- |
|
|
130
|
-
| `/copy latex` | Copies the last block LaTeX expression. |
|
|
131
|
-
| `/copy latex 2` | Copies the second block expression. |
|
|
132
|
-
| `/copy latex inline` | Copies the last inline expression. |
|
|
133
|
-
| `/copy latex inline 2` | Copies the second inline expression. |
|
|
134
|
-
| `/copy inline-latex 2` | Alias for `/copy latex inline 2`. |
|
|
135
|
-
|
|
136
|
-
Inline LaTeX does not show a per-expression copy hint in rendered text to avoid
|
|
137
|
-
making prose noisy. Switch to raw mode with `Alt/Option+M` when you want to
|
|
138
|
-
inspect inline source in place; on macOS this requires Option-as-Meta terminal
|
|
139
|
-
input.
|
|
140
|
-
|
|
141
|
-
## General Code Copy
|
|
142
|
-
|
|
143
|
-
The `/copy code` command reads fenced code blocks from the last AI Markdown
|
|
144
|
-
response:
|
|
145
|
-
|
|
146
|
-
| Command | Behavior |
|
|
147
|
-
| ----------------------- | ---------------------------------------- |
|
|
148
|
-
| `/copy code` | Copies the last fenced code block. |
|
|
149
|
-
| `/copy code 2` | Copies the second fenced code block. |
|
|
150
|
-
| `/copy code typescript` | Copies the last `typescript` code block. |
|
|
151
|
-
| `/copy code mermaid 1` | Copies the first `mermaid` code block. |
|
|
152
|
-
|
|
153
|
-
## Selecting an Earlier AI Message
|
|
154
|
-
|
|
155
|
-
By default `/copy` targets the most recent AI message. Prefix the command with
|
|
156
|
-
a positive integer to copy from the Nth-last AI message instead — handy when
|
|
157
|
-
the latest reply is something low-signal (e.g., a TODO update) and the
|
|
158
|
-
substantive output is one or two turns back.
|
|
159
|
-
|
|
160
|
-
| Command | Behavior |
|
|
161
|
-
| --------------------- | ------------------------------------------------------ |
|
|
162
|
-
| `/copy 2` | Copies the second-to-last AI message in full. |
|
|
163
|
-
| `/copy 3` | Copies the third-to-last AI message in full. |
|
|
164
|
-
| `/copy 2 code python` | Copies the last `python` code block from the 2nd-last. |
|
|
165
|
-
| `/copy 3 latex` | Copies the last LaTeX block from the 3rd-last message. |
|
|
166
|
-
|
|
167
|
-
`/copy 1` is equivalent to `/copy`. If `N` exceeds the number of AI messages
|
|
168
|
-
in the session, `/copy` reports the actual count instead of copying anything.
|
|
169
|
-
Without a leading integer, sub-selectors such as `/copy code python 2` keep
|
|
170
|
-
their existing meaning (the 2nd `python` block in the last message).
|
|
171
|
-
|
|
172
|
-
## Current Limits
|
|
173
|
-
|
|
174
|
-
- Mermaid image rendering depends on Mermaid CLI plus terminal image support.
|
|
175
|
-
- Async iTerm2 inline image placement is disabled in the TUI because the
|
|
176
|
-
protocol is cursor-position bound; use Kitty/Ghostty or ANSI fallback for
|
|
177
|
-
interactive image previews.
|
|
178
|
-
- Wireframe Mermaid rendering is a readable terminal preview, not a full
|
|
179
|
-
Mermaid layout engine.
|
|
180
|
-
- Raw mode is global for rendered Markdown blocks; it is not a per-block toggle.
|
|
181
|
-
- LaTeX rendering covers common symbols and expressions, not full TeX layout.
|
|
182
|
-
- Source copy commands target the last AI response by default, or the Nth-last
|
|
183
|
-
when invoked as `/copy N ...`.
|
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
# Connect Matilda Code to tools via MCP
|
|
2
|
-
|
|
3
|
-
Matilda Code can connect to external tools and data sources through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction). MCP servers give Matilda Code access to your tools, databases, and APIs.
|
|
4
|
-
|
|
5
|
-
## What you can do with MCP
|
|
6
|
-
|
|
7
|
-
With MCP servers connected, you can ask Matilda Code to:
|
|
8
|
-
|
|
9
|
-
- Work with files and repos (read/search/write, depending on the tools you enable)
|
|
10
|
-
- Query databases (schema inspection, queries, reporting)
|
|
11
|
-
- Integrate internal services (wrap your APIs as MCP tools)
|
|
12
|
-
- Automate workflows (repeatable tasks exposed as tools/prompts)
|
|
13
|
-
|
|
14
|
-
> [!tip]
|
|
15
|
-
>
|
|
16
|
-
> If you’re looking for the “one command to get started”, jump to [Quick start](#quick-start).
|
|
17
|
-
|
|
18
|
-
## Quick start
|
|
19
|
-
|
|
20
|
-
Matilda Code loads MCP servers from `mcpServers` in your `settings.json`. You can configure servers either:
|
|
21
|
-
|
|
22
|
-
- By editing `settings.json` directly
|
|
23
|
-
- By using `matilda mcp` commands (see [CLI reference](#matilda-mcp-cli))
|
|
24
|
-
|
|
25
|
-
### Add your first server
|
|
26
|
-
|
|
27
|
-
1. Add a server (example: remote HTTP MCP server):
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
matilda mcp add --transport http my-server http://localhost:3000/mcp
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
2. Open MCP management dialog to view and manage servers:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
matilda mcp
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
3. Restart Matilda Code in the same project (or start it if it wasn’t running yet), then ask the model to use tools from that server.
|
|
40
|
-
|
|
41
|
-
## Where configuration is stored (scopes)
|
|
42
|
-
|
|
43
|
-
Most users only need these two scopes:
|
|
44
|
-
|
|
45
|
-
- **Project scope (default)**: `.matilda/settings.json` in your project root
|
|
46
|
-
- **User scope**: `~/.matilda/settings.json` across all projects on your machine
|
|
47
|
-
|
|
48
|
-
Write to user scope:
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
matilda mcp add --scope user --transport http my-server http://localhost:3000/mcp
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
> [!tip]
|
|
55
|
-
>
|
|
56
|
-
> For advanced configuration layers (system defaults/system settings and precedence rules), see [Settings](../configuration/settings).
|
|
57
|
-
|
|
58
|
-
## Configure servers
|
|
59
|
-
|
|
60
|
-
### Choose a transport
|
|
61
|
-
|
|
62
|
-
| Transport | When to use | JSON field(s) |
|
|
63
|
-
| --------- | ----------------------------------------------------------------- | ------------------------------------------- |
|
|
64
|
-
| `http` | Recommended for remote services; works well for cloud MCP servers | `httpUrl` (+ optional `headers`) |
|
|
65
|
-
| `sse` | Legacy/deprecated servers that only support Server-Sent Events | `url` (+ optional `headers`) |
|
|
66
|
-
| `stdio` | Local process (scripts, CLIs, Docker) on your machine | `command`, `args` (+ optional `cwd`, `env`) |
|
|
67
|
-
|
|
68
|
-
> [!note]
|
|
69
|
-
>
|
|
70
|
-
> If a server supports both, prefer **HTTP** over **SSE**.
|
|
71
|
-
|
|
72
|
-
### Configure via `settings.json` vs `matilda mcp add`
|
|
73
|
-
|
|
74
|
-
Both approaches produce the same `mcpServers` entries in your `settings.json`—use whichever you prefer.
|
|
75
|
-
|
|
76
|
-
#### Stdio server (local process)
|
|
77
|
-
|
|
78
|
-
JSON (`.matilda/settings.json`):
|
|
79
|
-
|
|
80
|
-
```json
|
|
81
|
-
{
|
|
82
|
-
"mcpServers": {
|
|
83
|
-
"pythonTools": {
|
|
84
|
-
"command": "python",
|
|
85
|
-
"args": ["-m", "my_mcp_server", "--port", "8080"],
|
|
86
|
-
"cwd": "./mcp-servers/python",
|
|
87
|
-
"env": {
|
|
88
|
-
"DATABASE_URL": "$DB_CONNECTION_STRING",
|
|
89
|
-
"API_KEY": "${EXTERNAL_API_KEY}"
|
|
90
|
-
},
|
|
91
|
-
"timeout": 15000
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
CLI (writes to project scope by default):
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
matilda mcp add pythonTools -e DATABASE_URL=$DB_CONNECTION_STRING -e API_KEY=$EXTERNAL_API_KEY \
|
|
101
|
-
--timeout 15000 python -m my_mcp_server --port 8080
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
#### HTTP server (remote streamable HTTP)
|
|
105
|
-
|
|
106
|
-
JSON:
|
|
107
|
-
|
|
108
|
-
```json
|
|
109
|
-
{
|
|
110
|
-
"mcpServers": {
|
|
111
|
-
"httpServerWithAuth": {
|
|
112
|
-
"httpUrl": "http://localhost:3000/mcp",
|
|
113
|
-
"headers": {
|
|
114
|
-
"Authorization": "Bearer your-api-token"
|
|
115
|
-
},
|
|
116
|
-
"timeout": 5000
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
CLI:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
matilda mcp add --transport http httpServerWithAuth http://localhost:3000/mcp \
|
|
126
|
-
--header "Authorization: Bearer your-api-token" --timeout 5000
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
#### SSE server (remote Server-Sent Events)
|
|
130
|
-
|
|
131
|
-
JSON:
|
|
132
|
-
|
|
133
|
-
```json
|
|
134
|
-
{
|
|
135
|
-
"mcpServers": {
|
|
136
|
-
"sseServer": {
|
|
137
|
-
"url": "http://localhost:8080/sse",
|
|
138
|
-
"timeout": 30000
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
CLI:
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
matilda mcp add --transport sse sseServer http://localhost:8080/sse --timeout 30000
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Progressive availability and discovery timeouts
|
|
151
|
-
|
|
152
|
-
Matilda Code discovers MCP servers in the background after the UI is already
|
|
153
|
-
interactive. You see the cli's first prompt within a few hundred
|
|
154
|
-
milliseconds even when one of your MCP servers takes several seconds
|
|
155
|
-
(or never responds), and the model's tool list updates within roughly
|
|
156
|
-
one frame (~16 ms) of each server completing its discover handshake.
|
|
157
|
-
|
|
158
|
-
- **Interactive mode**: the UI appears immediately; an MCP status pill in
|
|
159
|
-
the bottom-right shows `N/M MCP servers ready` while discovery is in
|
|
160
|
-
flight. Sending a prompt before MCP finishes simply means the model
|
|
161
|
-
sees the tools that are ready _at that moment_; subsequent prompts see
|
|
162
|
-
more tools as servers come online.
|
|
163
|
-
- **Non-interactive mode** (`--prompt`, stream-json, ACP): the cli still
|
|
164
|
-
waits for MCP discovery to settle before sending the first prompt, so
|
|
165
|
-
scripted / piped invocations see the same complete tool set the
|
|
166
|
-
legacy synchronous behavior produced.
|
|
167
|
-
|
|
168
|
-
### Per-server `discoveryTimeoutMs`
|
|
169
|
-
|
|
170
|
-
Each MCP server gets a discovery-only timeout that caps how long the
|
|
171
|
-
initial handshake (`connect` + `tools/list` + `prompts/list` +
|
|
172
|
-
`resources/list`) is allowed to take. Defaults:
|
|
173
|
-
|
|
174
|
-
- **stdio servers**: 30 s
|
|
175
|
-
- **remote HTTP / SSE servers**: 5 s (network risk is higher)
|
|
176
|
-
|
|
177
|
-
Override per server when needed:
|
|
178
|
-
|
|
179
|
-
```jsonc
|
|
180
|
-
{
|
|
181
|
-
"mcpServers": {
|
|
182
|
-
"slow-stdio": {
|
|
183
|
-
"command": "node",
|
|
184
|
-
"args": ["./slow-server.js"],
|
|
185
|
-
"discoveryTimeoutMs": 60000,
|
|
186
|
-
},
|
|
187
|
-
"flaky-remote": {
|
|
188
|
-
"httpUrl": "https://example.com/mcp",
|
|
189
|
-
"discoveryTimeoutMs": 10000,
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
}
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
The existing `timeout` field is **tool-call** timeout (used for each
|
|
196
|
-
`tools/call` request, default 10 minutes) and is unaffected by
|
|
197
|
-
`discoveryTimeoutMs` — a long-running tool invocation is not a startup
|
|
198
|
-
pathology.
|
|
199
|
-
|
|
200
|
-
### Rolling back progressive MCP
|
|
201
|
-
|
|
202
|
-
If you need the old synchronous behavior (cli waits for every MCP server
|
|
203
|
-
before showing any UI), set `MATILDA_CODE_LEGACY_MCP_BLOCKING=1` in your
|
|
204
|
-
environment. This is kept as an escape hatch for at least one release.
|
|
205
|
-
|
|
206
|
-
## Safety and control
|
|
207
|
-
|
|
208
|
-
### Trust (skip confirmations)
|
|
209
|
-
|
|
210
|
-
- **Server trust** (`trust: true`): bypasses confirmation prompts for that server (use sparingly).
|
|
211
|
-
|
|
212
|
-
### OAuth authentication
|
|
213
|
-
|
|
214
|
-
Matilda Code supports OAuth 2.0 authentication for MCP servers. This is useful when accessing remote servers that require authentication.
|
|
215
|
-
|
|
216
|
-
#### Basic usage
|
|
217
|
-
|
|
218
|
-
When you add an MCP server with OAuth credentials, Matilda Code will automatically handle the authentication flow:
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
matilda mcp add --transport sse oauth-server https://api.example.com/sse/ \
|
|
222
|
-
--oauth-client-id your-client-id \
|
|
223
|
-
--oauth-redirect-uri https://your-server.com/oauth/callback \
|
|
224
|
-
--oauth-authorization-url https://provider.example.com/authorize \
|
|
225
|
-
--oauth-token-url https://provider.example.com/token
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
#### Important: Redirect URI configuration
|
|
229
|
-
|
|
230
|
-
The OAuth flow requires a redirect URI where the authorization provider sends the authentication code.
|
|
231
|
-
|
|
232
|
-
- **Local development**: By default, Matilda Code uses `http://localhost:7777/callback`. This works when running Matilda Code on your local machine with a local browser.
|
|
233
|
-
|
|
234
|
-
- **Remote/cloud deployments**: When running Matilda Code on remote servers, cloud IDEs, or web terminals, the default `localhost` redirect will NOT work. You MUST configure `--oauth-redirect-uri` to point to a publicly accessible URL that can receive the OAuth callback.
|
|
235
|
-
|
|
236
|
-
Example for remote servers:
|
|
237
|
-
|
|
238
|
-
```bash
|
|
239
|
-
matilda mcp add --transport sse remote-server https://api.example.com/sse/ \
|
|
240
|
-
--oauth-redirect-uri https://your-remote-server.example.com/oauth/callback
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
#### Manual configuration via settings.json
|
|
244
|
-
|
|
245
|
-
You can also configure OAuth by editing `settings.json` directly:
|
|
246
|
-
|
|
247
|
-
```json
|
|
248
|
-
{
|
|
249
|
-
"mcpServers": {
|
|
250
|
-
"oauthServer": {
|
|
251
|
-
"url": "https://api.example.com/sse/",
|
|
252
|
-
"oauth": {
|
|
253
|
-
"enabled": true,
|
|
254
|
-
"clientId": "your-client-id",
|
|
255
|
-
"clientSecret": "your-client-secret",
|
|
256
|
-
"authorizationUrl": "https://provider.example.com/authorize",
|
|
257
|
-
"tokenUrl": "https://provider.example.com/token",
|
|
258
|
-
"redirectUri": "https://your-server.com/oauth/callback",
|
|
259
|
-
"scopes": ["read", "write"]
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
OAuth configuration properties:
|
|
267
|
-
|
|
268
|
-
| Property | Description |
|
|
269
|
-
| ------------------ | --------------------------------------------------------------------------------------------------------------------- |
|
|
270
|
-
| `enabled` | Enable OAuth for this server (boolean) |
|
|
271
|
-
| `clientId` | OAuth client identifier (string, optional with dynamic registration) |
|
|
272
|
-
| `clientSecret` | OAuth client secret (string, optional for public clients) |
|
|
273
|
-
| `authorizationUrl` | OAuth authorization endpoint (string, auto-discovered if omitted) |
|
|
274
|
-
| `tokenUrl` | OAuth token endpoint (string, auto-discovered if omitted) |
|
|
275
|
-
| `scopes` | Required OAuth scopes (array of strings) |
|
|
276
|
-
| `redirectUri` | Custom redirect URI (string). **Critical for remote deployments**. Defaults to `http://localhost:7777/callback` |
|
|
277
|
-
| `tokenParamName` | Query parameter name for tokens in SSE URLs (string) |
|
|
278
|
-
| `audiences` | Audiences the token is valid for (array of strings) |
|
|
279
|
-
|
|
280
|
-
#### Token management
|
|
281
|
-
|
|
282
|
-
OAuth tokens are automatically:
|
|
283
|
-
|
|
284
|
-
- **Stored securely** in `~/.matilda/mcp-oauth-tokens-v2.json` (AES-256-GCM encrypted), with keychain storage preferred when available
|
|
285
|
-
- **Refreshed** when expired (if refresh tokens are available)
|
|
286
|
-
- **Validated** before each connection attempt
|
|
287
|
-
|
|
288
|
-
Use the `/mcp auth` command within Matilda Code to manage OAuth authentication interactively.
|
|
289
|
-
|
|
290
|
-
### Tool filtering (allow/deny tools per server)
|
|
291
|
-
|
|
292
|
-
Use `includeTools` / `excludeTools` to restrict tools exposed by a server (from Matilda Code’s perspective).
|
|
293
|
-
|
|
294
|
-
Example: include only a few tools:
|
|
295
|
-
|
|
296
|
-
```json
|
|
297
|
-
{
|
|
298
|
-
"mcpServers": {
|
|
299
|
-
"filteredServer": {
|
|
300
|
-
"command": "python",
|
|
301
|
-
"args": ["-m", "my_mcp_server"],
|
|
302
|
-
"includeTools": ["safe_tool", "file_reader", "data_processor"],
|
|
303
|
-
"timeout": 30000
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
### Global allow/deny lists
|
|
310
|
-
|
|
311
|
-
The `mcp` object in your `settings.json` defines global rules for all MCP servers:
|
|
312
|
-
|
|
313
|
-
- `mcp.allowed`: allow-list of MCP server names (keys in `mcpServers`)
|
|
314
|
-
- `mcp.excluded`: deny-list of MCP server names
|
|
315
|
-
|
|
316
|
-
Example:
|
|
317
|
-
|
|
318
|
-
```json
|
|
319
|
-
{
|
|
320
|
-
"mcp": {
|
|
321
|
-
"allowed": ["my-trusted-server"],
|
|
322
|
-
"excluded": ["experimental-server"]
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
## Troubleshooting
|
|
328
|
-
|
|
329
|
-
- **Server shows “Disconnected” in `matilda mcp list`**: verify the URL/command is correct, then increase `timeout`.
|
|
330
|
-
- **Stdio server fails to start**: use an absolute `command` path, and double-check `cwd`/`env`.
|
|
331
|
-
- **Environment variables in JSON don’t resolve**: ensure they exist in the environment where Matilda Code runs (shell vs GUI app environments can differ).
|
|
332
|
-
|
|
333
|
-
## Reference
|
|
334
|
-
|
|
335
|
-
### `settings.json` structure
|
|
336
|
-
|
|
337
|
-
#### Server-specific configuration (`mcpServers`)
|
|
338
|
-
|
|
339
|
-
Add an `mcpServers` object to your `settings.json` file:
|
|
340
|
-
|
|
341
|
-
```json
|
|
342
|
-
// ... file contains other config objects
|
|
343
|
-
{
|
|
344
|
-
"mcpServers": {
|
|
345
|
-
"serverName": {
|
|
346
|
-
"command": "path/to/server",
|
|
347
|
-
"args": ["--arg1", "value1"],
|
|
348
|
-
"env": {
|
|
349
|
-
"API_KEY": "$MY_API_TOKEN"
|
|
350
|
-
},
|
|
351
|
-
"cwd": "./server-directory",
|
|
352
|
-
"timeout": 30000,
|
|
353
|
-
"trust": false
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
Configuration properties:
|
|
360
|
-
|
|
361
|
-
Required (one of the following):
|
|
362
|
-
|
|
363
|
-
| Property | Description |
|
|
364
|
-
| --------- | ------------------------------------------------------ |
|
|
365
|
-
| `command` | Path to the executable for Stdio transport |
|
|
366
|
-
| `url` | SSE endpoint URL (e.g., `"http://localhost:8080/sse"`) |
|
|
367
|
-
| `httpUrl` | HTTP streaming endpoint URL |
|
|
368
|
-
|
|
369
|
-
Optional:
|
|
370
|
-
|
|
371
|
-
| Property | Type/Default | Description |
|
|
372
|
-
| ---------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
373
|
-
| `args` | array | Command-line arguments for Stdio transport |
|
|
374
|
-
| `headers` | object | Custom HTTP headers when using `url` or `httpUrl` |
|
|
375
|
-
| `env` | object | Environment variables for the server process. Values can reference environment variables using `$VAR_NAME` or `${VAR_NAME}` syntax |
|
|
376
|
-
| `cwd` | string | Working directory for Stdio transport |
|
|
377
|
-
| `timeout` | number<br>(default: 600,000) | Request timeout in milliseconds (default: 600,000ms = 10 minutes) |
|
|
378
|
-
| `trust` | boolean<br>(default: false) | When `true`, bypasses all tool call confirmations for this server (default: `false`) |
|
|
379
|
-
| `includeTools` | array | List of tool names to include from this MCP server. When specified, only the tools listed here will be available from this server (allowlist behavior). If not specified, all tools from the server are enabled by default. |
|
|
380
|
-
| `excludeTools` | array | List of tool names to exclude from this MCP server. Tools listed here will not be available to the model, even if they are exposed by the server.<br>Note: `excludeTools` takes precedence over `includeTools` - if a tool is in both lists, it will be excluded. |
|
|
381
|
-
| `targetAudience` | string | The OAuth Client ID allowlisted on the IAP-protected application you are trying to access. Used with `authProviderType: 'service_account_impersonation'`. |
|
|
382
|
-
| `targetServiceAccount` | string | The email address of the Google Cloud Service Account to impersonate. Used with `authProviderType: 'service_account_impersonation'`. |
|
|
383
|
-
|
|
384
|
-
<a id="matilda-mcp-cli"></a>
|
|
385
|
-
|
|
386
|
-
### Manage MCP servers with `matilda mcp`
|
|
387
|
-
|
|
388
|
-
You can always configure MCP servers by manually editing `settings.json`, but the CLI is usually faster.
|
|
389
|
-
|
|
390
|
-
#### Adding a server (`matilda mcp add`)
|
|
391
|
-
|
|
392
|
-
```bash
|
|
393
|
-
matilda mcp add [options] <name> <commandOrUrl> [args...]
|
|
394
|
-
```
|
|
395
|
-
|
|
396
|
-
| Argument/Option | Description | Default | Example |
|
|
397
|
-
| --------------------------- | ------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------------------------ |
|
|
398
|
-
| `<name>` | A unique name for the server. | — | `example-server` |
|
|
399
|
-
| `<commandOrUrl>` | The command to execute (for `stdio`) or the URL (for `http`/`sse`). | — | `/usr/bin/python` or `http://localhost:8` |
|
|
400
|
-
| `[args...]` | Optional arguments for a `stdio` command. | — | `--port 5000` |
|
|
401
|
-
| `-s`, `--scope` | Configuration scope (user or project). | `project` | `-s user` |
|
|
402
|
-
| `-t`, `--transport` | Transport type (`stdio`, `sse`, `http`). | `stdio` | `-t sse` |
|
|
403
|
-
| `-e`, `--env` | Set environment variables. | — | `-e KEY=value` |
|
|
404
|
-
| `-H`, `--header` | Set HTTP headers for SSE and HTTP transports. | — | `-H "X-Api-Key: abc123"` |
|
|
405
|
-
| `--timeout` | Set connection timeout in milliseconds. | — | `--timeout 30000` |
|
|
406
|
-
| `--trust` | Trust the server (bypass all tool call confirmation prompts). | — (`false`) | `--trust` |
|
|
407
|
-
| `--description` | Set the description for the server. | — | `--description "Local tools"` |
|
|
408
|
-
| `--include-tools` | A comma-separated list of tools to include. | all tools included | `--include-tools mytool,othertool` |
|
|
409
|
-
| `--exclude-tools` | A comma-separated list of tools to exclude. | none | `--exclude-tools mytool` |
|
|
410
|
-
| `--oauth-client-id` | OAuth client ID for MCP server authentication. | — | `--oauth-client-id your-client-id` |
|
|
411
|
-
| `--oauth-client-secret` | OAuth client secret for MCP server authentication. | — | `--oauth-client-secret your-client-secret` |
|
|
412
|
-
| `--oauth-redirect-uri` | OAuth redirect URI for authentication callback. | `http://localhost:7777/callback` | `--oauth-redirect-uri https://your-server.com/oauth/callback` |
|
|
413
|
-
| `--oauth-authorization-url` | OAuth authorization URL. | — | `--oauth-authorization-url https://provider.example.com/authorize` |
|
|
414
|
-
| `--oauth-token-url` | OAuth token URL. | — | `--oauth-token-url https://provider.example.com/token` |
|
|
415
|
-
| `--oauth-scopes` | OAuth scopes (comma-separated). | — | `--oauth-scopes scope1,scope2` |
|
|
416
|
-
|
|
417
|
-
> `--oauth-*` flags apply only to `--transport sse` and `--transport http`. Combining them with `--transport stdio` is rejected.
|
|
418
|
-
|
|
419
|
-
#### Removing a server (`matilda mcp remove`)
|
|
420
|
-
|
|
421
|
-
```bash
|
|
422
|
-
matilda mcp remove <name>
|
|
423
|
-
```
|