MCP Security Checklist 标志

MCP Security Checklist

组织
slowmist

A comprehensive security checklist for MCP-based AI tools. Built by SlowMist to safeguard LLM plugin ecosystems.

发布者slowmist
代码仓库MCP-Security-Checklist
复刻数
75
星标数
834
可用工具
0
传输类型stdio
许可协议MIT
链接
  • 将工具接入 AI 工作流

    MCP Security Checklist 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 834 个星标和 75 个复刻。

MCP Security Checklist: A Security Guide for the AI Tool Ecosystem

Twitter URL

English Version, 中文版本

Author Information

This security checklist was compiled and is maintained by @SlowMist_Team.

SlowMist, a global leader in blockchain ecosystem threat intelligence, aims to enhance security protection and safeguard user privacy during the integration of blockchain and AI ecosystems.

We sincerely thank FENZ.AI for their valuable contributions and support.

FENZ.AI redefines AI security with future-proof auditing. FENZ is the essential infrastructure for the AI era: "Superintelligence starts with super safety."

📚 Table of Contents

Overview

With the rapid development of large language models (LLMs), a variety of new AI tools have continued to emerge. Among them, tools based on the Model Context Protocol (MCP) standard have become a key bridge connecting LLMs with external tools and data sources. Since its release in late 2024, MCP has been widely adopted in mainstream AI applications such as Claude Desktop and Cursor. Various MCP Server marketplaces have also emerged, demonstrating strong ecosystem scalability.

However, the rapid adoption of MCP has also introduced new security challenges. In the current MCP architecture, the system consists of three main components: the Host (the local environment where the AI application runs), the Client (responsible for communicating with the Server and invoking tools), and the Server (the backend service corresponding to an MCP plugin). Users interact with the AI through the Host, while the Client parses the user's request and forwards it to the MCP Server for tool invocation or resource access. In scenarios involving multiple instances and cross-component collaboration, this architecture exposes a range of security risks—especially in sensitive contexts such as cryptocurrency transactions or custom plugin integration with LLMs—where the potential for exploitation is even higher and requires appropriate security controls.

Against this backdrop, establishing and following a comprehensive MCP Security Checklist becomes critically important. This checklist covers key areas ranging from user interface interaction, client components, and service-side plugins, to multi-MCP collaboration mechanisms and domain-specific scenarios such as cryptocurrency integrations. It is designed to help developers systematically identify and mitigate potential risks. By implementing these security measures, the overall stability and controllability of MCP systems can be significantly enhanced, ensuring that security evolves in parallel with the rapid advancement of AI applications.

How to Use

This checklist is based on possible risk points encountered during our security audits of MCP projects, aiming to help developers ensure the security of MCP implementations. We use three priority levels to denote the importance of each item:

  • Low Indicates recommended items that can be omitted in specific contexts.
  • Medium Indicates strongly recommended items which could be omitted in special cases, but doing so might negatively impact security.
  • High Indicates items that must not be omitted under any circumstances; removing them may lead to system failures or security vulnerabilities.

MCP Server (MCP Plugin) Security

Note: The MCP Server provides external tools, resources, and functionalities that AI can invoke. This is essentially the MCP plugin form. In general, it contains Resources, Tools, and Prompts.

API Security

  • Input Validation: High Enforce strict validation on all API inputs to prevent injection attacks and invalid parameters.
  • API Rate Limiting: Medium Implement call rate limits to prevent abuse or DoS attacks.
  • Output Encoding: Medium Properly encode API outputs.

Server Authentication & Authorization

  • Access Control: High Implement role-based access control, limit resource access, and enforce the principle of least privilege.
  • Credential Management: High Securely manage and store service credentials; avoid hard-coded secrets and use key management services.
  • External Service Authentication: High Use secure methods when authenticating with third-party services.
  • Least Privilege: Medium Run service processes with the minimum required permissions to reduce the potential attack surface and elevation risks.
  • API Key Rotation: Medium Automatically rotate API keys and service credentials periodically, limiting the valid timeframe of keys.
  • Service Identity Authentication: Medium Provide a mechanism for Tools to verify the Server’s identity, helping clients to authenticate and use the service securely.

Background Persistence Control

  • Lifecycle Management: High Implement strict lifecycle management for MCP plugins and coordinate with the client.
  • Shutdown Cleanup: High Forcefully clean up all MCP background processes when the client is shut down.
  • Health Check Mechanism: Medium Regularly check the status of MCP plugins to detect abnormal persistence.
  • Background Activity Monitoring: Medium Monitor and log all MCP background activities.
  • Activity Restrictions: Medium Limit the operations and their duration that MCP plugins can perform in the background.

