feat: import servers from .mcp.json, format JSON, clickable cards, values after create #32
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/open-issues-29-31"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #29, closes #30, closes #31. Also adds importing a server from
.mcp.jsonconfig.Summary
How
.mcp.jsonmaps onto the form:Accepts
{"mcpServers": ...}, VS Code's{"servers": ...}, or a single server entry.lib/json.tsformatJsonText()indents JSON bodies and JSON at the end of a log line. Used in server logs, the install log, last error, test errors, runner details and tool test output. Audit metadata objects are indented too. Copy buttons still copy the raw text.Evidence
{"level":"info","msg":...}on one line; only a card's title opened the server; there was no import.After:
nix develop -c ./scripts/ci.shpasses: lint, typecheck, API 310 tests, runner 46, web 135, build, audit with 0 vulnerabilities.No screenshots: the dev API port is taken by the running
mcphubcontainer on this machine, so the UI was checked through tests only. Worth a look in the browser at the card hover and the import dialog.Merge Danger
Door: two-way
SPA only, no API, schema or migration change. The API still accepts instance values on create (the admin MCP tools use it), so reverting restores the old form as it was.
Blast Radius: small
Admins can no longer type instance values while creating a server; they land on the Variables tab instead. On the portal, a click anywhere on a server card now navigates, apart from the footer controls.
🤖 Generated with Claude Code
The Add a server form takes a pasted mcpServers config (Claude Code, Claude Desktop, Cursor, VS Code shapes) and fills in its fields: npx and uvx packages with version, binary and args, or remote servers with URL, transport and headers. Env entries and ${VAR} references become variables; literal env values are not carried over and are set on the Variables tab. Configs listing several servers let the admin pick one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>