MCP tool reference
The Codebahn MCP server exposes 15 resource-scoped tools. Each tool accepts an action parameter to select the operation.
User info
user_info
Get the authenticated user's profile: username, email, permissions, and account settings.
No parameters.
Search
search
Search across repositories, code, issues, users, and organizations. Action 'all' returns hit counts across types; 'code' and 'repos' return paginated results with type-specific filters.
Actions: all code repos
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | all | Search scope to query Values: all, code, repos |
keyword | string | Yes | Search query | |
language | string | No | Filter by programming language. Only for action=code | |
filename | string | No | Filter by filename or path. Only for action=code | |
mode | string | No | exact | Search mode: exact, union, fuzzy. Only for action=code |
page | number | No | 1 | Page number (1-based). Ignored for action=all |
limit | number | No | 30 | Page size. Ignored for action=all |
Repos
repos
List, create, or update repositories. Use 'list' for your repositories, 'create' to make a new one (under your account or an org), 'update' to change settings like description, visibility, merge options, or enabled features.
Actions: list create update
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: list, create, update | |
owner | string | No | Repository owner or org name. Required for create (under org) and update | |
repo | string | No | Repository name. Required for update | |
name | string | No | New repository name. Required for create | |
description | string | No | Repository description | |
website | string | No | Website URL. For update | |
private | boolean | No | Whether repository is private | |
default_branch | string | No | Default branch name | |
auto_init | boolean | No | Initialize with README | |
template | boolean | No | Whether this is a template repository | |
gitignores | string | No | Gitignore template names | |
license | string | No | License template | |
readme | string | No | README content | |
issue_labels | string | No | Issue label set | |
default_merge_style | string | No | Default merge style (merge, rebase, rebase-merge, squash, fast-forward-only). For update | |
archived | boolean | No | Archive the repository. For update | |
has_issues | boolean | No | Enable issue tracker. For update | |
has_wiki | boolean | No | Enable wiki. For update | |
has_pull_requests | boolean | No | Enable pull requests. For update | |
has_projects | boolean | No | Enable projects. For update | |
has_releases | boolean | No | Enable releases. For update | |
has_packages | boolean | No | Enable package registry. For update | |
has_actions | boolean | No | Enable Actions CI. For update | |
allow_merge_commits | boolean | No | Allow merge commits. For update | |
allow_rebase | boolean | No | Allow rebase merging. For update | |
allow_squash_merge | boolean | No | Allow squash merging. For update | |
default_delete_branch_after_merge | boolean | No | Delete head branch by default after merge. For update | |
page | number | No | 1 | Page number (1-based). For list |
limit | number | No | 100 | Page size. For list |
Files
files
Read, list, or write files in a repository. Write actions (create, update, delete) each produce a commit. Use 'read' for file content (plain text by default; set with_metadata=true for the SHA needed by update/delete). Use 'list' for a single directory level, 'tree' for a recursive file listing.
Actions: read list tree create update delete
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: read, list, tree, create, update, delete | |
owner | string | Yes | Repository owner | |
repo | string | Yes | Repository name | |
ref | string | No | Branch, tag, or commit SHA. Required for read/list/tree | |
path | string | No | File or directory path. Required for read, list (empty string for root), create, update, delete | |
content | string | No | File content (plain text, base64-encoded automatically). Required for create/update | |
message | string | No | Commit message. Required for create/update/delete | |
branch_name | string | No | Target branch. Required for create/update/delete | |
sha | string | No | File SHA from a prior read with with_metadata=true. Required for update/delete | |
new_branch_name | string | No | Create a new branch from branch_name and commit there | |
with_metadata | boolean | No | Return full metadata (SHA, encoding, links) instead of plain text. For read | |
start_line | number | No | First line to return (1-indexed). For read | |
end_line | number | No | Last line to return (1-indexed). For read | |
recursive | boolean | No | Return complete file tree. For tree | |
page | number | No | 1 | Page number (1-based). For tree |
limit | number | No | 1000 | Page size. For tree |
Branches
branches
Manage branches, compare refs, and configure branch protection rules. Use 'compare' to see commits reachable from head but not base. Protection actions manage merge requirements, status checks, and push restrictions.
Actions: list create delete compare list_protections get_protection create_protection update_protection delete_protection
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: list, create, delete, compare, list_protections, get_protection, create_protection, update_protection, delete_protection | |
owner | string | Yes | Repository owner | |
repo | string | Yes | Repository name | |
branch | string | No | Branch name. For create/delete | |
old_branch | string | No | Source branch to create from. For create | |
base | string | No | Base ref. For compare | |
head | string | No | Head ref. For compare | |
name | string | No | Protection rule name (glob pattern). For get/update/delete_protection | |
rule_name | string | No | Glob pattern for the new rule. For create_protection | |
page | number | No | 1 | Page number. For list |
limit | number | No | 100 | Page size. For list |
enable_push | boolean | No | Allow whitelisted users/teams to push. For create/update_protection | |
enable_push_whitelist | boolean | No | Restrict direct pushes to whitelist. For create/update_protection | |
push_whitelist_usernames | string | No | Comma-separated usernames allowed to push. For create/update_protection | |
push_whitelist_teams | string | No | Comma-separated teams allowed to push. For create/update_protection | |
push_whitelist_deploy_keys | boolean | No | Allow deploy keys to push. For create/update_protection | |
enable_merge_whitelist | boolean | No | Restrict merging to whitelist. For create/update_protection | |
merge_whitelist_usernames | string | No | Comma-separated usernames allowed to merge. For create/update_protection | |
merge_whitelist_teams | string | No | Comma-separated teams allowed to merge. For create/update_protection | |
enable_status_check | boolean | No | Require status checks before merging. For create/update_protection | |
status_check_contexts | string | No | Comma-separated required status check contexts. For create/update_protection | |
required_approvals | number | No | Minimum approving reviews required. For create/update_protection | |
enable_approvals_whitelist | boolean | No | Restrict approvals to whitelist. For create/update_protection | |
approvals_whitelist_username | string | No | Comma-separated usernames whose approvals count. For create/update_protection | |
approvals_whitelist_teams | string | No | Comma-separated teams whose approvals count. For create/update_protection | |
block_on_rejected_reviews | boolean | No | Block merge on rejected reviews. For create/update_protection | |
block_on_official_review_requests | boolean | No | Block merge on pending review requests. For create/update_protection | |
block_on_outdated_branch | boolean | No | Block merge when branch is outdated. For create/update_protection | |
dismiss_stale_approvals | boolean | No | Dismiss approvals on new pushes. For create/update_protection | |
require_signed_commits | boolean | No | Require signed commits. For create/update_protection | |
protected_file_patterns | string | No | Semicolon-separated glob patterns of protected files. For create/update_protection | |
unprotected_file_patterns | string | No | Semicolon-separated glob patterns exempt from protection. For create/update_protection |
Commits
commits
Browse commit history and view diffs. Use 'list' to list commits (optionally filtered to a file path). Use 'diff' to get the unified diff of a single commit.
Actions: list diff
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: list, diff | |
owner | string | Yes | Repository owner | |
repo | string | Yes | Repository name | |
sha | string | No | Branch, tag, or commit SHA. Required for diff; optional start point for list | |
path | string | No | File or directory path. For list: only commits touching this path. For diff: only this file's diff | |
page | number | No | 1 | Page number (1-based). For list |
limit | number | No | 100 | Page size. For list |
Issues
issues
Manage issues and milestones. Use 'set_state' to open or close an issue. Use 'list_milestones' to see available milestones for filtering or assignment.
Actions: list get create update set_state list_milestones
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: list, get, create, update, set_state, list_milestones | |
owner | string | Yes | Repository owner | |
repo | string | Yes | Repository name | |
index | number | No | Issue index. Required for get/update | |
title | string | No | Issue title. Required for create | |
body | string | No | Issue content body | |
state | string | No | Issue state. For list: filter (open/closed/all, default open). For set_state: required (open/closed). For update: omit to leave unchanged | |
assignee | string | No | Assignee username. For update | |
assignees | string | No | Comma-separated assignee usernames. For update | |
milestone | string | No | Milestone ID. For list/update | |
type | string | No | Filter: issues or pulls. For list | |
labels | string | No | Comma-separated label names. For list | |
page | number | No | 1 | Page number. For list/list_milestones |
limit | number | No | 20 | Page size. For list/list_milestones |
Labels
labels
Manage labels at repository or organization scope, and add or remove labels from issues. Omit repo to operate on org-level labels.
Actions: list create edit delete add_to_issue remove_from_issue
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: list, create, edit, delete, add_to_issue, remove_from_issue | |
owner | string | Yes | Repository owner or organization name | |
repo | string | No | Repository name. Omit for org-level labels | |
id | number | No | Label ID. Required for edit/delete | |
index | number | No | Issue index. Required for add_to_issue/remove_from_issue | |
name | string | No | Label name. Required for create | |
color | string | No | Hex color code (e.g. #00aabb). Required for create | |
labels | string | No | Comma-separated labels to add (names) or remove (IDs). For add_to_issue/remove_from_issue | |
description | string | No | Label description | |
exclusive | boolean | No | Whether label is exclusive within its scope | |
include_org_labels | boolean | No | true | Include org labels in list response |
page | number | No | 1 | Page number. For list |
limit | number | No | 100 | Page size. For list |
Comments
comments
Manage comments on issues and pull requests. Comments are shared between issues and PRs; use the same index for either.
Actions: list get create edit delete
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: list, get, create, edit, delete | |
owner | string | Yes | Repository owner | |
repo | string | Yes | Repository name | |
index | number | No | Issue or PR index. Required for list/create | |
id | number | No | Comment ID. Required for get/edit/delete | |
body | string | No | Comment body (markdown). Required for create/edit | |
since | string | No | ISO 8601 timestamp. Only list comments updated after this | |
before | string | No | ISO 8601 timestamp. Only list comments updated before this |
Pull requests
pull_requests
Manage pull requests: create, update, merge, and inspect changes. Use 'diff' for the unified diff, 'list_files' for changed file paths, 'list_commits' for individual commits in the PR.
Actions: list get create update merge diff list_files list_commits
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: list, get, create, update, merge, diff, list_files, list_commits | |
owner | string | Yes | Repository owner | |
repo | string | Yes | Repository name | |
index | number | No | PR index. Required for all actions except list/create | |
title | string | No | PR title. Required for create | |
head | string | No | Head branch. Required for create | |
base | string | No | Base branch. Required for create | |
body | string | No | PR description body | |
state | string | No | open | Filter: open, closed, all. For list |
style | string | No | Merge style: merge, rebase, rebase-merge, squash. Required for merge | |
message | string | No | Merge commit message. For merge | |
delete_branch_after_merge | boolean | No | Delete head branch after merge | |
force_merge | boolean | No | Force merge even if checks have not passed | |
merge_when_checks_succeed | boolean | No | Schedule merge for when all checks pass | |
assignee | string | No | Assignee username. For update | |
milestone | string | No | Milestone ID. For list/update | |
path | string | No | Return only this file's diff. For diff | |
sort | string | No | Sort order. For list | |
labels | string | No | Label IDs filter. For list | |
page | number | No | 1 | Page number |
limit | number | No | 20 | Page size |
Reviews
reviews
Manage PR reviews, review comments, and review requests. Create a review with inline comments and a verdict (APPROVED, REQUEST_CHANGES, COMMENT). Use 'request' to ask users or teams to review, 'cancel_request' to withdraw.
Actions: list get list_comments create submit dismiss delete request cancel_request
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: list, get, list_comments, create, submit, dismiss, delete, request, cancel_request | |
owner | string | Yes | Repository owner | |
repo | string | Yes | Repository name | |
index | number | Yes | PR index | |
id | number | No | Review ID. Required for get/list_comments/submit/dismiss/delete | |
state | string | No | Review verdict: APPROVED, REQUEST_CHANGES, or COMMENT. For create/submit | |
body | string | No | Review body text | |
message | string | No | Dismissal message. Required for dismiss | |
comments | string | No | Inline comments as JSON array. For create | |
reviewers | string | No | Comma-separated reviewer usernames. For request/cancel_request | |
team_reviewers | string | No | Comma-separated team reviewer names. For request/cancel_request | |
page | number | No | 1 | Page number. For list |
limit | number | No | 20 | Page size. For list |
CI
ci
Trigger and monitor CI workflows. Use 'dispatch' to start a workflow run, 'cancel' to abort a running build, 'list_runs' for run history, 'get_run' for details, 'get_logs' for job output grouped by step.
Actions: dispatch cancel list_runs get_run get_logs
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: dispatch, cancel, list_runs, get_run, get_logs | |
owner | string | Yes | Repository owner | |
repo | string | Yes | Repository name | |
workflow_id | string | No | Workflow filename (e.g. ci.yml). Required for dispatch | |
run_id | number | No | Workflow run ID. Required for cancel/get_run/get_logs | |
ref | string | No | Branch or tag to run on. For dispatch | |
inputs | string | No | Workflow inputs as JSON object. For dispatch | |
job | string | No | Filter logs to this job name. For get_logs | |
tail_lines | number | No | Return only the last N lines of output (max 500). For get_logs | |
run_number | number | No | Filter by run number. For list_runs | |
status | string | No | Filter by status (waiting, running, success, failure). For list_runs | |
event | string | No | Filter by trigger event (push, pull_request, etc.). For list_runs | |
head_sha | string | No | Filter by head commit SHA. For list_runs | |
page | number | No | 1 | Page number. For list_runs |
limit | number | No | 20 | Page size. For list_runs |
CI configuration
ci_config
Manage Actions variables and secrets at repository or organization scope. Variables store plaintext config; secrets store encrypted values (write-only, cannot be read back). The 'set' action creates or updates (upsert). The 'get' action is available for variables only.
Actions: list get set delete
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform. Note: get is only available for variables (secrets are write-only) Values: list, get, set, delete | |
type | string | Yes | Config type Values: variable, secret | |
scope | string | Yes | Scope level Values: repo, org | |
owner | string | Yes | Repository owner or organization name | |
repo | string | No | Repository name. Required when scope=repo | |
name | string | No | Variable or secret name. Required for get/set/delete | |
value | string | No | Value to store. For secrets, this is write-only. Required for set | |
page | number | No | 1 | Page number. For list |
limit | number | No | 30 | Page size. For list |
Webhooks
webhooks
Manage webhooks at repository or organization scope. Use scope 'repo' for repository webhooks, 'org' for organization-wide hooks. The 'test' action is only available for repository webhooks.
Actions: list get create update delete test
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform. Note: test is only available for repo-scope webhooks Values: list, get, create, update, delete, test | |
scope | string | Yes | Scope level Values: repo, org | |
owner | string | Yes | Repository owner or organization name | |
repo | string | No | Repository name. Required when scope=repo | |
id | number | No | Webhook ID. Required for get/update/delete/test | |
type | string | No | gitea | Webhook type: gitea, slack, discord. Default: gitea. For create |
url | string | No | Target URL for payload delivery. Required for create | |
content_type | string | No | json | Payload format: json (default) or form |
secret | string | No | Secret used to sign payloads | |
events | string | No | Comma-separated events (e.g. push,pull_request). Required for create | |
active | boolean | No | Whether the webhook is active | |
branch_filter | string | No | Glob pattern restricting which branches trigger delivery | |
authorization_header | string | No | Authorization header sent with each delivery | |
page | number | No | 1 | Page number. For list |
limit | number | No | 30 | Page size. For list |
Releases
releases
Manage releases, git tags, and release attachments. Use 'get_latest' for the most recent release or 'get_by_tag' to look up by tag name. Tag actions (list_tags, create_tag, delete_tag) manage git tags independent of releases.
Actions: list get get_latest get_by_tag create update delete list_tags create_tag delete_tag list_attachments delete_attachment
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
action | string | Yes | Operation to perform Values: list, get, get_latest, get_by_tag, create, update, delete, list_tags, create_tag, delete_tag, list_attachments, delete_attachment | |
owner | string | Yes | Repository owner | |
repo | string | Yes | Repository name | |
id | number | No | Release ID. For get/update/delete/list_attachments | |
tag | string | No | Tag name. For get_by_tag/delete_tag | |
tag_name | string | No | Tag name to create. For create/create_tag | |
target | string | No | Branch or commit SHA for the tag | |
name | string | No | Release title | |
body | string | No | Release description (markdown) | |
message | string | No | Tag message. For create_tag | |
draft | boolean | No | Whether release is a draft | |
prerelease | boolean | No | Whether release is a pre-release | |
attachment_id | number | No | Attachment ID. For delete_attachment | |
page | number | No | 1 | Page number. For list/list_tags |
limit | number | No | 30 | Page size. For list/list_tags |