Deployment & Runtime Security

  • Isolation Environment: High Server runs in an isolated environment (container, VM, or sandbox) to prevent escape and mitigate lateral movement attacks.
  • Container Security: High Adopt hardened container security configurations and run containers as non-root users. Employ immutable infrastructure and runtime protection.
  • Secure Boot: Medium Validate service boot processes, implementing secure boot chains and integrity checks.
  • Environment Variable Security: Medium Protect sensitive environment variables and ensure they are not exposed in logs.
  • Resource Limits: Medium Enforce resource usage limits to prevent infinite loops or excessive calls when a large model malfunctions.

Code & Data Integrity

  • Integrity Verification Mechanisms: High Use digital signatures, checksums, or similar to ensure code has not been tampered with.
  • Remote Validation: Medium Support mechanisms for remote verification of code integrity.
  • Code Obfuscation & Hardening: Low Apply code obfuscation and hardening techniques to increase the difficulty of reverse engineering.

Supply Chain Security

  • Dependency Management: High Securely manage third-party dependencies.
  • Package Integrity: High Verify the integrity and authenticity of packages.
  • Source Verification: Medium Validate the source of all code and dependencies.
  • Secure Build: Medium Ensure the build process is secure.

Monitoring & Logging

  • Anomaly Detection: High Detect and report anomalous activity patterns.
  • Detailed Logging: High Log all service activities and security events.
  • Security Event Alerts: High Configure real-time alerts for critical security events.
  • Centralized Log Management: Medium Collect and analyze logs in a centralized manner.
  • Log Integrity: Medium Ensure log integrity to prevent tampering.
  • Audit Capability: Medium Provide detailed auditing and incident investigation capabilities.

Invocation Environment Isolation

  • Isolation Between MCP Instances: High Ensure operational isolation among multiple MCP Servers.
  • Resource Access Control: High Assign each MCP Server a clearly defined resource access boundary.
  • Tool Permission Separation: Medium Use distinct permission sets for tools in different domains.

Platform Compatibility & Security

  • System Resource Isolation: High Implement suitable resource isolation strategies according to different operating system characteristics.
  • Cross-platform Compatibility Testing: Medium Test consistent security behavior of MCP Server across different OS and clients.
  • Platform-specific Risk Assessment: Medium Evaluate unique security risks specific to each platform and apply mitigating measures.
  • Client-specific Handling: Medium Ensure security controls can adapt to differences among various client implementations.

Data Security & Privacy

  • Data Minimization: High Collect and process only the necessary data.
  • Data Encryption: High Encrypt sensitive data in storage and transit.
  • Data Isolation: High Ensure effective isolation of different users’ data.
  • Data Access Control: High Enforce strict access controls on data.
  • Sensitive Data Identification: High Automatically identify and handle sensitive data in a specialized manner.

Resources Security

  • Resource Access Control: High Implement fine-grained access control for resources.
  • Resource Limits: Medium Limit the size and quantity of a single resource.
  • Resource Template Security: Medium Validate and sanitize template parameters of resources.
  • Sensitive Resource Labeling: Medium Label and handle sensitive resources distinctly.

Tools Security

  • Secure Coding Practices: High Adhere to security coding standards and best practices.
  • Tool Isolation: High Execute tools in a controlled environment to prevent system-level impact.
  • Input Validation: High Strictly validate all inputs from clients.
  • Tool Permission Control: High Each tool should have only the minimum permissions needed to complete its task.
  • Data Validation: High Validate the data processed by tools to prevent injection or tampering.
  • Tool Behavior Constraints: High Restrict the range and types of actions a tool can perform.
  • Third-party Interface Response Security: High Verify that the returned information from interfaces is as expected; do not directly insert the returned data into context.
  • Error Handling: Medium Handle errors securely without exposing sensitive information.
  • Namespace Isolation: Medium Enforce strict namespace isolation for different tools.

⬆ Back to Top

MCP Client/MCP HOST Security

Note: The Host is the environment running the AI application and the MCP client, acting as the terminal where end users interact with AI (e.g., Claude Desktop, Cursor). The Client is a component within the AI application that communicates with the MCP Server, handling context, tool invocation, and result presentation. Typically, the Client is integrated into the Host by default.

User Interaction Security

  • User Interface Security: High The UI should clearly display the scope of AI operations and potential impacts, offering an intuitive security indicator.
  • Confirmation of Sensitive Operations: High High-risk operations (e.g., file deletion, fund transfers) must explicitly require user confirmation.
  • Transparency in Permission Requests: High Permission requests should explicitly state their purpose and scope so users can make informed decisions and avoid over-authorization.
  • Operation Visualization: Medium Tool invocation and data access should be visible and auditable by users, accompanied by detailed operation logs.
  • Information Transparency: Medium
    Tools should allow users to choose whether to display hidden tags by default, such as <SECRET>. This ensures that the context seen by the user is consistent with what is actually generated and invoked, preventing malicious logic from being embedded within hidden tags.
  • Status Feedback: Medium Users should be able to clearly understand the current MCP operations in progress.

