Repository navigation
feat(assistant): MCP servers in Settings, and MCP tools to list and add them - #506
Merged
Merged
Conversation
…p, with ready-made MCP servers
The host upgrade agent's services action now takes a profile (mcp,
browser or monitoring, a fixed list) and turn=on|off, so the web app,
the API (GET /admin/services, PUT /admin/services/{profile}) and the MCP
tools services and set_service can start or stop any of Lens's optional
containers; the old monitoring=on|off request still works.
The new browser profile runs Playwright MCP in a hardened container on
an internal network whose only way out is browser-proxy, netguard run
on its own (public addresses, ports 80 and 443, a byte budget per
connection). Add MCP server gains Ready-made: Browser (one click once
its container answers, browser_run_code_unsafe off) and GitHub (a field
for the token). ${NAME} values get their own fields, and a spec with
keep: true reuses one MCP session between calls.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
…-r960xc-c6-browser # Conflicts: # threat-model.json # threat-model.md # threat-model.yaml
…machine The preview waits 600 ms after the last keystroke, and findByText gives up after 1 s, so the test failed when the machine was busy. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
# Conflicts: # threat-model.yaml
…dd them Settings › AI assistant lists the MCP servers the assistant calls, each with how many of its tools are on and a link to its page, next to Add MCP server and the switches that run the MCP runner and the browser. Agents get the MCP tools mcp_servers (the servers, with header and env names but never their values, and the ready-made ones) and add_mcp_server (a preset with values for its token, or their own server), checked as the form checks a server. Adding one needs an admin's API key with the write scope; an app given access can't. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
…-r960xc-c6-settings Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
…-r960xc-c6-settings Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
…-r960xc-c6-settings Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXPWXcSCQb9hWPr7xkZu7B
adeelahmad
pushed a commit
that referenced
this pull request
Oct 18, 2026
…ay and clipper sign-in as built Since the last README refresh, #474, #484, #510, #511, #497, #495, #406, #516, #517, #491, #400 and #506 merged. The README's built list now says the assistant answers questions about Lens itself; a conversation exports as Markdown, PDF or JSON and its answers, questions and code copy; a Tools chip picks an answer's tools, limit and namespaces; sandbox runs open under the answer with downloads, and Settings starts the gateway; deep research plans, runs and returns a cited report; ready-made MCP servers, the MCP servers page and the optional containers start from the web app; and the web clipper signs in or takes an API token. Each has its checks in docs/requirements.md. In progress lists only open PRs; the Nebula mesh (#546, merged, partly built) moves to Planned with what's next; the Planned proof item keeps only the Raspberry Pi timing; the docs index links requirements and checks, and published feeds. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HDx7PPUauyjMn1LZs8JAsS
adeelahmad
added a commit
that referenced
this pull request
Oct 18, 2026
…ay and clipper sign-in as built (#536) Since the last README refresh, #474, #484, #510, #511, #497, #495, #406, #516, #517, #491, #400 and #506 merged. The README's built list now says the assistant answers questions about Lens itself; a conversation exports as Markdown, PDF or JSON and its answers, questions and code copy; a Tools chip picks an answer's tools, limit and namespaces; sandbox runs open under the answer with downloads, and Settings starts the gateway; deep research plans, runs and returns a cited report; ready-made MCP servers, the MCP servers page and the optional containers start from the web app; and the web clipper signs in or takes an API token. Each has its checks in docs/requirements.md. In progress lists only open PRs; the Nebula mesh (#546, merged, partly built) moves to Planned with what's next; the Planned proof item keeps only the Raspberry Pi timing; the docs index links requirements and checks, and published feeds. Claude-Session: https://claude.ai/code/session_01HDx7PPUauyjMn1LZs8JAsS Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
21 of 23 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: Settings › AI assistant had the assistant's own tool switches but said nothing about MCP servers, and an agent couldn't see or add MCP servers at all.
After: Settings › AI assistant has an MCP servers block under the tool switches. It lists each server the assistant calls with how many of its tools are on ("10 of 12 tools", or switched off) and a link to its page, with Add MCP server and the switches that run the MCP runner and the browser on this machine. Agents get two MCP tools:
mcp_serverslists the servers (header and env names, never their values) and the ready-made ones, andadd_mcp_serveradds a ready-made one (preset, withvaluesfor its token) or their own (server).How:
add_mcp_serverbuilds the same manifest the web form saves and goes throughextensions.create, so the checks are the form's: the server must answer, tokens are sealed, and names can't clash.mcp_servers.filledputs typed-in values in place of${NAME}s. Adding needs an admin's API key with the write scope; an app given access (OAuth) can't add one, as with the REST route. The browser preset waits until its container answers. The Settings block reuses the extensions list andServiceSwitch.This stacks on #491 (the optional containers and the browser). Until that merges, this diff includes it; the change here is the last commit, ae1f69f.
Motivation and Context
Part of the chat-app gaps: settings for chat tools and MCP servers.
Local CI (
ci/local-ci.shon ae1f69f): FastAPI pass (1410 passed), Next.js pass, pre-commit pass, PR title pass.Types of changes
!in the title)Checklist:
make hookschecks it on commit).test_agents_list_and_add_serversintest_mcp_servers.py, the writing-tools list intest_mcp.py, and the Settings block inmcp-server-ui.test.tsx.docs/accordingly:assistant.md(Adding an MCP server, and a line telling the browser apart from the assistant in your browser) andmcp.md.## UnreleasedinCHANGELOG.md.Done questions (AGENTS.md)
mcp_serversandadd_mcp_server; the REST routes were already there.ci/validate_threat_model.pypasses).mcp.list) as before.make openapigives no diff).Generated by Claude Code