Home / Servers / Sentry API / create_organization_code_mapping

Create an Organization Code Mapping

An MCP tool from the Sentry API server, hosted on mcp.hjlabs.in.

Create an Organization Code Mapping Create a repository path mapping for a project and installed integration. [POST /api/0/organizations/{organization_id_or_slug}/code-mappings/]

Name on the gateway: sentry_api__create_organization_code_mapping · may change things.

Parameters

NameTypeDescription
organization_id_or_slug requiredstringThe ID or slug of the organization the resource belongs to.
repository_id requiredintegerThe ID of a repository belonging to the installed integration.
project_id requiredintegerThe ID of the project to associate with the code mapping.
stack_root requiredstringThe path prefix to replace in stack trace filenames.
source_root requiredstringThe repository path prefix to substitute for the stack trace prefix.
integration_id requiredintegerThe ID of the installed integration that provides the repository.
default_branchstringThe default branch to use when resolving source files. May be empty for…

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "sentry_api__create_organization_code_mapping",
  "arguments": {
    "organization_id_or_slug": "…",
    "repository_id": 0,
    "project_id": 0,
    "stack_root": "…",
    "source_root": "…",
    "integration_id": 0
  }
}

Or connect the Sentry API server directly, which lists 272 tools including this one:

Run in your terminal
claude mcp add --transport http hj-sentry-api https://mcp.hjlabs.in/mcp/sentry-api \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the create an organization code mapping tool with organization_id_or_slug set to ….

More from Sentry API