feat: lenient JSON repair for pasted MCP snippets
Pasted config snippets no longer have to be valid JSON. repair_json_text() auto-fixes markdown fences, surrounding prose, // /* */ # comments, trailing and missing commas, smart quotes, single quotes, unquoted keys, Python/JS literals, and unclosed braces. parse_pasted_json_verbose() reports every repair applied; the paste dialog now parses as you type and previews exactly what will be added and what was fixed. Also includes ruff lint fixes and formatting across bcc.py/bcc_core.py.
This commit is contained in:
@@ -36,8 +36,12 @@ python bcc.py
|
||||
other file manually.
|
||||
- **Form-based editing** — name, command, args (one per line), env vars, or for
|
||||
remote servers: URL, transport, and headers. No raw JSON.
|
||||
- **Paste JSON** — drop in any snippet from an MCP doc (full `mcpServers` block,
|
||||
inner map, or a single bare server object); it's parsed and merged.
|
||||
- **Paste JSON — even broken JSON** — drop in any snippet from an MCP doc (full
|
||||
`mcpServers` block, inner map, or a single bare server object); it's parsed
|
||||
and merged. The paste box parses as you type and auto-repairs the stuff docs
|
||||
and chat windows love to break: markdown fences, surrounding prose, comments,
|
||||
trailing or missing commas, smart quotes, single quotes, unquoted keys, and
|
||||
unclosed braces — and tells you exactly what it fixed before you commit.
|
||||
- **Drag & drop** a `.json` file onto the window to import servers from it.
|
||||
- **Copy to ▸** — copy the selected server straight into your *other* install.
|
||||
- **Active / Disabled sections** — servers are shown in two labelled lists with
|
||||
|
||||
Reference in New Issue
Block a user