AI Control & Monitoring

  • Operation Logging: High Record all critical AI operations and their results.
  • Anomaly Detection: Medium Detect abnormal patterns of tool invocation or request sequences.
  • Tool Invocation Limitation: Medium Impose frequency and quantity limits on tool calls.

Local Storage Security

  • Credential Secure Storage: High Use a system keychain or dedicated encrypted storage for sensitive credentials to prevent unauthorized access.
  • Sensitive Data Isolation: Medium Implement mechanisms to isolate sensitive user data from ordinary data in storage and processing.

Application Security

  • Application Integrity: High Validate the integrity of the application and MCP plugins to prevent tampering.
  • Update Verification: Medium Verify the digital signatures of Host application updates.
  • Application Sandbox: Low Whenever possible, run the application in a sandbox environment to limit system access.

Client Authentication & Authorization

  • Mandatory Authentication: High Enforce authentication before communicating with any critical MCP Server, preventing anonymous access.
  • OAuth Implementation: Medium Correctly implement OAuth 2.1 or higher, following best practices and security standards.
  • State Parameter: Medium For certain web clients, use a state parameter to mitigate CSRF attacks, employing a unique random value for each request.

MCP Tools & Servers Management

  • MCP Tool Verification: High Validate the authenticity and integrity of registered tools.
  • Secure Updates: High The MCP client should regularly check for and apply security updates, and verify whether the updated tools contain any malicious descriptions.
  • Function Name Checking: High Check for name conflicts or malicious overwriting before registering any tool.
  • Malicious MCP Detection: High Monitor and identify potentially malicious MCP behavior.
  • MCP Tool Naming Control: Medium Use namespaces or unique identifiers to avoid naming collisions.
  • Server Directory: Medium Maintain an authorized directory of trustworthy MCP Servers and tools.
  • Conflict Resolution: Medium Establish clear rules to resolve tool name conflicts.
  • Domain Isolation: Medium Isolate tools in different domains to prevent cross-impact.
  • Priority Mechanism: Medium Set explicit function priority rules to avoid malicious overwriting.
  • Version Control: Medium Version functions and tools to detect changes.
  • Tool Registration & Deregistration Mechanism: Medium Define clear processes for tool registration and deregistration to prevent leftover tools posing security risks.
  • Conflict Detection Mechanism: Medium Detect and resolve function and resource conflicts in multi-MCP environments.
  • Tool Classification: Low Classify tools according to sensitivity and risk level.

Prompt Security

  • Prompt Injection Defense: High Implement layered defense measures to prevent prompt injection attacks, including manual verification for critical executions.
  • Malicious Instruction Detection: High Establish mechanisms to detect and block potential malicious user instructions, preventing the system from being manipulated. This includes detecting and blocking preloaded malicious prompts during local initialization, as well as identifying harmful instructions embedded in tools provided by third-party MCP servers.
  • System Prompt Protection: High Clearly separate system prompts from user inputs to prevent tampering.
  • Sensitive Data Filtering: High Filter out sensitive personal data from prompts and context.
  • Context Isolation: Medium Ensure that contexts from different sources remain isolated to prevent contamination or information leakage.
  • Prompt Templates: Medium Use secure prompt templates to reduce the risk of injection.
  • Tool Description Verification: Medium Check tool descriptions for potential malicious instructions.
  • Prompt Consistency Verification: Medium Ensure that identical prompts produce predictable and consistent results across different environments.
  • Historical Context Management: Medium Clearly define the mechanism for cleaning up historical context to prevent data buildup and potential information leakage.

Logging & Auditing

  • Client Logging: High Record all interactions with the MCP Server, tool calls, and authorization activities.
  • Security Event Recording: High Log all security-related events, including authorization failures.
  • Anomaly Alerts: Medium Detect and alert on abnormal activity patterns.

Server Verification & Communication Security

  • Server Identity Verification: High Verify the identity of the MCP Server to prevent connections to malicious servers; implement certificate pinning if possible.
  • Certificate Validation: High Strictly validate TLS certificates of remote Servers to prevent Man-in-the-Middle (MitM) attacks and check the integrity of the certificate chain.
  • Encrypted Communication: High Use TLS 1.2+ to encrypt all Client-Server communications; disable weak cipher suites.
  • Secure Protocol Configuration: Medium Configure secure TLS parameters, regularly review, and update encryption algorithms and protocols.

