|
| 1 | +# SEP-1024: MCP Client Security Requirements for Local Server Installation |
| 2 | + |
| 3 | +- **Status**: Final |
| 4 | +- **Type**: Standards Track |
| 5 | +- **Created**: 2025-07-22 |
| 6 | +- **Author(s)**: Den Delimarsky |
| 7 | +- **Issue**: #1024 |
| 8 | + |
| 9 | +## Abstract |
| 10 | + |
| 11 | +This SEP addresses critical security vulnerabilities in MCP client implementations that support one-click installation of local MCP servers. The current MCP specification lacks explicit security requirements for client-side installation flows, allowing malicious actors to execute arbitrary commands on user systems through crafted MCP server configurations distributed via links or social engineering. |
| 12 | + |
| 13 | +This proposal establishes a best practice for MCP clients, requiring explicit user consent before executing any local server installation commands and complete command transparency. |
| 14 | + |
| 15 | +## Motivation |
| 16 | + |
| 17 | +The existing MCP specification does not address client-side security concerns related to streamlined ("one-click") local server configuration. Current MCP clients that implement these configuration experiences create significant attack vectors: |
| 18 | + |
| 19 | +1. **Silent Command Execution**: MCP clients can automatically execute embedded commands without user review or consent when installing local servers via one-click flows. |
| 20 | + |
| 21 | +2. **Lack of Visibility**: Users have no insight into what commands are being executed on their systems, creating opportunities for data exfiltration, system compromise, and privilege escalation. |
| 22 | + |
| 23 | +3. **Social Engineering Vulnerabilities**: Users become comfortable executing commands labeled as "MCP servers" without proper scrutiny, making them susceptible to malicious configurations. |
| 24 | + |
| 25 | +4. **Arbitrary Code Execution**: Attackers can embed harmful commands in MCP server configurations and distribute them through legitimate channels (repositories, documentation, social media). |
| 26 | + |
| 27 | +Visual Studio Code [addressed this](https://den.dev/blog/vs-code-mcp-install-consent/) by implementing consent dialogs. Similarly, Cursor also supports a consent dialog for one-click local MCP server installation. |
| 28 | + |
| 29 | +Without explicit security requirements in the specification, MCP client implementers may unknowingly create vulnerable installation flows, putting end users at risk of system compromise. |
| 30 | + |
| 31 | +## Specification |
| 32 | + |
| 33 | +### Client Security Requirements |
| 34 | + |
| 35 | +MCP clients that support one-click local MCP server configuration **MUST** implement the following security controls: |
| 36 | + |
| 37 | +#### Pre-Configuration Consent |
| 38 | + |
| 39 | +Before executing any command to install or configure a local MCP server, the MCP client **MUST**: |
| 40 | + |
| 41 | +1. Display a clear consent dialog that shows: |
| 42 | + - The exact command that will be executed, without truncation |
| 43 | + - All arguments and parameters |
| 44 | + - A clear warning that this operation may be potentially dangerous |
| 45 | +2. Require explicit user approval through an affirmative action (button click, checkbox, etc.) |
| 46 | + |
| 47 | +3. Provide an option for users to cancel the installation |
| 48 | + |
| 49 | +4. Not proceed with installation if consent is denied or not provided |
| 50 | + |
| 51 | +## Rationale |
| 52 | + |
| 53 | +### Design Decisions |
| 54 | + |
| 55 | +**Mandatory Consent Dialogs**: The requirement for explicit consent dialogs balances security with usability. While this adds friction to the MCP server configuration process, it prevents potential breaches from silent command execution. |
| 56 | + |
| 57 | +## Backward Compatibility |
| 58 | + |
| 59 | +This SEP introduces new **requirements** for MCP client implementations but does not change the core MCP protocol or wire format. |
| 60 | + |
| 61 | +**Impact Assessment:** |
| 62 | + |
| 63 | +- **Low Impact**: Existing MCP servers and the core protocol remain unchanged |
| 64 | +- **Client Implementation Required**: MCP clients must update their local server installation flows to comply with new security requirements |
| 65 | +- **User Experience Changes**: Users will see consent dialogs where none existed before |
| 66 | + |
| 67 | +**Migration Path:** |
| 68 | + |
| 69 | +1. MCP clients can implement these changes in new versions without breaking existing functionality |
| 70 | +2. Existing installed MCP servers continue to work normally |
| 71 | +3. Only new installation flows require the consent mechanisms |
| 72 | + |
| 73 | +No protocol-level backward compatibility issues exist, as this SEP addresses client behavior rather than the MCP wire protocol. |
| 74 | + |
| 75 | +## Reference Implementation |
| 76 | + |
| 77 | +N/A |
| 78 | + |
| 79 | +## Security Implications |
| 80 | + |
| 81 | +### Security Benefits |
| 82 | + |
| 83 | +This SEP directly addresses: |
| 84 | + |
| 85 | +- **Arbitrary Code Execution**: Prevents silent execution of malicious commands |
| 86 | +- **Social Engineering**: Forces users to consciously review commands before execution |
| 87 | +- **Supply Chain Attacks**: Creates visibility into MCP server installation commands |
| 88 | +- **Privilege Escalation**: Users can identify and reject commands requesting elevated privileges |
| 89 | + |
| 90 | +### Residual Risks |
| 91 | + |
| 92 | +Even with these controls, risks remain: |
| 93 | + |
| 94 | +- **User Override**: Users may approve malicious commands despite warnings |
| 95 | +- **Sophisticated Obfuscation**: Advanced attackers may craft commands that appear legitimate |
| 96 | +- **Implementation Gaps**: Clients may implement controls incorrectly |
| 97 | + |
| 98 | +### Risk Mitigation |
| 99 | + |
| 100 | +These residual risks are addressed through: |
| 101 | + |
| 102 | +- Clear warning language in consent dialogs |
| 103 | +- Recommendation for additional security layers (sandboxing, signatures) |
| 104 | +- Ongoing security research and community awareness |
0 commit comments