No MCP tool changes project or organization Security & Privacy settings (IP scrubbing, data scrubbing)

未关闭
#2,562 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript
领域
api, tooling

调研方向

Start with the input schema and handler in packages/mcp-core/src/tools/catalog/update-project.ts, then the updateProject method in packages/mcp-core/src/api-client/client.ts, which forwards only name, slug and platform. Add the optional privacy fields and send only those that are set, leaving the name, slug and platform behaviour unchanged. Done when an MSW project PUT test shows that a call with only scrubIPAddresses true sends just that field, and the tool output returns the resulting values. The org:write scope question is a maintainer decision and is out of scope for this fix.

由索引模型根据 Issue 内容生成。

描述

mcp-feedback-pattern

Problem

An agent asked to turn on "Prevent Storing of IP Addresses" (or change data scrubbing) has no MCP tool for it, so it sends the user to the web UI.

  • update_project only takes name, slug and platform (packages/mcp-core/src/tools/catalog/update-project.ts:28-49), and SentryApiService.updateProject only forwards those three fields (packages/mcp-core/src/api-client/client.ts:1709-1729). No other catalog tool writes project or organization privacy options.
  • The hosted MCP requests project:write but not org:write (packages/mcp-core/src/scopes.ts:2-8), so organization-level settings are out of reach even with a new tool.

The Sentry API already supports both levels (getsentry/sentry @ c04def2681):

  • Project — PUT /api/0/projects/{org}/{project}/ accepts scrubIPAddresses, dataScrubber, dataScrubberDefaults, sensitiveFields, safeFields (src/sentry/core/endpoints/project_details.py:311-328, :357-360; saved at :879-909). project:write is enough (:663, :797-799), and the MCP already requests it.
  • Organization — PUT /api/0/organizations/{org}/ (PUBLIC) accepts scrubIPAddresses ("prevent IP addresses from being stored for new events on all projects"), dataScrubber, dataScrubberDefaults, sensitiveFields, safeFields (src/sentry/core/endpoints/organization_details.py:120-172, :956-977). This needs org:write.

Suggested fix

  1. Extend update_project (project-management skill, already project:write) with optional scrubIPAddresses, dataScrubber, dataScrubberDefaults, sensitiveFields, safeFields, sent only when set, and return the resulting values in the output so the agent can confirm the change.
  2. Say in the update_project description that organization-wide privacy settings are not available through MCP, so agents stop guessing and point users at Organization Settings → Security & Privacy.
  3. Maintainer decision: whether the MCP should ever request org:write for org-level privacy settings. That is a scope expansion, so it belongs in the write/admin policy discussion rather than a one-off fix.

Tests: MSW handler for project PUT; update_project with only scrubIPAddresses: true sends just that field and does not reset name/slug/platform.

Related

  • Same family as other missing write/admin asks: #2471 (cron update/delete), #2137 (code mappings), #2047 (invite members), #876 (dashboard writes).
  • #1883 tracks a CLI project edit command.

Reports

  • MCP-SERVER-GWP (2026-11-27): task "turn on Prevent Storing of IP Addresses for an organization", feedback.kind=missing, impact=worked_around, hosted server 0.42.0, HTTP transport, Claude Code client. The agent worked around it by dropping user.ip_address in the SDK's beforeSend and asking the user to flip the toggle in the UI. Sampled spans for the session show only a search_issues call before the report; no update_project call (the agent read the schema and stopped).

Report count: 1

via automation evt_905b9c478746fd9deeb853f85ad7441b · Run ID dispatch_33b55bbb45b1b70900f0a78165277ea6.

--

View Session [Sentry]

主要语言
TypeScript
星标
975
派生
189
平均合并
19 小时 57 分钟
30 天内合并 PR
542

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/toolkit 的其他 Issue

查看 getsentry/toolkit 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。