Permission Token Storage & Management

  • Permission Scope Limitation: High Strictly limit the scope of tokens under the principle of least privilege.

Auto-approve Control

  • Auto-approve Restrictions: High Carefully control which tools and operations can be auto-approved.
  • Whitelist Management: Medium Maintain a whitelist mechanism of tools that can be auto-approved.
  • Dynamic Risk Assessment: Medium Dynamically adjust auto-approve policies based on context.
  • Approval Process Auditing: Medium Log and audit all auto-approval decisions.

Sampling Security

  • Context Inclusion Control: High Strictly control the scope of context included in sampling requests.
  • Sensitive Data Filtering: High Filter out sensitive data from sampling requests and responses.
  • Sampling Request Validation: Medium Validate all parameters and content within sampling requests.
  • User Control: Medium Ensure users have clear control over sampling requests and results.
  • Model Preference Security: Medium Handle model preference information securely to prevent misuse.
  • Result Validation: Medium Verify that sampling results conform to security standards.

⬆ Back to Top

MCP Adaptation and Invocation Security on Different LLMs

Note: In practice, different LLM backends can vary in their invocation priorities and execution logic of MCP. Therefore, we need to not only focus on the MCP implementation but also on how the LLM and MCP work together.

LLM Secure Execution

  • Priority Function Execution: High Ensure the LLM can correctly prioritize and execute the intended plugin functions.
  • Malicious Prompt Prevention: High The LLM should identify and defend against malicious mnemonic or injection instructions within prompts.
  • Secure Invocation: High The LLM should securely and correctly invoke relevant MCP functionalities.
  • Sensitive Information Protection: High Prevent leakage of sensitive information.

Multi-modal Security

  • Multi-modal Content Filtering: High Filter out harmful or sensitive information in multi-modal content (e.g., malicious prompt text within images).

⬆ Back to Top

Multi-MCP Scenario Security

Note: It is common for users to simultaneously enable multiple MCP Servers in daily use. Given that no official store currently audits MCP plugins, users might install malicious MCPs that seriously compromise overall usage security. This demands heightened caution: introducing a malicious MCP can pose significant security risks.

  • Multi-MCP Environment Security: High Ensure overall security in multi-MCP environments; periodically scan and inspect installed MCPs.
  • Function Priority Hijacking Prevention: High Check for potential malicious prompt presets to prevent hijacking of function priority.
  • Cross-MCP Function Call Control: High Secure control over cross-MCP function calls to prevent malicious MCP servers from returning harmful prompts that could trigger other MCPs to perform sensitive operations.

⬆ Back to Top

Unique Security Points for Cryptocurrency-related MCPs

Note: With the increasing number of MCPs for cryptocurrency, many carry high-risk operations like managing crypto wallets. The following suggestions specifically target cryptocurrency-related MCPs.

  • Private Key Protection: High Enhance security measures for private keys (e.g., using Scrypt).
  • Wallet Generation Security: High Ensure the security of mnemonic or wallet generation processes.
  • Wallet Information Privacy: High Protect wallet information privacy; thoroughly filter data before sending wallet information to third-party interfaces.
  • Transfer Information Confirmation: High Ensure the completeness and clarity of all on-chain or exchange transfer signature information.
  • Funds Operation Verification: High Implement secondary verification methods (e.g., Google Authenticator) for critical fund operations.
  • Local Model Privacy Protection: Medium Use locally hosted LLMs to safeguard privacy data; prevent third-party model providers from accessing wallet information or other sensitive data.
  • Traditional Wallet Compatibility: Medium Provide secure compatibility with traditional wallets, such as supporting transaction signing through existing wallet solutions.

⬆ Back to Top

MCP Security Self-Assessment Tools

Note: For most MCP applications, you can use the following security tools to perform scans and quickly detect high-risk issues automatically.

⬆ Back to Top


References

将 MCP Security Checklist MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 MCP Security Checklist 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 MCP Security Checklist 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 MCP Security Checklist MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "mcp-security-checklist": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 MCP Security Checklist MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 MCP Security Checklist MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 MCP Security Checklist 帮我完成这项任务吗?
MCP Security Checklist
当然,我看过了。
以下是我使用 MCP Security Checklist 得到的结果。

常见问题

MCP Security Checklist MCP 服务器有什么用途?

MCP Security Checklist 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 MCP Security Checklist MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 MCP Security Checklist。

为什么在 TypingMind 中使用 MCP Security Checklist MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 MCP Security Checklist 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 MCP Security Checklist MCP 连接到 TypingMind?

MCP Security Checklist 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

MCP Security Checklist MCP 在 TypingMind 中提供哪些工具?

MCP Security Checklist 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 MCP Security Checklist MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 MCP Security Checklist 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