Skip to content

Users page: connect an AI agent by the MCP URL; name the hosted-agent presets for their product - #1158

Merged
tagspace merged 2 commits into
mainfrom
issue-1155-mcp-client-choice
Nov 18, 2026
Merged

tagspace merged 2 commits into
mainfrom
issue-1155-mcp-client-choice

Conversation

@tagspace

Copy link
Copy Markdown
Member

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):

  • "Connect an AI agent", the endpoint on (/api/state mcp): 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. The mason mcp way, with a password, sits under a closed For a client that can't sign in in a browser.
  • The endpoint off: the mason mcp way alone, in fewer words, and "claude.ai and ChatGPT on the web can't connect this way yet."
  • New user added: the Postgres URL, then an MCP URL row with Copy when the endpoint is on. Under them sits a closed Connect an AI agent, the box's own body (mcpBody, one renderer for both). Its sign-in line names the user. Its mason mcp lines 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.
  • Connects from: the presets now sit under <optgroup label="A hosted agent's servers">, labelled claude.ai and ChatGPT on the web (the ids claude and openai are 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 short name on each preset (addressPresets[].name).
  • Whether a details is open is the page's state (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 Code: claude mcp add --transport http <name> <url>, then /mcp to sign in in the browser. Source: https://code.claude.com/docs/en/mcp
  • claude.ai and Claude Desktop: Customize, then Connectors, then Add custom connector. Source: https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp
    • That page also says remote connectors are "configured and brokered through your Claude account", and "Claude connects to your remote MCP server from Anthropic's cloud infrastructure, rather than from your local device."
    • So Claude Desktop's custom connectors connect from Anthropic's servers, not the person's computer. The connects-from line and the preset hint say that. They do not use the wording the owner suggested, which listed Claude Desktop as connecting from your own computer. That holds only for the mason mcp JSON in the fallback.
  • ChatGPT: "turn on Developer mode in its settings, then create an app with the address." Not verified on OpenAI's own pages. help.openai.com and developers.openai.com do not resolve from this session's network. I wrote the line from search results that point to OpenAI's help article "Connecting custom MCP servers in ChatGPT" (https://help.openai.com/en/articles/12584461-developer-mode-and-mcp-apps-in-chatgpt), and kept it generic so it does not depend on exact menu labels.
  • Cursor: a server's url in ~/.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.
  • Both of the last two should be checked by someone with access before release.

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:
    • the box with the endpoint off: no per-client lines, no details, the short text;
    • the box with the endpoint on: the URL first, each client's line, the fallback closed and holding the password-bearing snippets, and the open set;
    • the dialog with the endpoint off: the Postgres URL alone;
    • the dialog with the endpoint on: both URLs up front, the instructions closed, the box's same client lines, sign in as the user, and the password exactly where it was (4 times: the URL, the Password row, the two mason mcp lines);
    • the optgroup, the labels, 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):
    • choosing a hosted agent's servers moves nothing in the add form at 1280, 1024, 900 and 375 px, and the hint is seen only then;
    • a new test at 1280 and 390 px: the box with its fallback closed and open, then Add a user, the dialog with both URLs, the section closed, then both details open. No sideways scroll of the page or the dialog.
  • A keyboard probe (web-ui.md, issue 70): Enter on the fallback's summary, then a poll's rewrite. The details stays open, the focus stays on its summary, and Tab moves on to the next block.
  • 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:

  1. The box, endpoint on, 1280 px:
    • "Connect an AI agent", then "Add this address to your agent, then sign in in your browser." and the URL with Copy;
    • four bullets: claude.ai and Claude Desktop, ChatGPT, Claude Code (its line in a block with Copy), Cursor (the mcp.json in a block with Copy);
    • the sign-in line, the connects-from line, and a closed "+ For a client that can't sign in in a browser".
  2. The dialog, endpoint on, 1280 px:
    • New user added: URL (the Postgres URL) with Copy, MCP URL with Copy, a closed "+ Connect an AI agent";
    • User, Password with Copy and Shown once, "Waiting for its first query…", "The password is only shown once", I have copied it.
  3. The box, endpoint off, 1280 px:
    • "Claude Code: run this." and its line, "Claude Desktop, Cursor and others: add this to their MCP settings." and the JSON;
    • "Put a user's name and password in place of and . Needs Node 22.13 or later." and "claude.ai and ChatGPT on the web can't connect this way yet."
  4. The dropdown, 1280 px: drawn as a list, because a headless browser draws no native popup. It shows anywhere, only these addresses, then a bold "A hosted agent's servers" heading over claude.ai (chosen) and ChatGPT on the web, with the hint line under the form.

Left out:

  • The client-choice radios: replaced by the owner's decision.
  • localStorage: no choice to remember any more, so the page still reads no storage, as web-ui.md holds.
  • The URL row in the dialog has no "Shown once" badge. It had none before, and the Password row's badge is unchanged.

Generated by Claude Code

…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>
@tagspace
tagspace marked this pull request as ready for review November 18, 2026 16:13
Co-Authored-By: Claude <noreply@anthropic.com>

Copy link
Copy Markdown
Member Author

From Claude (Opus 5.5)

Fresh review of PR 1158 at head e7f93eda7543545d7b8bea77adbb3b38ee4fc90a. Verdict: nothing blocks.

