Commit f772e49
authored
fix(registry/483): Docker MCP Catalog → docker run install (no fake docker:// URL) (#484)
Two stacked bugs were preventing 'Add server from Docker MCP Catalog'
from ever working:
1. internal/registries/search.go — parseDocker left ServerEntry.URL
empty, then constructServerURL synthesised 'docker://mcp/<name>'.
The frontend treated any non-empty URL as an HTTP transport and
issued POST 'docker://mcp/sqlite' → 'unsupported protocol scheme:
docker' (the user-visible error in #483).
Fix: parseDocker now emits InstallCmd 'docker run -i --rm mcp/<name>'
(matching the parseFleur pattern for OCI servers) and
constructServerURL no longer fabricates URLs for protocolDocker.
2. frontend/src/services/api.ts + types/api.ts + views/Repositories.vue
— the backend contract serialises install_cmd / connect_url in
snake_case, but the Vue code read server.installCmd / server.connectUrl
(camelCase), so the value was always undefined. With #483's URL
gone, the second bug surfaced as 'Either url or command parameter
is required'.
Fix: read snake_case consistently (matches source_code_url etc.
already used elsewhere in the same file).
Regression tests:
- TestParseDocker asserts InstallCmd populated, URL empty.
- TestConstructServerURL/docker_protocol_returns_empty asserts no
synthetic URL.
End-to-end verified via curl (REST + MCP tool call) and Playwright-
style Chrome flow: a sqlite catalog entry now lands as
{protocol:stdio, command:docker, args:[run,-i,--rm,mcp/sqlite]},
auto-quarantined for review.
Refs: #4831 parent 538c1a9 commit f772e49
5 files changed
Lines changed: 47 additions & 17 deletions
File tree
- frontend/src
- services
- types
- views
- internal/registries
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
646 | | - | |
647 | | - | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
648 | 654 | | |
649 | 655 | | |
650 | 656 | | |
| |||
653 | 659 | | |
654 | 660 | | |
655 | 661 | | |
656 | | - | |
| 662 | + | |
657 | 663 | | |
658 | | - | |
| 664 | + | |
659 | 665 | | |
660 | 666 | | |
661 | 667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
531 | 531 | | |
532 | 532 | | |
533 | 533 | | |
534 | | - | |
535 | | - | |
| 534 | + | |
| 535 | + | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
329 | 336 | | |
330 | | - | |
331 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
332 | 340 | | |
333 | 341 | | |
334 | 342 | | |
| |||
563 | 571 | | |
564 | 572 | | |
565 | 573 | | |
566 | | - | |
567 | | - | |
568 | | - | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
569 | 580 | | |
570 | 581 | | |
571 | 582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
299 | 309 | | |
300 | 310 | | |
301 | 311 | | |
| |||
769 | 779 | | |
770 | 780 | | |
771 | 781 | | |
772 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
773 | 786 | | |
774 | 787 | | |
775 | | - | |
| 788 | + | |
776 | 789 | | |
777 | 790 | | |
778 | 791 | | |
| |||
0 commit comments