8000 feat(ui): copy the MCP address from the account menu after setup by adeelahmad · Pull Request #340 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(ui): copy the MCP address from the account menu after setup - #340

Merged
adeelahmad merged 26 commits into
mainfrom
claude/project-thread-lrsqgt
Oct 11, 2026
Merged

adeelahmad merged 26 commits into
mainfrom
claude/project-thread-lrsqgt

Conversation

@adeelahmad
@adeelahmad adeelahmad commented Oct 10, 2026 •
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Builds on #325 (the clicks survey's phone run and the agent-connect journey) and #350, both merged.

Description

Before: after setup, Lens showed its MCP address nowhere (only the setup wizard's Apps step had it), so connecting Claude, ChatGPT or Cursor meant typing http://…/mcp by hand: 3 clicks and 25 keys.

After: the account menu (your picture, top right) has Copy MCP address. One click copies it and a toast shows the address and what to do with it. API tokens shows the address with Copy above Apps with access. When apps can't sign in (Settings → API keys), both say to give the assistant an API token instead. Connecting an assistant now takes 5 clicks and 1 paste on a computer and on a phone.

Connect an AI assistant over MCP Before After
Computer (ci/clicks/run.sh) 3 clicks · 25 keys = 28 5 clicks · 1 key = 6
Phone (run.sh --device phone) 3 taps · 25 keys · 0 swipes = 28 5 taps · 1 key · 0 swipes = 6

Measured on main with this branch, both runs with --fail-on-regression; the other 30 journeys match main's baselines. The 5 clicks are the account menu, Copy, two in the assistant (add a connector, add it) and Allow on Lens's consent page. The paste is the 1 key.

Motivation and Context

The clicks survey's worst Agents item: "Connect an AI assistant over MCP: 3 clicks + 25 keys, target about 4. After setup Lens shows its MCP address nowhere, so it is typed." Lens is built for agents, so connecting one should be a copy and a paste.

How

  • components/account/connect-assistant.tsx: mcpAddress() (moved out of the setup wizard, which now uses it), useAppSignIn() (OAuth discovery answers only while apps may sign in), and ConnectAssistant (the address in the existing CodeBlock with Copy).
  • Account menu: a Copy MCP address item. It writes to the clipboard inside the click, because some browsers only allow that during the click. If the browser refuses, the toast shows the address instead.
  • API tokens: ConnectAssistant at the top of Apps with access.
  • ci/clicks/journeys.mjs: agent-connect copies from the menu, reads the clipboard back to check it holds the address, then pastes. In baseline.json and baseline-phone.json only the agent-connect entry changes, taken from that run.
  • docs/mcp.md: where to copy the address.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit). ESLint, Prettier and tsc pass on the changed files.
  • I added or updated tests. __tests__/connect-assistant.test.tsx covers the address and Copy on API tokens, the API-token hint while sign-in is off, the menu copying in one click, and the fallback when the browser won't copy. The agent-connect journey checks the clipboard.
  • My change requires documentation updates, and I have updated docs/ accordingly (docs/mcp.md).
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md. n/a: the title says it.

Done questions (AGENTS.md)

  • Goal: merges on green CI.
  • Agents: this makes connecting an agent over MCP a copy and a paste. An agent already holds the address it connects with, and docs/mcp.md gives it.
  • Zero setup: nothing new to install or set.
  • Fewest clicks and keystrokes: 28 down to 6 on a computer and a phone. Only the copy click is in Lens's hands.
  • Configurable: n/a, no new setting. App sign-in stays in Settings → API keys.
  • Light: one small fetch of the OAuth discovery document, made only when the menu opens or API tokens shows.
  • Private and secure: n/a, no new surface. The address and the discovery document were already public, and the clipboard is written only on the person's click.
  • Cost: n/a, no model calls.
  • User decides: copying does nothing on its own, and each assistant still waits for the person's Allow. Defaults are unchanged.
  • Upgrades: n/a, no stored data.
  • Honest: the hint says when apps can't sign in, and the docs claim only what is merged.
  • Tests, docs and generated files updated. No API change, so no generated files.
  • Open standards (MCP, OAuth discovery, RFC 8414); no new dependencies.
  • Result reported with evidence. Refine later: one-click install links for clients that support them (Cursor, VS Code deeplinks) would also remove the paste.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JYGqrDpgP3Gcw1Jwf5mwT8