I read issue 1155, the PR body, the whole diff and .claude/rules/web-ui.md. The issue has one comment, from a MEMBER (the owner's 2026-11-18 design), and I left none out. I ran the page in Chromium on Node 26.13.0 (checked against nodejs.org's SHASUMS256) over a synthetic /api/state built by runState, with made-up addresses and a made-up password.

CI: green at the head: checks, image, integration (oracle) and integration (rest) all passed (run 44345246877). The PR is mergeable and clean.

What I ran

  • tests/web-radio-groups.test.ts: 15/15 passed, none skipped (Chromium present).
  • tests/web-*.test.ts, tests/conventions.test.ts and tests/cli-help.test.ts: 454/454 passed.
  • scripts/fails-without.ts origin/main tests/web-page.test.ts tests/web-radio-groups.test.ts: PROVED, 19 tests.
  • My own browser probe at 1280 and 390 px:
    • No sideways scroll anywhere. The page measured 1280/1280 and 390/390 with the endpoint on and off, the fallback closed and open. The dialog measured 914/914 and 388/388, closed and with both details open.
    • Nothing moves. The add form's position and height, and the box under it, stay the same across anywhere, only these addresses, claude.ai and ChatGPT on the web. From…'s form keeps one size across all four choices.
    • The hint shows only when it should, under a hosted agent's servers and never otherwise.
    • Open details survive a poll. The box's fallback stays open across two polls, and so do the dialog's section and its nested fallback.
    • Keyboard works. Enter on the fallback's summary opens it. After two polls it is still open and the focus is still on its summary, and Tab moves to the next block. Space closes it, and it stays closed across a poll. Enter in the dialog closes its fallback and keeps the focus.
    • Presets send the right ranges. Add a user with "ChatGPT on the web" POSTed exactly OpenAI's 289 ranges. From… on a claude.ai user opened on preset:claude, and choosing claude.ai and saving POSTed exactly its 2 ranges.
    • The optgroup and rows are right. The dropdown has an optgroup "A hosted agent's servers" holding claude.ai and ChatGPT on the web, and the ids are unchanged. The rows read "from claude.ai's servers (2 ranges)" and "from ChatGPT's servers (289 ranges)".

Password: it appears nowhere new.

  • Endpoint on, the box: no password, and no <password> outside the closed fallback.
  • The dialog: the password appears in the same four places as at main, with the endpoint on or off: the URL, the Password row, and the two mason mcp lines. The MCP URL row and the per-client lines carry none. The two mason mcp lines sit inside the nested closed fallback.

Regressions: none found.

  • mcpSnippets output is byte-identical to main's, with and without a password and version.
  • The endpoint-off box's and dialog's code blocks are identical to main's.
  • The web-ui.md probes hold:
    • the new addressPresets[].name is in mason status --help's shape and is shown on the page as the row's text, with a runState fixture that carries it;
    • the issue 70 keyboard probe passes, as above.

.claude/rules/web-ui.md: the edit only updates a factual description to match the code (the box's new name, and mcpBody in place of mcpSnippets as the shared renderer). It adds or changes no rule. The docs/DESIGN.md edit records the renamed presets.

Client lines against the vendors' docs

  • claude.ai / Claude Desktop: true. https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp says "Customize > Connectors", then "+ Add", then "Add custom connector" (Pro and Max). It also says Claude "connects to your remote MCP server from Anthropic's cloud infrastructure, rather than from your local device… across every Claude client, including claude.ai, Claude Desktop". That supports the connects-from line.
  • Claude Code: true. https://code.claude.com/docs/en/mcp gives claude mcp add --transport http <name> <url>, then /mcp to "follow the steps in your browser to log in".
  • ChatGPT: consistent with OpenAI's developer-mode guide as search results quote it (https://developers.openai.com/api/docs/guides/developer-mode): Settings → Apps → Advanced settings → Developer mode, then "Create app" with the server's URL. I could not fetch it directly, because developers.openai.com and help.openai.com do not resolve from this session.
  • Cursor: consistent with https://cursor.com/docs/context/mcp as search results quote it: a remote server's url in mcp.json, with browser sign-in on first use when the server supports dynamic client registration. I could not fetch it directly either: cursor.com does not resolve here.
  • The ChatGPT and Cursor lines are each generic enough that none would mislead. They still deserve one look from a machine that can open those pages.

Easy and intuitive? Yes, for the most part.

  • The URL and Copy come first, each client gets one line, and the password route is out of the way.
  • The dialog puts both URLs up front, with everything else closed.

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)

  • The claude.ai line skips the "+ Add" click before "Add custom connector". On Team and Enterprise, an owner adds the connector under Organization settings first.
  • ChatGPT's developer mode needs a paid plan, and in a workspace an admin must turn it on first. The line doesn't say so.
  • The issuer ("You sign in at ") is no longer named anywhere on the page. That fits the owner's fewer-words bar.
  • The endpoint-off dialog now also says "Needs Node 22.13 or later" and "claude.ai and ChatGPT on the web can't connect this way yet", which main's dialog didn't. Both are true.
  • At 390 px, Claude Code's URL line scrolls inside its block, so the address is cut off on screen. Copy covers it.
  • In the add form, the preset hint takes the roles line's place while a preset is chosen, so the roles line is hidden then. This is a deliberate trade-off to keep the form's height.
  • The commits name no model, and the diff holds only synthetic addresses plus Anthropic's already-published ranges.

Generated by Claude Code

@tagspace
tagspace merged commit 234cd9b into main Nov 18, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Users page: pick an MCP client and see only its instructions; preset labels name the hosted agents' servers

2 participants