Home / Servers / Sentry API / link_project_repository
Link a Repository to a Project
An MCP tool from the Sentry API server, hosted on mcp.hjlabs.in.
Link a Repository to a Project The repository must already exist in the organization (connected via a VCS integration). Idempotent: returns 200 if the link already exists, 201 if created. [POST /api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/repo/]
Name on the gateway: sentry_api__link_project_repository · may change things.
Parameters
| Name | Type | Description |
|---|---|---|
organization_id_or_slug required | string | The ID or slug of the organization the resource belongs to. |
project_id_or_slug required | string | The ID or slug of the project the resource belongs to.… |
repositoryId required | integer | The ID of the repository to link. |
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__link_project_repository",
"arguments": {
"organization_id_or_slug": "…",
"project_id_or_slug": "…",
"repositoryId": 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 link a repository to a project tool with organization_id_or_slug set to ….