codehost-port
v0.1.0GitHub repositories, issues and pull requests via the REST API, as MCP tools.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_repository
Create a new GitHub repository for the authenticated user.
| Parameter | Type | Description |
|---|---|---|
name * | string | The name of the new repository. |
autoInit | boolean | Whether to initialize the new repository with a README file. |
description | string | A description of the new repository. |
private | boolean | Whether the new repository should be private. |
fork_repository
Fork a GitHub repository into the authenticated user's account.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The owner of the repository to fork. |
repo * | string | The name of the repository to fork. |
create_branch
Create a new branch in a repository, optionally from another branch.
| Parameter | Type | Description |
|---|---|---|
branch * | string | The name of the new branch to create. |
owner * | string | The owner of the repository to create the branch in. |
repo * | string | The name of the repository to create the branch in. |
from_branch | string | The name of the branch to create the new branch from; defaults to the repository's default branch. |
get_file_contents
Get the contents of a file or directory from a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The owner of the repository to get file contents from. |
path * | string | The path to the file or directory in the repository. |
repo * | string | The name of the repository to get file contents from. |
branch | string | The branch to get the file contents from. |
create_or_update_file
Create or update a single file in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
branch * | string | The branch to create or update the file on. |
content * | string | The new content of the file. |
message * | string | The commit message for the file creation or update. |
owner * | string | The owner of the repository containing the file. |
path * | string | The path to the file in the repository. |
repo * | string | The name of the repository containing the file. |
sha | string | The blob SHA of the file being replaced, required when updating an existing file. |
push_files
Push one or more files to a GitHub repository in a single commit.
| Parameter | Type | Description |
|---|---|---|
branch * | string | The branch to push the files to. |
files * | array | The files to push, each with its path and content. |
message * | string | The commit message for the push. |
owner * | string | The owner of the repository to push files to. |
repo * | string | The name of the repository to push files to. |
search_repositories
Search for GitHub repositories.
| Parameter | Type | Description |
|---|---|---|
query * | string | The search query for repositories. |
page | number | The page number of results to return. |
perPage | number | The maximum number of results to return per page. |
search_code
Search for code across GitHub repositories.
| Parameter | Type | Description |
|---|---|---|
q * | string | The search query for code. |
page | number | The page number of results to return. |
perPage | number | The maximum number of results to return per page. |
list_issues
List issues in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The owner of the repository to list issues in. |
repo * | string | The name of the repository to list issues in. |
labels | string | Filter issues by label names, as a comma-separated string. |
page | number | The page number of issue results to return. |
perPage | number | The maximum number of issues to return per page. |
state | string | Filter issues by state, such as 'open' or 'closed'. |
get_issue
Get the details of a specific issue in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
issue_number * | number | The number of the issue to retrieve. |
owner * | string | The owner of the repository containing the issue. |
repo * | string | The name of the repository containing the issue. |
create_issue
Create a new issue in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The owner of the repository to create the issue in. |
repo * | string | The name of the repository to create the issue in. |
title * | string | The title of the new issue. |
assignees | array | The usernames to assign to the new issue. |
body | string | The body text of the new issue. |
labels | array | The label names to add to the new issue. |
add_issue_comment
Add a comment to an existing issue in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
body * | string | The text of the comment to add. |
issue_number * | number | The number of the issue to add the comment to. |
owner * | string | The owner of the repository containing the issue to comment on. |
repo * | string | The name of the repository containing the issue to comment on. |
list_pull_requests
List pull requests in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
owner * | string | The owner of the repository to list pull requests in. |
repo * | string | The name of the repository to list pull requests in. |
page | number | The page number of pull request results to return. |
perPage | number | The maximum number of pull requests to return per page. |
state | string | Filter pull requests by state, such as 'open' or 'closed'. |
create_pull_request
Create a new pull request in a GitHub repository.
| Parameter | Type | Description |
|---|---|---|
base * | string | The name of the branch to merge into (the target branch). |
head * | string | The name of the branch to merge from (the source branch). |
owner * | string | The owner of the repository to create the pull request in. |
repo * | string | The name of the repository to create the pull request in. |
title * | string | The title of the new pull request. |
body | string | The body text of the new pull request. |
draft | boolean | Whether to create the pull request as a draft. |