Skip to content

feat(mcp): add whitelist auto-trust for protocol install servers#13586

Merged
kangfenmao merged 2 commits intomainfrom
feat/mcp-whitelist-auto-trust
Mar 18, 2026
Merged

feat(mcp): add whitelist auto-trust for protocol install servers#13586
kangfenmao merged 2 commits intomainfrom
feat/mcp-whitelist-auto-trust

Conversation

@kangfenmao
Copy link
Copy Markdown
Collaborator

What this PR does

Before this PR:
MCP servers installed via protocol (e.g., cherrystudio://) always require user confirmation to trust, even for well-known trusted sources like WPS Notes.

After this PR:
Adds a whitelist mechanism to auto-trust specific MCP server URLs without requiring user confirmation. Currently whitelisted:

  • http://127.0.0.1:18930/mcp (WPS Notes)

Why we need it and why it was done in this way

The following tradeoffs were made:

  • Hardcoded whitelist vs. user-configurable: Chose hardcoded for security, as allowing user-defined whitelists could be exploited.

The following alternatives were considered:

  • Making whitelist configurable via settings: Rejected due to security concerns.

Breaking changes

None

Special notes for your reviewer

The whitelist only applies to SSE-type servers with matching baseUrl. The implementation is minimal and focused.

Checklist

  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required
  • Documentation: A user-guide update was considered and is present (link) or not required. Check this only when the PR introduces or changes a user-facing feature or behavior.
  • Self-review: I have reviewed my own code before requesting review from others

Release note

NONE

Add a whitelist mechanism to auto-trust specific MCP servers installed
via protocol without requiring user confirmation. Currently whitelisted:
- http://127.0.0.1:18930/mcp (WPS Notes)

Signed-off-by: kangfenmao <[email protected]>
@kangfenmao
Copy link
Copy Markdown
Collaborator Author

@kangfenmao kangfenmao added this to the v1.8.1 milestone Mar 18, 2026
@kangfenmao
Copy link
Copy Markdown
Collaborator Author

Tested and passed

@kangfenmao kangfenmao merged commit 9a58028 into main Mar 18, 2026
4 checks passed
@kangfenmao kangfenmao deleted the feat/mcp-whitelist-auto-trust branch March 18, 2026 11:23
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.

1 participant