DESTRUCTIVE

create_repository

Registers where a component's code lives, so the Git integration can link branches, commits and pull requests to it later.

Register a repository on a project: project_id, owner and name are required, spelled as the provider spells them; provider is github by default or gitlab or bitbucket; url is derived from the provider when left out; default_branch is main by default; private is true by default; component_id names the component it builds (omit it when it serves the whole project). The repository is written through the same action the Repositories page and the intake wizard run, and repository.created goes out.

Registering records where the code lives; connecting the provider, which lets the integration read pushes and pull requests, is done in the application. A staff token with repository:create on the project is needed.

Requires ability

The token behind the MCP session must hold it, or the call is refused with TOKEN_MISSING_ABILITY.

The REST endpoint and this tool share one action, so validation, permissions and events are identical.

Fires one event

Delivered to every endpoint subscribed to it once the change is made.

Annotations

Destructive

A client that honours annotations asks a person before running it.

Arguments

project_id*string

UUID of the project.

owner*string

The account or group that owns the repository, as the provider spells it.

name*string

The repository's name, as the provider spells it.

providerstringoptional

Where the repository is hosted; github by default.

githubgitlabbitbucket
urlstringoptional

Where it lives when not on the provider's own host.

default_branchstringoptional

The branch releases are cut from; main by default.

privatebooleanoptional

Whether the repository is private; true by default.

component_idstringoptional

UUID of the component it builds; omit when it serves the whole project.

What it returns

{  "data": {    "id": "4c5d6e7f-8a9b-4c0d-8e1f-2a3b4c5d6e7f",    "project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",    "component_id": "c0a1b2c3-d4e5-4f60-8a7b-9c0d1e2f3a4b",    "provider": "github",    "owner": "zuse-technologies",    "name": "laundry-web",    "full_name": "zuse-technologies/laundry-web",    "default_branch": "main",    "url": "https://github.com/zuse-technologies/laundry-web",    "private": true,    "connected_by": null,    "connected_at": null,    "disconnected_at": null,    "created_at": "2026-10-28T09:45:00+00:00",    "updated_at": "2026-10-28T09:45:00+00:00"  }}

How it fails

VALIDATION_FAILED

owner or name missing, a provider outside the three, a url that is not an address, a component_id that is not the project's, or a repository the project already registered.

RESOURCE_NOT_FOUND

unknown project_id, or a project outside the token's scope or the person's visibility.

FORBIDDEN

the token is a client guest's, or the holder's role on the project does not carry repository:create.

TOKEN_MISSING_ABILITY

token lacks repository:create.

How is this guide?

Last updated on