Add opt-in trust for local ICM MCP tools - #419
Closed
Lauritz-Timm wants to merge 1 commit into
Closed
Conversation
This was referenced Jul 30, 2026
Lauritz-Timm
force-pushed
the
feat/trusted-local-mcp
branch
from
August 4, 2026 19:01
2f3bc59 to
54e717a
Compare
9 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.
Summary
Add explicit opt-in trust configuration for ICM's core MCP recall and store tools.
Motivation
Local ICM calls have been denied in Codex and Claude Code, and the same client-side approval boundary exists in Cursor, OpenCode, and Zed. MCP annotations are advisory; a local stdio server cannot grant itself trust.
Changes
icm init --mode mcp --trust-local-mcpicm_memory_recallandicm_memory_storemcpAllowlistentriesCompatibility and safety
The default init path is unchanged. There is no server-wide wildcard, unrestricted mode, or MCP protocol change. Store may trigger configured consolidation, and recall updates access and decay metadata, so the flag is explicit and neither tool is described as read-only. Managed policies and separate safety checks may still reject calls.
Provider specifications are source-controlled rather than arbitrary user configuration because they define which client settings ICM is allowed to trust and later remove. Schema-1 manifests remain readable; schema 2 adds precise ownership so cleanup does not remove pre-existing user rules.
Validation
cargo test -p icm-cli --locked --offline \ --no-default-features --features backend-sqlite,embeddings-dynamic cargo clippy -p icm-cli --bin icm --tests --locked --offline \ --no-default-features --features backend-sqlite,embeddings-dynamic -- -D warnings cargo fmt --all -- --checkThe final suite passed 374 unit tests and 17 integration tests, with 2 tests ignored. Focused provider tests exercise every registry entry through discovery, installation, exact-change recording, schema-2 save and reload, interrupted multi-client installation, ownership-aware uninstall, and reconciliation without duplicating provider-specific expectations.
Manual verification:
Inspect the detected clients' configuration files and verify that only recall and store were added.