Twinkle HubTwinkle Hub
登入
🛠️ Alpha 期間維護視窗:每日 22:00 – 07:00(台灣時間 GMT+8)服務可能不穩定,敬請見諒。

📌 2026-05-22 新增:國家考試考古題語意檢索 — 6.4 萬份考卷 / 32 萬題(1 個 dataset)

看完整 changelog →

Sentry MCP

Sentry

Sentry 官方 MCP — 讓 LLM 查你 org 的 issue、event、release、performance。最常用:「LLM 自動分析 production error stack trace 並建議 fix」。

需要 Token5 分鐘安裝

為何走本機安裝

Sentry auth token 能讀(依 scope 也可寫)你整個 org 的錯誤資料 — 包含 user PII、stack trace 中的程式碼片段。是高敏感度憑證。twinkle-hub 不存這個 token。

前置需求

  • Node.js ≥ 18
  • Sentry 帳號 + org admin(或請 admin 給 token)
  • 支援 MCP 的 client

取得 Token

  1. 1登入 https://sentry.io
  2. 2User settings → Auth Tokens → Create New Token
  3. 3取個名字(例 "claude-mcp")
  4. 4Scopes — 讀:event:read / project:read / org:read / team:read。寫(謹慎開):event:write / project:write / team:write
  5. 5複製 token(sntryu_ 開頭)
  6. 6團隊使用建議改用 Organization token:org settings → Developer Settings → Custom Integrations → 建 internal integration

安裝步驟

Claude Desktop (macOS)

~/Library/Application Support/Claude/claude_desktop_config.json

SENTRY_HOST:用 sentry.io SaaS 就填 sentry.io;自架 Sentry 填你的 host(不含 https://)

{
  "mcpServers": {
    "sentry": {
      "command": "npx",
      "args": ["-y", "@sentry/mcp-server"],
      "env": {
        "SENTRY_AUTH_TOKEN": "<your_sentry_token>",
        "SENTRY_ORG": "<your_org_slug>",
        "SENTRY_HOST": "sentry.io"
      }
    }
  }
}

完整安裝文件 (GitHub)

第一次使用

範例提示詞

列出我 sentry 上未解決的 critical issues

常用工具

  • list_organization_projects(organization_slug) 列所有 project
  • list_issues(project_slug, query="is:unresolved") 找未解 issue
  • get_issue_details(issueId) 完整 stack trace + breadcrumbs
  • list_events(issueId) 該 issue 所有 occurrence
  • update_issue(issueId, status="resolved") 標 resolved(要 write scope)

故障排除

問題解法
401 UnauthorizedToken 過期或 scope 不夠
看不到某 projectToken scope 沒給該 project,或你帳號沒權限
Organization not foundSENTRY_ORG 填錯(要用 slug 不是 display name)
Self-hosted 連不上SENTRY_HOST 填對嗎?路徑是否反代到 /api/0?

安全考量

  • Token 像密碼,不要 commit 進 git
  • 起手 read-only scope,習慣 LLM 行為後再開 write
  • 給 LLM 的 token 不要包含 member:admin / org:admin / project:admin
  • Token 不用了立刻 revoke