teamcity

v2.16.1
io.github.Daghis/teamcity Checked 7 hours ago Published 1 day ago

MCP server exposing JetBrains TeamCity CI/CD workflows to AI coding assistants

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ping

Test MCP server connectivity. Returns a confirmation echo and optional message.

ParameterTypeDescription
messagestringOptional message to echo back

get_mcp_mode

Get the current MCP mode. Dev mode is read-only; full mode enables all operations.

set_mcp_mode

Switch MCP mode at runtime. Returns previous and current modes with the updated tool count; idempotent and notifies clients of the list change.

ParameterTypeDescription
mode *stringTarget mode: dev (read-only) or full (all operations)

list_projects

List TeamCity projects. Supports pagination and locator filtering.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
fieldsstringOptional fields selector for server-side projection
locatorstringOptional locator to filter projects
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)
parentProjectIdstringFilter by parent project ID

get_project

Get details of a specific project.

ParameterTypeDescription
projectId *stringProject ID

list_builds

List TeamCity builds. Supports pagination and locator filtering.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
branchstringFilter by branch (logical or VCS name)
buildTypeIdstringFilter by build type ID
countnumberDeprecated: use pageSize
fieldsstringOptional fields selector for server-side projection
locatorstringOptional build locator to filter builds
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)
projectIdstringFilter by project ID
statusstringFilter by status

get_build

Get details of a specific build. Works for queued, running, and finished builds.

ParameterTypeDescription
buildIdstringBuild ID (internal TeamCity ID)
buildNumberHuman-readable build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required when using buildNumber)

trigger_build

Trigger a new build; runs asynchronously, use `wait_for_build` to monitor. Returns the queued build id; returns 404 if buildTypeId is unknown.

ParameterTypeDescription
buildTypeId *stringBuild type ID to trigger
agentIdintegerRun the build on the agent with this id (optional, excludes agentName)
agentNamestringRun the build on the agent with this name, e.g. "ciagent-h08" (optional)
branchNamestringBranch to build (optional)
commentstringBuild comment (optional)
moveToTopbooleanPut the build at the top of the queue instead of the end (optional, defaults to false)
propertiesobjectOptional build parameters to set when triggering the build

cancel_queued_build

Cancel a queued (not-yet-running) build. Idempotent; returns 404 if the build already started or was cancelled.

ParameterTypeDescription
buildId *stringQueued build ID

cancel_build

Cancel or stop a running or queued build, with optional comment and requeue flag. Returns the cancelled build; returns 404 if the build is unknown.

ParameterTypeDescription
buildId *stringBuild ID
commentstringOptional cancellation comment
readdIntoQueuebooleanIf true, a new identical build will be queued after cancel (running builds only). Defaults to false.

get_build_pin

Get the pin status of a build, including comment, user and time. Finds build numbers on any branch; returns an error if a number matches several builds.

ParameterTypeDescription
buildIdstringBuild ID (internal TeamCity ID)
buildNumberHuman-readable build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required when using buildNumber)

set_build_pin

Set the pin status of a build; the TeamCity cleanup keeps a pinned build and its artifacts. Idempotent; pinning again replaces the comment. Returns the buildId and the new pin status; returns 404 if the build is unknown.

ParameterTypeDescription
pinned *booleantrue to pin, false to unpin
buildIdstringBuild ID (internal TeamCity ID)
buildNumberHuman-readable build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required when using buildNumber)
commentstringPin comment (only used when pinning)

list_pinned_builds

List pinned builds with pin comment, user and time on all branches, including canceled and personal builds. Filter by build configuration or project; supports pagination.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
buildTypeIdstringOnly builds of this build configuration
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)
projectIdstringOnly builds of this project and its subprojects

get_build_status

Get build status. Optionally includes test and problem summaries plus queue context.

ParameterTypeDescription
buildIdstringBuild ID
buildNumberstringHuman build number (requires buildTypeId when provided)
buildTypeIdstringBuild configuration identifier (required when using buildNumber)
includeProblemsbooleanInclude build problems
includeQueueReasonbooleanInclude waitReason for the queued item (extra API call when queued)
includeQueueTotalsbooleanInclude total queued count (extra API call when queued)
includeTestsbooleanInclude test summary

wait_for_build

Wait for a build to reach a terminal state (finished, canceled, failed). Long-running; polls until completion or timeout.

ParameterTypeDescription
buildIdstringBuild ID to wait for
buildNumberstringHuman build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required with buildNumber)
includeProblemsbooleanInclude build problems in result
includeTestsbooleanInclude test summary in result
pollIntervalnumberSeconds between polls (default 15, min 5)
timeoutnumberMax seconds to wait (default 600, max 3600)

fetch_build_log

Fetch a build log. Supports line-based pagination and streaming output.

ParameterTypeDescription
buildIdstringBuild ID (TeamCity internal id)
buildNumberstringHuman build number (e.g., 54). If provided, optionally include buildTypeId to disambiguate.
buildTypeIdstringOptional build type ID to disambiguate buildNumber
encodingstringResponse encoding: 'text' (default) or 'stream'. 'stream' writes the whole log, or the requested line range, to outputPath; logs can be several GB
lineCountnumberMax lines to return (overrides pageSize)
minFreeDiskMbnumberStreaming only: disk space in MiB that must stay free on the target disk, otherwise the download aborts (default 1024, 0 disables the reserve)
outputPathstringOptional absolute path to write streamed logs; defaults to a temp file when streaming
pagenumber1-based page number
pageSizenumberLines per page (default 500)
startLinenumber0-based start line (overrides page)
tailbooleanTail mode: return last N lines

list_build_configs

List build configurations. Supports pagination and locator filtering.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
fieldsstringOptional fields selector for server-side projection
locatorstringOptional build type locator to filter
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)
projectIdstringFilter by project ID

