PA

puliczek/awesome-mcp-security

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

747 stars 316 forks 质量 48 趋势 22

🔥🔒 出色的MCP(模型上下文协议)安全 🖥️

概览

🤝 表达你的支持——如果你喜欢内容,请留言 ⭐️ 关于模型上下文协议(MCP)安全你需要了解的一切。 2025年4月15日:当前的MCP认证规范正在被更为完善的规范所取代。如果您对当前认证规范有疑虑,请加入讨论。 - 服务器:- 验证所有工具输入 - 实现适当的访问控制 - 限制工具调用 - 净化工具输出 - 客户端:- 敏感操作提示用户确认 - 在调用服务器前向用户显示工具输入,以避免恶意或意外数据窃取 - 在传递给LLM前验证工具结果 - 实现工具调用超时 - 记录工具使用情况以供审计 出于信任与安全考虑,客户端认为工具注释除非来自受信任服务器,否则被视为不可信。 为了信任、安全和保障,总有人类参与,能够拒绝工具调用。

概述(AI 翻译)

🤝 表达你的支持——如果你喜欢内容,请留言 ⭐️


**超棒的MCP安保 **

关于模型上下文协议(MCP)安全你需要了解的一切。

目录

  • 超棒的MCP安全
  • 📔 安全考量
  • 📃 论文
  • 📺 视频
  • 📕 文章、X主题和博客文章
  • 🧑 🚀 工具与代码
  • 💾 MCP 安全服务器
  • 💻 其他有用资源

📔 安全考量

官方安全考量,摘自官方MCP规范修订版:2025-03-26

[!注] 2025年4月15日:当前MCP认证规范正在被更完善的规范取代。如果您对当前认证规范有疑虑,欢迎加入讨论。

  • 服务器 必须:

  • 验证所有工具输入

  • 实施适当的访问控制

  • 速率限制工具调用

  • 净化工具输出

  • 客户端 应该:

  • 敏感操作的用户确认提示

  • 在调用服务器前向用户显示工具输入,以避免恶意或意外的数据泄露

  • 在交给LLM之前验证工具结果

  • 实现工具调用的超时

  • 用于审计目的的日志工具使用

[!警告]

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。


Awesome MCP Security

Everything you need to know about Model Context Protocol (MCP) security.

Table of Contents

📔 Security Considerations

Official Security Considerations from the Official MCP Specification Rev: 2025-03-26

[!NOTE] 15.04.2025: The current MCP auth specification is in progress of being replaced by a more robust specification. Please join the conversation if you have concerns around the current auth specification.

  • Servers MUST:

    • Validate all tool inputs
    • Implement proper access controls
    • Rate limit tool invocations
    • Sanitize tool outputs
  • Clients SHOULD:

    • Prompt for user confirmation on sensitive operations
    • Show tool inputs to the user before calling the server, to avoid malicious or accidental data exfiltration
    • Validate tool results before passing to LLM
    • Implement timeouts for tool calls
    • Log tool usage for audit purposes

[!WARNING]
For trust & safety and security, clients MUST consider tool annotations to be untrusted unless they come from trusted servers.

[!WARNING]
For trust & safety and security, there SHOULD always be a human in the loop* with the ability to deny tool invocations.

Applications SHOULD:

  • Provide UI that makes clear which tools are being exposed to the AI model.
  • Insert clear visual indicators when tools are invoked.
  • Present confirmation prompts to the user for operations, to ensure a human is in the loop.

[!NOTE]
*Human-in-the-Loop (HITL) means that user help monitor and guide automated tasks, like deciding whether to accept tool requests in Cursor.

📃 Papers

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →