analyze_build_problems
Analyze and report build problems and failures.
Drive a JetBrains TeamCity server from the conversation: trigger builds, wait on them, read the log, and open the tests and problems that failed.
LABSCO SUMMARY
Decide the mode first: dev is the default and stays on the read-and-run side, while full opens up creating and editing build configurations, steps, triggers and parameters. The author now describes the project as stable and in low-key maintenance and points at JetBrains' own built-in TeamCity MCP for read-and-rerun work, so the case for this one rests on that write surface.
An MCP server over TeamCity's REST API. It connects to your own TeamCity server with a personal access token, and keeps the write operations behind a mode switch so the default surface is read-and-run only.
Node.js >= 20.10.0 and a TeamCity Server 2020.1+ with REST API access. Two required environment variables: TEAMCITY_URL for the server and TEAMCITY_TOKEN for a personal access token. MCP_MODE selects the tool surface — dev by default, full for the write operations. Runs over stdio, launched with npx -y @daghis/teamcity-mcp.
One command plus a key — npx -y @daghis/teamcity-mcp, then supply credentials
USE CASES
List the failing tests for the build, open the ones that matter, and read the recorded build problems.
Trigger the configuration on a branch, block until it finishes, then read the detailed result.
Fetch the log a page at a time, or tail a fixed number of lines from the end.
List what the build produced, browse into subdirectories, then download the files you want.
See what is waiting, drop the builds that should not run, and stop a running one with a comment.
Check which mode the server is in, then switch to full so build-config and parameter editing appear.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
analyze_build_problemsAnalyze and report build problems and failures.
cancel_buildCancel or stop a running or queued build, with optional comment and requeue flag. Returns the cancelled build; returns 404 if the build is unknown.
cancel_queued_buildCancel a queued (not-yet-running) build. Idempotent; returns 404 if the build already started or was cancelled.
download_build_artifactDownload 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.
download_build_artifactsDownload 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.
fetch_build_logFetch a build log. Supports line-based pagination and streaming output.
get_buildGet details of a specific build. Works for queued, running, and finished builds.
get_build_configGet details of a build configuration.
get_build_resultsGet detailed results of a build. Optionally includes tests, artifacts, changes, statistics, and dependencies.
get_build_statusGet build status. Optionally includes test and problem summaries plus queue context.
get_mcp_modeGet the current MCP mode. Dev mode is read-only; full mode enables all operations.
get_projectGet details of a specific project.
get_server_infoGet TeamCity server info including version, build number, and state.
get_test_detailsGet detailed information about test failures.
list_branchesList branches for a project or build configuration.
list_build_artifactsList artifact files and directories for a build, optionally browsing into subdirectories. Returns an array of artifact entries with name, path, size, and isDirectory flag.
list_build_configsList build configurations. Supports pagination and locator filtering.
list_buildsList TeamCity builds. Supports pagination and locator filtering.
list_changesList VCS changes. Supports pagination.
list_investigationsList open investigations. Supports pagination.
list_muted_testsList muted tests. Supports pagination.
list_parametersList parameters for a build configuration.
list_problem_occurrencesList build problem occurrences. Supports pagination.
list_problemsList build problems. Supports pagination.
list_project_hierarchyList project hierarchy showing parent-child relationships.
list_projectsList TeamCity projects. Supports pagination and locator filtering.
list_queued_buildsList queued builds. Supports TeamCity queue locator filtering and pagination.
list_test_failuresList test failures for a build. Supports pagination.
pingTest MCP server connectivity. Returns a confirmation echo and optional message.
set_mcp_modeSwitch MCP mode at runtime. Returns previous and current modes with the updated tool count; idempotent and notifies clients of the list change.
trigger_buildTrigger a new build; runs asynchronously, use wait_for_build to monitor. Returns the queued build id; returns 404 if buildTypeId is unknown.
wait_for_buildWait for a build to reach a terminal state (finished, canceled, failed). Long-running; polls until completion or timeout.
BEFORE YOU INSTALL
32 tools when we connected; the project documents 90.
All 5 documented setups run the server on your machine.
INSTALLATION
npx -y @daghis/teamcity-mcpclaude mcp add teamcity -- npx -y @daghis/teamcity-mcpclaude mcp add teamcity -e TEAMCITY_URL="<YOUR_TEAMCITY_URL>" -e TEAMCITY_TOKEN="tc_<<YOUR_TOKEN>>" -- npx -y @daghis/teamcity-mcpclaude mcp add teamcity -- npx -y @daghis/teamcity-mcp --url "<YOUR_TEAMCITY_URL>" --token "tc_<<YOUR_TOKEN>>" --mode dev{
"mcpServers": {
"teamcity": {
"command": "npx",
"args": [
"-y",
"@daghis/teamcity-mcp",
"--url",
"<YOUR_TEAMCITY_URL>",
"--token",
"<YOUR_TOKEN>"
]
}
}
}{
"mcpServers": {
"teamcity": {
"command": "npx",
"args": [
"-y",
"@daghis/teamcity-mcp",
"--config",
"<YOUR_PATH_TO_TEAMCITY>"
]
}
}
}