Support inviting organization members via MCP

Abierto
#2,047 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

Start with the MCP tools and API client in mcp-core, then read mcp-core/src/permissions.ts and mcp-core/src/scopes.ts alongside the hosted OAuth route at mcp-cloudflare/src/server/oauth/routes/authorize.ts. Trace how existing tools make authenticated requests and check the organization member endpoint’s permission and invite constraints. Done means an invite tool is available with the required scope and permission handling, and tests cover successful invitations and relevant errors, including disabled invites and conflicts.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

The Sentry MCP server has no way to invite or add members to an organization. So when a user asks their agent to invite people by email, the agent gets stuck. One agent hit this and sent in user feedback (MCP-SERVER-GKS): the user asked to invite three emails to their org, and the agent found nothing that could do it.

Current state

  • No tool in the catalog invites, adds or lists org members. mcp-core has no API client calls to /organizations/{org}/members/.
  • Sentry already exposes POST /api/0/organizations/{org}/members/ (email, orgRole, teamRoles, sendInvite). MemberPermission allows POST with member:invite, member:write or member:admin.
  • The hosted OAuth flow (mcp-cloudflare/src/server/oauth/routes/authorize.ts) asks for a fixed set of scopes from mcp-core/src/scopes.ts: org:read project:write team:write event:write alerts:write. None of those are member scopes, so existing hosted tokens can't call the endpoint.
  • member:invite is not in the MCP Scope type in mcp-core/src/permissions.ts, which only has member:read/write/admin.

Constraints the backend already enforces

  • The organizations:invite-members feature can turn invites off for an org (403).
  • The assigned role must be one the inviter is allowed to grant. It defaults to member.
  • When open team membership is off, members with member:invite can only invite into teams they belong to.
  • Invites are rate-limited per org, email and inviter (429). Existing invites or invite requests return conflict errors.

Why it matters

  • Inviting teammates is a common setup step. Adding members can also lead orgs to a paid plan.
  • An invite sends a real email to an outside address. That's a new kind of side effect for the MCP, and it should be guarded against agent mistakes.

Related: #927 (org member / assignee lookup tools).

via Dhrumil.

--

View Session [Sentry]

Lenguaje dominante
TypeScript
Estrellas
957
Forks
174
Merge medio
13 h 16 min
PR fusionados (30 d)
407

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/toolkit

Todos los issues de getsentry/toolkit

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.