MCP · Tools
Tools: github
Three tools on the management plane. No human required: the consent was given when a human installed the GitHub App and approved its repositories. Descriptions are quoted as the agent reads them. Connecting a GitHub account itself has no tool — it is done from the dashboard's Integrations screen.
link_repo#
Link a GitHub repository to this project, so that a GitHub Actions workflow running in that repository is allowed to deploy the project's site. Nothing is stored on either side: the workflow proves which repository it runs in, and every upload is checked against this link. Linking replaces any previous link immediately — the response carries
replaced, the repository that just lost the right to deploy. ⛔ If the repository is not covered by the GitHub App installation the account owner approved, this is refused, and the refusal carries the GitHub URL that fixes it: a human opens it, adds the repository to the installation (or switches it to 'all repositories'), and you call this tool again. Nothing you can pass in this call repairs that refusal.
| Parameter | Type | Required | Meaning |
|---|---|---|---|
project_id | string | yes | |
repository_id | decimal string, up to 18 digits | yes | GitHub's numeric repository id, as a decimal string — the id field GitHub returns when you create the repository. Never owner/name. |
Calls PUT /v1/projects/:pid/github/repository. The account key must cover the project; a repository outside the approved installation answers 404 with the fix in the hint. A project has one linked repository at a time.
get_github_link#
Read which GitHub repository is linked to this project. Returns
link: nullwhen there is none — that is a valid answer, not an error, and it is distinct from 'this project does not exist', which is a refusal. A project with no link refuses every deployment from every repository.
| Parameter | Type | Required |
|---|---|---|
project_id | string | yes |
Calls GET /v1/projects/:pid/github/repository.
get_deploy_workflow#
Get the GitHub Actions workflow that deploys this project's site, ready to write to
.github/workflows/manybases-deploy.ymlin the repository that builds it. It builds withnpm run buildand uploads whatever lands indist— change BUILD_DIR if your tool writes elsewhere. There is no key and no repository secret: the job asks GitHub for a short-lived token that names its own repository, and we accept it because that repository is linked to this project. Use this whenever a build is involved —deploy_siteonly carries hand-written pages. The response also says whether this project is linked yet.
| Parameter | Type | Required |
|---|---|---|
project_id | string | yes |
Reads the link, then returns { path, workflow, linked_repository, note }. The workflow text is pre-filled with the project id and the API address; it is reproduced in full in Deploy from GitHub. note is one of three sentences:
- "This repository is linked: a run of this workflow will be accepted."
- "No repository is linked to this project yet — the first run of this workflow will be refused with a neutral 404. Call link_repo with the repository's numeric id."
- "The link could not be read from this response — this is not the same as having no link. Call get_github_link before assuming the project is unlinked."
