Skip to content

MCP has no code mapping or repository tools #2137

Open

Description

@sentry-junior

An agent using the hosted MCP could not move a project's code mappings from a GitHub repo to a GitLab repo and remove the GitHub repo: no MCP tool lists, creates, updates, or deletes code mappings, or removes a repository. update_project only takes name, slug, and platform. Reported through MCP feedback MCP-SERVER-GN1 (Claude, impact blocked).

MCP side (toolkit bb046c7)

  • No catalog tool in packages/mcp-core/src/tools/catalog/ calls /code-mappings/ or /repos/.
  • update-project.ts:28-79: name, slug, platform only.
  • The MCP scope set (permissions.ts:13-30) has no org:integrations, and no catalog tool requires org:admin.

Sentry API (getsentry/sentry 99c124e)

Related

via @sergical.

--

View Session [Sentry]

Activity

  1. linear-code commented on Nov 10, 2026

    @linear-code
  2. sentry-junior commented on Nov 12, 2026

    @sentry-junior
    ContributorAuthor

    Second report of this gap: MCP feedback MCP-SERVER-GP5 (opencode, server 0.42.0, impact blocked). The agent found the project with find_projects but had no tool to list or delete that project's code mappings. The user approved removing one extra repository from one project only, not from the whole org.

    This report adds a per-project case. Checked again at toolkit 7d70395 and getsentry/sentry 4cf104b:

    • Toolkit still has no code-mapping or project-repo tool. The only call is linkProjectRepository, used by create_project (create-project.ts:224). permissions.ts still has no org:integrations.
    • Listing one project's mappings works with a scope we already have: GET /organizations/{org}/code-mappings/?project={id} filters by project (organization_code_mappings.py:282-322) and accepts org:read.
    • Deleting one mapping only touches that project: DELETE /organizations/{org}/code-mappings/{id}/ checks project access and deletes only that config (organization_code_mapping_details.py:185-208). It still needs org:admin or org:integrations (organization.py:255-260).
    • Deleting the mapping does not unlink the repo from the project. The ProjectRepository row stays, because the FK cascades only from ProjectRepository to the mapping (repository_project_path_config.py:18). /projects/{org}/{project}/repo/ has only GET and POST (project_repo.py:71-78). The Sentry side of a per-project unlink is tracked in Linear SCM-333 (SCM, Backlog). It is not an MCP fix.

    Suggested scope: start with a read-only find_code_mappings (project filter, org:read). Then decide whether to add delete_code_mapping behind org:integrations. If a tool deletes the mapping, its result should say that the repository stays linked to the project.

  3. sentry-junior commented on Nov 20, 2026

    @sentry-junior
    ContributorAuthor

    Third report of this gap: MCP feedback MCP-SERVER-GTB (Cursor, hosted HTTP, server 0.42.0, feedback.kind=missing, impact blocked, tool find_releases).

    This report adds a read-only case. The agent had to confirm which repository a React Native project's source maps and commits are linked to. find_releases and get_release_details returned lastCommit=null and commits=[]. No tool could list the org's connected repositories or the project's code mappings, and the web UI needed a separate login from the MCP OAuth session.

    Checked again at toolkit 7c618d5:

    • No catalog tool lists repositories or code mappings. apiService.listRepos (/organizations/{org}/repos/) exists, but only create_project calls it, to resolve a repo to link (create-project.ts:211-212).
    • No file in packages/mcp-core/src calls /code-mappings/.

    This supports the read-only first step suggested above. A find_code_mappings tool (project filter, org:read) that also returns each mapping's repository name and provider would have answered this report. Exposing listRepos on its own would also have helped.

    I could not find this session's tool-call spans in sentry/mcp-server traces, searching by client.id and by the feedback's trace id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions