Skip to content

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 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

NameTypeRequiredDefaultDescription
actionstringYesallSearch scope to query Values: all, code, repos
keywordstringYesSearch query
languagestringNoFilter by programming language. Only for action=code
filenamestringNoFilter by filename or path. Only for action=code
modestringNoexactSearch mode: exact, union, fuzzy. Only for action=code
pagenumberNo1Page number (1-based). Ignored for action=all
limitnumberNo30Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: list, create, update
ownerstringNoRepository owner or org name. Required for create (under org) and update
repostringNoRepository name. Required for update
namestringNoNew repository name. Required for create
descriptionstringNoRepository description
websitestringNoWebsite URL. For update
privatebooleanNoWhether repository is private
default_branchstringNoDefault branch name
auto_initbooleanNoInitialize with README
templatebooleanNoWhether this is a template repository
gitignoresstringNoGitignore template names
licensestringNoLicense template
readmestringNoREADME content
issue_labelsstringNoIssue label set
default_merge_stylestringNoDefault merge style (merge, rebase, rebase-merge, squash, fast-forward-only). For update
archivedbooleanNoArchive the repository. For update
has_issuesbooleanNoEnable issue tracker. For update
has_wikibooleanNoEnable wiki. For update
has_pull_requestsbooleanNoEnable pull requests. For update
has_projectsbooleanNoEnable projects. For update
has_releasesbooleanNoEnable releases. For update
has_packagesbooleanNoEnable package registry. For update
has_actionsbooleanNoEnable Actions CI. For update
allow_merge_commitsbooleanNoAllow merge commits. For update
allow_rebasebooleanNoAllow rebase merging. For update
allow_squash_mergebooleanNoAllow squash merging. For update
default_delete_branch_after_mergebooleanNoDelete head branch by default after merge. For update
pagenumberNo1Page number (1-based). For list
limitnumberNo100Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: read, list, tree, create, update, delete
ownerstringYesRepository owner
repostringYesRepository name
refstringNoBranch, tag, or commit SHA. Required for read/list/tree
pathstringNoFile or directory path. Required for read, list (empty string for root), create, update, delete
contentstringNoFile content (plain text, base64-encoded automatically). Required for create/update
messagestringNoCommit message. Required for create/update/delete
branch_namestringNoTarget branch. Required for create/update/delete
shastringNoFile SHA from a prior read with with_metadata=true. Required for update/delete
new_branch_namestringNoCreate a new branch from branch_name and commit there
with_metadatabooleanNoReturn full metadata (SHA, encoding, links) instead of plain text. For read
start_linenumberNoFirst line to return (1-indexed). For read
end_linenumberNoLast line to return (1-indexed). For read
recursivebooleanNoReturn complete file tree. For tree
pagenumberNo1Page number (1-based). For tree
limitnumberNo1000Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: list, create, delete, compare, list_protections, get_protection, create_protection, update_protection, delete_protection
ownerstringYesRepository owner
repostringYesRepository name
branchstringNoBranch name. For create/delete
old_branchstringNoSource branch to create from. For create
basestringNoBase ref. For compare
headstringNoHead ref. For compare
namestringNoProtection rule name (glob pattern). For get/update/delete_protection
rule_namestringNoGlob pattern for the new rule. For create_protection
pagenumberNo1Page number. For list
limitnumberNo100Page size. For list
enable_pushbooleanNoAllow whitelisted users/teams to push. For create/update_protection
enable_push_whitelistbooleanNoRestrict direct pushes to whitelist. For create/update_protection
push_whitelist_usernamesstringNoComma-separated usernames allowed to push. For create/update_protection
push_whitelist_teamsstringNoComma-separated teams allowed to push. For create/update_protection
push_whitelist_deploy_keysbooleanNoAllow deploy keys to push. For create/update_protection
enable_merge_whitelistbooleanNoRestrict merging to whitelist. For create/update_protection
merge_whitelist_usernamesstringNoComma-separated usernames allowed to merge. For create/update_protection
merge_whitelist_teamsstringNoComma-separated teams allowed to merge. For create/update_protection
enable_status_checkbooleanNoRequire status checks before merging. For create/update_protection
status_check_contextsstringNoComma-separated required status check contexts. For create/update_protection
required_approvalsnumberNoMinimum approving reviews required. For create/update_protection
enable_approvals_whitelistbooleanNoRestrict approvals to whitelist. For create/update_protection
approvals_whitelist_usernamestringNoComma-separated usernames whose approvals count. For create/update_protection
approvals_whitelist_teamsstringNoComma-separated teams whose approvals count. For create/update_protection
block_on_rejected_reviewsbooleanNoBlock merge on rejected reviews. For create/update_protection
block_on_official_review_requestsbooleanNoBlock merge on pending review requests. For create/update_protection
block_on_outdated_branchbooleanNoBlock merge when branch is outdated. For create/update_protection
dismiss_stale_approvalsbooleanNoDismiss approvals on new pushes. For create/update_protection
require_signed_commitsbooleanNoRequire signed commits. For create/update_protection
protected_file_patternsstringNoSemicolon-separated glob patterns of protected files. For create/update_protection
unprotected_file_patternsstringNoSemicolon-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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: list, diff
ownerstringYesRepository owner
repostringYesRepository name
shastringNoBranch, tag, or commit SHA. Required for diff; optional start point for list
pathstringNoFile or directory path. For list: only commits touching this path. For diff: only this file's diff
pagenumberNo1Page number (1-based). For list
limitnumberNo100Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: list, get, create, update, set_state, list_milestones
ownerstringYesRepository owner
repostringYesRepository name
indexnumberNoIssue index. Required for get/update
titlestringNoIssue title. Required for create
bodystringNoIssue content body
statestringNoIssue state. For list: filter (open/closed/all, default open). For set_state: required (open/closed). For update: omit to leave unchanged
assigneestringNoAssignee username. For update
assigneesstringNoComma-separated assignee usernames. For update
milestonestringNoMilestone ID. For list/update
typestringNoFilter: issues or pulls. For list
labelsstringNoComma-separated label names. For list
pagenumberNo1Page number. For list/list_milestones
limitnumberNo20Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: list, create, edit, delete, add_to_issue, remove_from_issue
ownerstringYesRepository owner or organization name
repostringNoRepository name. Omit for org-level labels
idnumberNoLabel ID. Required for edit/delete
indexnumberNoIssue index. Required for add_to_issue/remove_from_issue
namestringNoLabel name. Required for create
colorstringNoHex color code (e.g. #00aabb). Required for create
labelsstringNoComma-separated labels to add (names) or remove (IDs). For add_to_issue/remove_from_issue
descriptionstringNoLabel description
exclusivebooleanNoWhether label is exclusive within its scope
include_org_labelsbooleanNotrueInclude org labels in list response
pagenumberNo1Page number. For list
limitnumberNo100Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: list, get, create, edit, delete
ownerstringYesRepository owner
repostringYesRepository name
indexnumberNoIssue or PR index. Required for list/create
idnumberNoComment ID. Required for get/edit/delete
bodystringNoComment body (markdown). Required for create/edit
sincestringNoISO 8601 timestamp. Only list comments updated after this
beforestringNoISO 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: list, get, create, update, merge, diff, list_files, list_commits
ownerstringYesRepository owner
repostringYesRepository name
indexnumberNoPR index. Required for all actions except list/create
titlestringNoPR title. Required for create
headstringNoHead branch. Required for create
basestringNoBase branch. Required for create
bodystringNoPR description body
statestringNoopenFilter: open, closed, all. For list
stylestringNoMerge style: merge, rebase, rebase-merge, squash. Required for merge
messagestringNoMerge commit message. For merge
delete_branch_after_mergebooleanNoDelete head branch after merge
force_mergebooleanNoForce merge even if checks have not passed
merge_when_checks_succeedbooleanNoSchedule merge for when all checks pass
assigneestringNoAssignee username. For update
milestonestringNoMilestone ID. For list/update
pathstringNoReturn only this file's diff. For diff
sortstringNoSort order. For list
labelsstringNoLabel IDs filter. For list
pagenumberNo1Page number
limitnumberNo20Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: list, get, list_comments, create, submit, dismiss, delete, request, cancel_request
ownerstringYesRepository owner
repostringYesRepository name
indexnumberYesPR index
idnumberNoReview ID. Required for get/list_comments/submit/dismiss/delete
statestringNoReview verdict: APPROVED, REQUEST_CHANGES, or COMMENT. For create/submit
bodystringNoReview body text
messagestringNoDismissal message. Required for dismiss
commentsstringNoInline comments as JSON array. For create
reviewersstringNoComma-separated reviewer usernames. For request/cancel_request
team_reviewersstringNoComma-separated team reviewer names. For request/cancel_request
pagenumberNo1Page number. For list
limitnumberNo20Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: dispatch, cancel, list_runs, get_run, get_logs
ownerstringYesRepository owner
repostringYesRepository name
workflow_idstringNoWorkflow filename (e.g. ci.yml). Required for dispatch
run_idnumberNoWorkflow run ID. Required for cancel/get_run/get_logs
refstringNoBranch or tag to run on. For dispatch
inputsstringNoWorkflow inputs as JSON object. For dispatch
jobstringNoFilter logs to this job name. For get_logs
tail_linesnumberNoReturn only the last N lines of output (max 500). For get_logs
run_numbernumberNoFilter by run number. For list_runs
statusstringNoFilter by status (waiting, running, success, failure). For list_runs
eventstringNoFilter by trigger event (push, pull_request, etc.). For list_runs
head_shastringNoFilter by head commit SHA. For list_runs
pagenumberNo1Page number. For list_runs
limitnumberNo20Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform. Note: get is only available for variables (secrets are write-only) Values: list, get, set, delete
typestringYesConfig type Values: variable, secret
scopestringYesScope level Values: repo, org
ownerstringYesRepository owner or organization name
repostringNoRepository name. Required when scope=repo
namestringNoVariable or secret name. Required for get/set/delete
valuestringNoValue to store. For secrets, this is write-only. Required for set
pagenumberNo1Page number. For list
limitnumberNo30Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform. Note: test is only available for repo-scope webhooks Values: list, get, create, update, delete, test
scopestringYesScope level Values: repo, org
ownerstringYesRepository owner or organization name
repostringNoRepository name. Required when scope=repo
idnumberNoWebhook ID. Required for get/update/delete/test
typestringNogiteaWebhook type: gitea, slack, discord. Default: gitea. For create
urlstringNoTarget URL for payload delivery. Required for create
content_typestringNojsonPayload format: json (default) or form
secretstringNoSecret used to sign payloads
eventsstringNoComma-separated events (e.g. push,pull_request). Required for create
activebooleanNoWhether the webhook is active
branch_filterstringNoGlob pattern restricting which branches trigger delivery
authorization_headerstringNoAuthorization header sent with each delivery
pagenumberNo1Page number. For list
limitnumberNo30Page 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

NameTypeRequiredDefaultDescription
actionstringYesOperation to perform Values: list, get, get_latest, get_by_tag, create, update, delete, list_tags, create_tag, delete_tag, list_attachments, delete_attachment
ownerstringYesRepository owner
repostringYesRepository name
idnumberNoRelease ID. For get/update/delete/list_attachments
tagstringNoTag name. For get_by_tag/delete_tag
tag_namestringNoTag name to create. For create/create_tag
targetstringNoBranch or commit SHA for the tag
namestringNoRelease title
bodystringNoRelease description (markdown)
messagestringNoTag message. For create_tag
draftbooleanNoWhether release is a draft
prereleasebooleanNoWhether release is a pre-release
attachment_idnumberNoAttachment ID. For delete_attachment
pagenumberNo1Page number. For list/list_tags
limitnumberNo30Page size. For list/list_tags