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
| Name | Type | Description |
|---|---|---|
organization_id_or_slug required | string | The ID or slug of the organization the resource belongs to. |
repository_id required | integer | The ID of a repository belonging to the installed integration. |
project_id required | integer | The ID of the project to associate with the code mapping. |
stack_root required | string | The path prefix to replace in stack trace filenames. |
source_root required | string | The repository path prefix to substitute for the stack trace prefix. |
integration_id required | integer | The ID of the installed integration that provides the repository. |
default_branch | string | The 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:
{
"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:
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 ….