Repository navigation
Users page: connect an AI agent by the MCP URL; name the hosted-agent presets for their product - #1158
Conversation
…their product With mason serve's MCP endpoint on, "Connect an AI agent" leads with the endpoint's address and Copy, one line per client (claude.ai and Claude Desktop, ChatGPT, Claude Code, Cursor) saying where it goes, one sign-in line and one on where each client connects from. The mason mcp way, with a password, is under a closed "For a client that can't sign in in a browser". With the endpoint off, the mason mcp way alone, shorter. New user added shows the MCP URL beside the Postgres URL, the same instructions closed under them, built by the box's own renderer, the sign-in naming the user. Connects from's presets sit under "A hosted agent's servers", labelled "claude.ai" and "ChatGPT on the web"; choosing one says Claude Code and Cursor connect from your computer, in a place kept unseen otherwise. A user's row reads "from claude.ai's servers (2 ranges)". Closes #1155 Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
From Claude (Opus 5.5)Fresh review of PR 1158 at head I read issue 1155, the PR body, the whole diff and CI: green at the head: What I ran
Password: it appears nowhere new.
Regressions: none found.
Client lines against the vendors' docs
Easy and intuitive? Yes, for the most part.
The one change that would help most is to drop the box's line "Claude Code and Cursor connect from your computer. claude.ai, Claude Desktop and ChatGPT connect from their companies' servers." It matters only to someone choosing Connects from, and the preset hint now says it at that moment. Without it, the box would be the URL, four client lines and one sign-in line. Notes (none blocking)
Generated by Claude Code |
Closes #1155
The decision (the owner's, recorded on the issue on 2026-11-18: simple and intuitive; it replaced the radio choice of clients first asked for, which was never built):
/api/statemcp): one line, the MCP URL with Copy, then one line per client saying where it goes, one sign-in line, one line on where each client connects from. Themason mcpway, with a password, sits under a closed For a client that can't sign in in a browser.mason mcpway alone, in fewer words, and "claude.ai and ChatGPT on the web can't connect this way yet."mcpBody, one renderer for both). Its sign-in line names the user. Itsmason mcplines carry the password, "Shown once", with the shell-history tip in their own closed details. The User and Password rows, "Waiting for its first query…", "The password is only shown once" and I have copied it are unchanged.<optgroup label="A hosted agent's servers">, labelled claude.ai and ChatGPT on the web (the idsclaudeandopenaiare unchanged). Choosing one shows: "Only that agent's connectors connect from these, in its app or on the web. Claude Code and Cursor: choose anywhere, or your computer's address." In From… it takes the address box's place. In the add form it takes the place of the line on roles under the form, because the slot beside the choice is too narrow there. Each shares one grid cell with what it replaces, so nothing moves. A row reads "from claude.ai's servers (2 ranges)", built from a new shortnameon each preset (addressPresets[].name).createOpenSet), so a poll's rewrite keeps it open and keeps the focus on its summary.Where each client's line comes from. I checked these against the vendors' current docs:
claude mcp add --transport http <name> <url>, then/mcpto sign in in the browser. Source: https://code.claude.com/docs/en/mcpmason mcpJSON in the fallback.urlin~/.cursor/mcp.json, signed in in the browser on first use. Not verified on cursor.com, which does not resolve here either. The source is search results quoting https://cursor.com/docs/context/mcp.The sign-in line in the dialog says "If the sign-in page asks for a Mason user, sign in as , with the password above." docs/POSTGRES-API.md says the operator's sign-in page may check a Mason password with
mason user check, so the line is conditional.How it was tested (Node 26.13.0, checked against its SHASUMS256):
tests/web-page.test.ts:mason mcplines);name, the hint in both forms, the row text, and the app over a fake run with the endpoint on.tests/web-radio-groups.test.ts(browser, run locally with Chromium):scripts/fails-without.ts origin/main tests/web-page.test.ts tests/web-radio-groups.test.ts: PROVED, 19 tests fail with src at main.npm run typecheck; web-page (239/239); web-actions, web-lists-layout, web-radio-groups, web-ui-errors, web-ui-account, cli-mcp-http, cli-help, conventions.Screenshots (synthetic state:
https://mason.example.test/mcp,127.0.0.1, a made-up password). I could not upload them as PR images from this session, so they are described here:Left out:
localStorage: no choice to remember any more, so the page still reads no storage, as web-ui.md holds.Generated by Claude Code