get_build_config

Get details of a build configuration.

ParameterTypeDescription
buildTypeId *stringBuild type ID

list_test_failures

List test failures for a build. Supports pagination.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
buildIdstringBuild ID (internal TeamCity ID)
buildNumberHuman-readable build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required when using buildNumber)
fieldsstringOptional fields selector for server-side projection
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)

list_queued_builds

List queued builds. Supports TeamCity queue locator filtering and pagination.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
fieldsstringOptional fields selector for server-side projection
locatorstringQueue locator filter (e.g., project:(id:MyProj))
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)

get_server_info

Get TeamCity server info including version, build number, and state.

get_build_results

Get detailed results of a build. Optionally includes tests, artifacts, changes, statistics, and dependencies.

ParameterTypeDescription
artifactEncodingstringEncoding mode for artifacts when includeArtifacts is true
artifactFilterstringFilter artifacts by name/path pattern
buildIdstringBuild ID
buildNumberBuild number when buildId is not available
buildTypeIdstringBuild configuration ID when resolving by number
includeArtifactsbooleanInclude artifacts listing and metadata
includeChangesbooleanInclude VCS changes
includeDependenciesbooleanInclude dependency builds
includeStatisticsbooleanInclude build statistics
maxArtifactSizenumberMax artifact content size (bytes) when inlining

list_build_artifacts

List artifact files and directories for a build, optionally browsing into subdirectories. Returns an array of artifact entries with name, path, size, and isDirectory flag.

ParameterTypeDescription
buildIdstringBuild ID (internal TeamCity ID)
buildNumberHuman-readable build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required when using buildNumber)
extensionstringFilter by file extension (e.g. "yaml", ".yaml")
includeNestedbooleanRecursively include all files within subdirectories (default: false)
nameFilterstringGlob pattern to filter artifacts by name (e.g. "*.yaml")
pathstringSub-path to list (e.g. "okd" or "okd/subdir"). Omit to list top-level artifacts.
pathFilterstringGlob pattern to filter artifacts by full path

download_build_artifact

Download a single build artifact, with base64, text, or streaming output. Returns the artifact bytes or stream metadata; returns 404 if the build or path is unknown.

ParameterTypeDescription
artifactPath *stringArtifact path or name
buildIdstringBuild ID (internal TeamCity ID)
buildNumberHuman-readable build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required when using buildNumber)
encodingstringResponse encoding: 'base64' (default), 'text', or 'stream'
maxSizenumberMaximum artifact size (bytes) allowed before aborting
outputPathstringOptional absolute path to write streamed content; defaults to a temp file when streaming

download_build_artifacts

Download multiple build artifacts, with base64, text, or streaming output. Returns per-artifact payloads or stream metadata; returns 404 if the build or any path is unknown.

ParameterTypeDescription
artifactPaths *arrayArtifact paths or names to download
buildIdstringBuild ID (internal TeamCity ID)
buildNumberHuman-readable build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required when using buildNumber)
encodingstringResponse encoding: 'base64' (default), 'text', or 'stream'
maxSizenumberMaximum artifact size (bytes) allowed before aborting
outputDirstringOptional absolute directory to write streamed artifacts; defaults to temp files when streaming

get_test_details

Get detailed information about test failures.

ParameterTypeDescription
buildIdstringBuild ID (internal TeamCity ID)
buildNumberHuman-readable build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required when using buildNumber)
testNameIdstringTest name ID (optional)

analyze_build_problems

Analyze and report build problems and failures.

ParameterTypeDescription
buildIdstringBuild ID (internal TeamCity ID)
buildNumberHuman-readable build number (requires buildTypeId)
buildTypeIdstringBuild configuration ID (required when using buildNumber)

list_changes

List VCS changes. Supports pagination.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
buildIdstringFilter by build ID via locator helper
fieldsstringOptional fields selector for server-side projection
locatorstringOptional change locator to filter results
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)
projectIdstringFilter by project ID via locator helper

list_problems

List build problems. Supports pagination.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
buildIdstringFilter by build ID via locator helper
fieldsstringOptional fields selector for server-side projection
locatorstringOptional problem locator to filter results
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)
projectIdstringFilter by project ID via locator helper

list_problem_occurrences

List build problem occurrences. Supports pagination.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
buildIdstringFilter by build ID via locator helper
fieldsstringOptional fields selector for server-side projection
locatorstringOptional problem occurrence locator to filter results
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)
problemIdstringFilter by problem ID via locator helper

list_investigations

List open investigations. Supports pagination.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
assigneeUsernamestringFilter by responsible user username via locator helper
buildTypeIdstringFilter by build configuration ID via locator helper
fieldsstringOptional fields selector for server-side projection
locatorstringOptional investigation locator to filter results
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)
projectIdstringFilter by project ID via locator helper

list_muted_tests

List muted tests. Supports pagination.

ParameterTypeDescription
allbooleanFetch all pages up to maxPages
buildTypeIdstringFilter by build configuration ID via locator helper
fieldsstringOptional fields selector for server-side projection
locatorstringOptional mute locator to filter results
maxPagesnumberMax pages to fetch (when all=true)
pageSizenumberItems per page (default 100)
projectIdstringFilter by project ID via locator helper
testNameIdstringFilter by test name ID via locator helper

list_branches

List branches for a project or build configuration.

ParameterTypeDescription
buildTypeIdstringBuild type ID
projectIdstringProject ID

list_parameters

List parameters for a build configuration.

ParameterTypeDescription
buildTypeId *stringBuild type ID

list_project_hierarchy

List project hierarchy showing parent-child relationships.

ParameterTypeDescription
rootProjectIdstringRoot project ID (defaults to _Root)