claude added 10 commits October 10, 2026 20:29
A Playwright survey (ci/clicks) drives a fresh Lens from the web installer
through setup and 19 features, counting clicks, keys and passkey prompts per
feature, module and page. The Clicks workflow fails when a journey takes more
than baseline.json.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018XZkebEbpvyi9y3qmDVD8V
…vering button

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018XZkebEbpvyi9y3qmDVD8V
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018XZkebEbpvyi9y3qmDVD8V
The survey now runs twice, on a computer and on a phone (Pixel 7, touch),
where clicks are taps, swipes to reach an off-screen control count, and
journeys use buttons instead of keyboard shortcuts. Twelve journeys cover
the modules the first survey left out: connecting an AI assistant over
MCP, uploading a file, watching a folder, entities, the graph, podcasts,
reports, workflows, templates, namespaces, speakers and switching to a
cloud model. baseline-phone.json records the phone run; journeys that
can't be done on a phone yet are kept as failed and don't turn CI red.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r
…-kcokci

# Conflicts:
#	.github/workflows/clicks.yml
#	Makefile
#	ci/clicks/README.md
#	ci/clicks/baseline.json
#	ci/clicks/journeys.mjs
#	ci/clicks/meter.mjs
#	ci/clicks/report.mjs
#	ci/clicks/survey.mjs
Measure where a control settles before counting a swipe, scope the webhook
token check to its dialog, and wait for the entity list to filter. The phone
baseline is the run with these fixes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r
…-kcokci

# Conflicts:
#	ci/clicks/baseline.json
#	ci/clicks/journeys.mjs
On a phone Chat opens on the conversation list, so the journey taps New
conversation when the question box isn't there. The computer baseline is a
run on main with the setup, Chat, Search and Notes cuts.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r
After setup Lens showed its MCP address nowhere but the setup wizard, so
connecting an assistant meant typing it. The account menu now has Copy MCP
address (one click, with a toast saying what to do with it), and API tokens
shows the address with Copy above Apps with access, saying to use an API
token while apps can't sign in.

Connecting an assistant over MCP drops from 3 clicks + 25 keys to 5 clicks
+ 1 paste on a computer and on a phone; the agent-connect journey now
copies from the menu and checks the clipboard, and both baselines carry it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JYGqrDpgP3Gcw1Jwf5mwT8
@adeelahmad adeelahmad self-assigned this Oct 10, 2026
claude added 13 commits October 10, 2026 22:54
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r
In CI the entity search opened before the imported transcripts were
analysed, so the entity wasn't there yet. The journey now waits (not
counted) until the API has it. The API's log is saved with the results, so
a failure in CI can be read from the artifact.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r
The API wants the session's bearer token, which the browser's requests
don't carry, so the wait reloads the Entities page until the entity shows
(not counted) and then starts the journey from Home.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r
…-kcokci

# Conflicts:
#	ci/clicks/baseline.json
#	ci/clicks/meter.mjs
Computer 93 clicks, 313 keys; phone 115 taps, 315 keys, 10 swipes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r
…to claude/project-thread-lrsqgt

# Conflicts:
#	ci/clicks/baseline-phone.json
#	ci/clicks/baseline.json
Both imports match "Welcome back", and the Library's order between them
varies. The dialog shows the recording's title, so on a phone the Create
button was below the screen for one and not the other (a swipe counted in
some runs only).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r
…ranch

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JYGqrDpgP3Gcw1Jwf5mwT8
Computer 90 clicks, 313 keys; phone 119 taps, 322 keys, 11 swipes, and
the graph can be found on a phone now.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0145yfQfD4eNkWHgPkk3Q82r
…to claude/project-thread-lrsqgt

# Conflicts:
#	ci/clicks/baseline-phone.json
#	ci/clicks/baseline.json
Base automatically changed from claude/project-thread-kcokci to main October 11, 2026 01:44
…-lrsqgt

# Conflicts:
#	ci/clicks/baseline-phone.json
#	ci/clicks/baseline.json
#	ci/clicks/journeys.mjs
…agent-connect baselines on main

The cloud-model journey from #350 (the Settings presets from #334 broke the old
one on main), with #350's baselines and the agent-connect entry from a run of
this branch on main.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JYGqrDpgP3Gcw1Jwf5mwT8
…-lrsqgt

# Conflicts:
#	ci/clicks/baseline-phone.json
#	ci/clicks/baseline.json
@adeelahmad
adeelahmad merged commit 238e775 into main Oct 11, 2026
11 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-lrsqgt branch October 11, 2026 02:24
adeelahmad added a commit that referenced this pull request Oct 11, 2026
…monitoring switch as built (#351)

"Ask" names the built-in Telegram bot (#293) and Slack app (#287); "Connect your agents" adds mounting the graph's
files read-only over S3, WebDAV, NFS or SMB (#324, #295, #305) and copying the MCP address from the account menu
(#340); "Watch it run" says one switch in the web app starts Prometheus and Grafana (#337); "Light by default" adds
the cloud model presets (#334). The docs index gains the NFS and SMB pages, and "In progress" keeps only open PRs.


Claude-Session: https://claude.ai/code/session_01HDx7PPUauyjMn1LZs8JAsS

Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
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.

2 participants

0