Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

stdio + Internal Integration token hangs on init in Claude Code MCP client

Đang mở
#1,023 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
typescript
Lĩnh vực
api, backend

Hướng nghiên cứu

Tái hiện hiện tượng treo khi khởi tạo với @sentry/[email protected], giao vận stdio và token Custom (Internal) Integration trong Claude Code. So sánh hành vi đó với cùng server và token được khởi chạy trực tiếp, sau đó theo dõi handshake khởi tạo MCP và vòng đời tiến trình. Được xem là hoàn tất khi quá trình khởi tạo hoàn thành, lỗi xác thực được báo cáo rõ ràng khi thích hợp và các tool dự kiến được đăng ký.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug question

Problem

When using @sentry/mcp-server via the stdio transport with a Custom (Internal) Integration token, the MCP server initialization hangs indefinitely in a "pending" state inside Claude Code's MCP stdio client. No tools are registered and no explicit auth error is returned — the handshake never completes.

This is distinct from getsentry/sentry-mcp#833, which tracks the remote HTTP endpoint (mcp.sentry.dev) not supporting API token auth. The stdio transport with a bound token is the documented workaround for headless environments, but it fails in this specific client.

Symptom

  • MCP server stays in "pending" / initializing state indefinitely
  • No tools registered in the client
  • No explicit error or timeout surfaced

Reproduction Context

  • Client: Claude Code MCP stdio client (desktop/local, not web IDE)
  • Server: @sentry/[email protected] (confirmed across multiple versions)
  • Token type: Custom (Internal) Integration token — a single org-level bot token, not a per-developer user auth token
  • Transport: stdio

What was ruled out

  • Token is valid — GET https://sentry.io/api/0/ returns HTTP 200 with the same token, scopes look correct
  • @sentry/[email protected] spawned directly with the same token initializes cleanly and exposes 22 tools
  • Per-developer OAuth flow through the same MCP works fine for individual devs
  • The Claude Code stdio client is not at fault for the token itself — CLI tools work with it without issue

Diagnosis

The failure sits somewhere in the initialization handshake between Claude Code's MCP stdio client and the server when using an Internal Integration token. The same server + token combination works when spawned outside of Claude Code's client, so this is likely either:

  • A difference in how Claude Code's stdio client drives the MCP init sequence (e.g. environment, process lifecycle, or handshake timing)
  • A code path in the server that behaves differently for Internal Integration tokens vs. user auth tokens during initialization

Use Case

Headless bot pattern: a single shared Internal Integration token bound to a bot account, used by an internal Claude agent running inside Claude Code. OAuth per-developer is not viable here — the agent needs a single stable identity.

Workaround in place: using the Sentry CLI directly with the same token instead of the MCP path.

Related

  • getsentry/sentry-mcp#833 — request for token auth on the remote HTTP endpoint (different surface, same underlying headless-agent pattern)
  • anthropics/claude-code#40835 — Claude Code remote environments issue where tools don't register initially (may be related on the client side)

Action taken on behalf of Wassim Melakhessou.

Ngôn ngữ chính
TypeScript
Star
938
Fork
166
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
156

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/toolkit

Tất cả issue của getsentry/toolkit

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.