MCP 网关:Snap 如何同时验证用户与代理
MCP Gateway: How Snap Checks Both the Person and the Agent

原始链接: https://eng.snap.com/mcp-gateway

智能体的读写访问分层:平台默认安全,安全团队审查敏感服务,服务所有者决定允许的操作。MCP 最初只读,逐步加入写入。由于提示注入可能引导智能体,智能体不会继承个人的全部权限;它们获得明确授权的工具,仍受个人权限上限约束,并被审计。未分类的工具不能授权;MCP 中的工具可通过 RBAC、读/写分类、破坏性写入标记和敏感级别进行分段。人类访问大多镜像现有服务权限。智能体权限通过 PR 授予:所有者请求工具,列出的审批者审批,合并后的变更启用访问。这已扩展到 60 多个智能体。所有者无需为每个智能体提供单独的 API 密钥,网关允许所有者一次请求、服务所有者审批其工具,而智能体从不获取底层密钥。

Hacker News 最新 | 过去 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 MCP 网关:Snap 如何同时验证用户与代理 ( snap.com ) 4 分 由 Kaedon 2 小时前 | 隐藏 | 过去 | 收藏 | 讨论 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

How do you safely support read and write operations for agents? It takes layers. The platform should do the right thing by default, Security reviews the most sensitive services, and service owners make the final call on what agents may do with their service.

Early on, the GitHub MCP was read-only for code, issues and pull requests. Our first write-capable MCP was the open-source Jira server. GitHub pull request writes and Slack posting followed.

Reads need care too. Prompt injection isn't fully solved, and text an agent reads from one tool can steer what it does with the next. An agent that could read everything its person can read would be an attractive target. So an agent doesn't simply inherit the person's access. It gets the tools it was granted, the person's own access still caps what it can reach when it acts for that person, and the audit record shows what it did. A tool nobody has classified can't be granted.

Even within an MCP, we may want to segment some tools as more sensitive. If a service exposes a get, a create and a delete API, maybe most people can have the get. Maybe the create needs more control, or the delete shouldn't be exposed at all. We needed role-based access control (RBAC) for each tool. We classify each tool as read or write, flag destructive writes, and decide per MCP how sensitive its data is.

For people, MCP access mostly mirrors what they can already do, because the service behind an MCP still applies its own per-user checks.

For agents, service owners grant permissions through a PR-driven system. If someone wants their agent to call tools X, Y, and Z, they create a pull request (PR), and an approver listed for those tools must approve it. Once it merges, the agent can access the new tools.

For example, when one team's on-call agent needed A/B data for a weekly report, its PR added six read-only tools and nothing else. Since the first agent grant in August 2026, we've granted over 60 agents tools beyond their default permissions.

So why not just give every agent its own API keys? An on-call agent might need logs, metrics, source code and tickets. Setting up a separate relationship with each of those services is a burden most teams won't take on, and the next agent would have to do it again. Through the gateway, the agent's owner asks once in a PR, and each service owner approves their own tools. The agent never gets the keys or secrets those services need.

联系我们 contact @ memedata.com