Repository navigation
Backlog
Backlog
Copy link
Labels
Milestone
Description
Goal
When a user allows "Localhost" for MCP clients, the settings make clear that MCP clients can then propose commands that run on this computer itself. An allowed Localhost behaves like every other allowed server: clients see it in list_servers.
Context
crates/app-shell/src/commands/servers.rs:55-76(list_servers_impl) puts the Localhost pseudo-server (Spec 0032, fixed idLOCAL_SERVER_ID = Uuid::nil(),crates/app-logic/src/dto/server.rs:22) first in the server list (not on Android).- The MCP settings (
apps/smart-ssh-community/frontend/src/components/McpServerSettings.tsx:203-228) render this list as plain checkboxes; Localhost looks like any remote server, without any hint. set_mcp_server_allowed_servers(crates/app-shell/src/mcp_settings.rs:322-332) stores the ids unfiltered;propose_action(crates/app-shell/src/mcp_backend.rs:165-205) only checksis_allowed(crates/app-logic/src/mcp_lookup.rs:54-56) and then connects, also to Localhost.McpLookup::list_servers(crates/app-logic/src/mcp_lookup.rs:61-77) keeps only ids found in the profile store. Localhost has no database row (Spec 0032 §3), so an allowed Localhost is never listed to the client, yet a client can still address it with the nil UUID.- Every MCP action still needs the user's confirmation: MCP origin turns AutoExec into Confirm (
crates/app-logic/src/orchestration/escalation.rs:203-209); filter, risk rating and Deny apply unchanged (Spec 0032).
Requirements
- Decided: Localhost stays selectable in the MCP allowlist (no extra opt-in dialog).
- In the MCP allowlist the Localhost entry shows a short hint below its name, English: "Runs commands on this computer with your user account. Each command still needs your confirmation." Remote servers show no hint. The frontend recognises Localhost by its id from the server list (the nil UUID), not by its name.
McpLookup::list_serversincludes Localhost (id and its display name as in the app's server list) when it is on the allowlist; when it is not allowed it is not listed. Other servers unchanged.get_server_notesfor an allowed Localhost returns the Localhost notes (kept in the app settings, Spec 0032, ADR 0026), redacted and fenced exactly like the notes of other servers (server_notes,mcp_lookup.rs:87-103). Today it returnsUnknownServerbecause the profile store has no row.- Spec 0032 states that Localhost can be allowed for MCP, is listed when allowed and keeps the confirmation; Spec 0028 refers to it in the allowlist section.
- The hint text is translated into every locale under
apps/smart-ssh-community/frontend/src/locales/.
Acceptance Criteria
- Component test: the allowlist shows the hint under the Localhost entry and under no other entry
-
list_serverswith Localhost allowed contains Localhost; with Localhost not allowed it does not (unit tests inmcp_lookup.rs) -
get_server_notesfor an allowed Localhost returns its notes redacted and fenced (a secret in the notes appears as the redaction placeholder); for a not-allowed Localhost it returnsUnknownServer - A
propose_commandon allowed Localhost still ends in a confirmation request and runs nothing without it (existing tests stay green) - On Android, where Localhost does not exist, nothing changes
- All locales contain the new string; the i18n checks pass
- Relevant automated tests pass
Technical Notes
- Security-relevant area (MCP access to the local machine). No change to the filter engine, the confirmation flow, the token check or the allowlist check itself.
- User-visible: add a changelog fragment.
Files: apps/smart-ssh-community/frontend/src/components/McpServerSettings.tsx, apps/smart-ssh-community/frontend/src/components/McpServerSettings.test.tsx, apps/smart-ssh-community/frontend/src/locales/, crates/app-logic/src/mcp_lookup.rs, docs/specs/0032-local-pseudo-server.md, docs/specs/0028-mcp-server-integration.md, changelog.d/
Spec impact: update 0032
Open questions
- How
list_serverslearns the Localhost display name: (a) the same constant/helperlist_servers_impluses, moved toapp-logicif needed, (b) a fixed string. Recommendation: (a), one source for the name.
Related Work
- Pending requests: native notification and Dock/taskbar attention while the app is in the background #1709 (also edits Spec 0028 and the locales)
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
P2 - Normal
Activity
*inside a glob covers one argument) #1726