TeamCity CI/CD
v1.0.1Read-only MCP server for JetBrains TeamCity — builds, configs, logs, tests, agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_projects Search Projects
Search TeamCity projects by name, ID, or parent. This is the PRIMARY tool for browsing the TeamCity project hierarchy. Projects are organizational containers that hold build configurations (jobs). Projects can be nested — use parent_project_id to navigate the tree. The root project '_Root' is the parent of all top-level projects.
| Parameter | Type | Description |
|---|---|---|
archived | boolean | Include archived projects |
limit | integer | Max results per page |
name | Filter by project name (case-insensitive exact match) | |
page | integer | Page number, 1-indexed |
parent_project_id | Filter to direct children of this parent project ID. Use '_Root' for top-level projects. | |
project_id | Filter by exact project ID (e.g., 'MyProject'). Use this when you know the project's technical identifier. |
get_project_details Get Project Details
Get detailed information about a single TeamCity project. Returns project metadata including: name, description, parent project, immediate child projects, build configurations defined in this project, and project parameters.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID (e.g., 'MyProject'). |
search_build_configs Search Build Configs
Search TeamCity build configurations (jobs/pipelines) by structured filters. A build configuration defines WHAT to build and HOW — steps, triggers, parameters, and VCS roots. Each run produces a build. At least one filter (project_id or build_type_id) is required.
| Parameter | Type | Description |
|---|---|---|
build_type_id | Filter by exact build type ID (e.g., 'MyProject_Build'). Use when you know the exact identifier. | |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
paused | Filter by paused state. None = all. | |
project_id | Filter by project ID. Returns only build configurations belonging to this project. |
get_build_config_details Get Build Config Details
Get full details of a build configuration including steps, triggers, and parameters. Returns comprehensive configuration data: build steps (type, name, and properties), triggers (VCS, schedule, dependency), parameters, VCS roots, settings, and agent requirements. Use this to understand HOW a build is configured, not its run history.
| Parameter | Type | Description |
|---|---|---|
build_type_id * | string | Build configuration ID (e.g., 'MyProject_Build'). |
get_build_config_branches Get Build Config Branches
List branches available for a build configuration. Returns branch names with their default status and activity information. Use this to understand which branches a configuration can build. Example questions: - "What branches can this build run on?" - "What is the default branch for this pipeline?"
| Parameter | Type | Description |
|---|---|---|
build_type_id * | string | Build configuration ID |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
search_builds Search Builds
Search build history with filters. This is the PRIMARY tool for finding builds (CI/CD runs). At least one filter is required: build_type_id, project_id, status, running, tag, or branch. Builds are returned newest-first.
| Parameter | Type | Description |
|---|---|---|
branch | Filter by branch name. Use '<default>' for the default branch. Omit to return builds from all branches. | |
build_number | Filter by exact build number (display string, e.g., '1.2.3-456'). Build numbers are NOT numeric IDs — they are display strings. | |
build_type_id | Filter by build configuration ID. Use this to get history for a specific pipeline. | |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
personal | Filter personal builds. True = only personal, False = exclude personal, None = all. | |
project_id | Filter by project ID. Returns builds from all configurations in the project. | |
running | Filter by running state. True = only running builds, False = only finished, None = all builds. | |
since_date | Only builds started after this date. ISO 8601 format: 'yyyyMMddTHHmmss+0000'. Example: '20240101T000000+0000' for Jan 1 2024 UTC. | |
status | Filter by build status: 'SUCCESS', 'FAILURE', or 'ERROR'. Omit to return all statuses. | |
tag | Filter by build tag (exact match) | |
until_date | Only builds that finished before this date. Same format as since_date. |
get_build_details Get Build Details
Get comprehensive details of a single build. Returns full build data: status, state, branch, triggered-by, build agent, VCS revisions, parameters, output parameters, statistics, snapshot dependencies, and tags.
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID — the internal ID, not the build number. |
get_build_statistics Get Build Statistics
Get statistical metrics for a build. Returns numeric statistics: total duration, build step durations, artifact size, test counts (passed/failed/ignored/muted), code coverage metrics, and any custom statistics reported by build steps. Example questions: - "How long did each step take in this build?" - "What's the test pass rate for this build?" - "What was the code coverage?"
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID |
get_build_chain Get Build Chain
Traverse a build's snapshot-dependency chain. Answers "what did this build depend on?" (upstream) and "what depended on this build?" (downstream) — the core of pipeline/build-chain debugging.
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID |
direction | string | Which snapshot-dependency direction to traverse. 'upstream' = builds this one depends on; 'downstream' = builds that depend on this one; 'both' (default). |
get_build_log Get Build Log
Retrieve build log content, paginated by line.
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID |
end_line | Stop reading at this line (exclusive). At most max_lines lines are returned even if the range is wider. | |
max_lines | integer | Maximum number of lines to return (capped at 5000). |
start_line | Start reading from this line (0-indexed). Omit to start at the beginning. | |
tail | boolean | Return the last lines instead of the first — use when investigating failures. |
search_build_log Search Build Log
Search within a build log for specific text. Returns matching lines with surrounding context — find errors or patterns in large logs without paging through them.
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID |
query * | string | Text to find in the build log (case-insensitive). |
context_lines | integer | Lines of context to show around each match. |
max_matches | integer | Maximum number of matches to return. |
get_build_test_results Get Build Test Results
Get test results for a build. Returns test occurrences with name, status, duration, and failure details. A build can have thousands of tests — use pagination and the status filter to focus on what matters.
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
status | Filter by test status: 'SUCCESS', 'FAILURE', or 'UNKNOWN'. Omit for all tests. Use 'FAILURE' to see only failed tests. |
get_test_details Get Test Details
Get detailed information about a specific test occurrence. Returns the full test name, status, duration, failure reason, and investigation/muting state, plus the first-failed / next-fixed build references that bracket the failure. Example questions: - "Show me the details of this failed test" - "What was the error message for this test?" - "Is this test being investigated?"
| Parameter | Type | Description |
|---|---|---|
test_locator * | string | Test occurrence locator (the 'id' field of a test occurrence). |
get_build_problems Get Build Problems
Get problems detected in a build. Returns structured problem data: compilation errors, exit-code failures, test failures, snapshot-dependency failures, and custom problem types. Each problem has a type, identity, and description. This is the PRIMARY tool for understanding WHY a build failed — it is easier to interpret than raw logs.
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
search_investigations Search Investigations
Search active investigations in TeamCity. Investigations are assignments to fix a failing build or test. When a build fails, TeamCity can assign an investigation to a team member.
| Parameter | Type | Description |
|---|---|---|
assignee | Filter by assignee username. | |
build_type_id | Filter investigations by build configuration ID. | |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
project_id | Filter investigations by project ID. |
list_muted_tests List Muted Tests
List currently muted tests. A muted test does not fail its build even when it fails, so a mute can hide a real regression. This returns who muted what, where (scope), why, and how it resolves.
| Parameter | Type | Description |
|---|---|---|
build_type_id | Filter mutes by build configuration ID. | |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
project_id | Filter mutes by project ID. |
get_build_queue Get Build Queue
List builds currently in the TeamCity build queue. Shows builds waiting to be assigned to an agent: queue entry, branch, triggered-by, wait reason, and compatible-agent count.
| Parameter | Type | Description |
|---|---|---|
build_type_id | Filter queued builds by build configuration ID. | |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
project_id | Filter queued builds by project ID. |
search_agents Search Agents
Search TeamCity build agents. Build agents are machines that execute builds. Each belongs to an agent pool and reports capability properties (OS, installed software, etc.).
| Parameter | Type | Description |
|---|---|---|
authorized | Filter by authorization state. Unauthorized agents cannot run builds. | |
connected | Filter by connection state. True = connected, False = disconnected. | |
enabled | Filter by enabled state. Disabled agents are excluded from build assignment. | |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
pool_id | Filter by agent pool ID. |
list_agent_pools List Agent Pools
List TeamCity agent pools. Agent pools group build agents for resource management. Each pool has a set of assigned projects and agent-count limits.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
get_agent_details Get Agent Details
Get detailed status for a single build agent. Surfaces WHY an agent may not be taking builds: the enabled/authorized state with their human comments, last activity, version, pool, current build, and an OS summary. The first thing to check when builds sit queued or an agent looks idle.
| Parameter | Type | Description |
|---|---|---|
agent_id * | integer | Agent ID |
search_changes Search Changes
Search VCS changes (commits) tracked by TeamCity. Returns changes with author, date, comment, and file count. Changes are linked to the builds that include them. At least one filter is required: build_id, build_type_id, project_id, or username.
| Parameter | Type | Description |
|---|---|---|
build_id | Get VCS changes included in a specific build. | |
build_type_id | Get pending changes for a build configuration. | |
limit | integer | Max results per page |
page | integer | Page number, 1-indexed |
project_id | Get changes across all build configurations in a project. | |
since_change | Only changes after this one: a TeamCity change ID (e.g. '1234') or a full commit SHA. | |
username | Filter changes by VCS username (committer). |
get_change_details Get Change Details
Get detailed information about a VCS change including modified files. Returns the full commit details with the complete list of modified files (added, modified, deleted) and their paths. Example questions: - "What files were changed in this commit?" - "Show me the details of change 12345"
| Parameter | Type | Description |
|---|---|---|
change_id * | string | Change ID |
list_build_artifacts List Build Artifacts
List the artifacts a build produced (one directory level). Browse into a directory by passing its path back in.
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID |
path | string | Artifact directory to list (e.g. 'reports'). Empty lists the root. |
get_build_artifact_content Get Build Artifact Content
Read the text content of a build artifact, paginated by line. Intended for text artifacts (test reports, coverage summaries, logs). Page a large file by advancing start_line while has_more is true. Oversized artifacts are refused.
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID |
path * | string | Artifact path, e.g. 'reports/junit.xml'. |
max_line_length | integer | Maximum characters per line; longer lines are truncated. |
max_lines | integer | Maximum lines to return. |
start_line | integer | First line to return (0-indexed). |
diagnose_build Diagnose Build
Explain why a build failed, in one call. Combines the build's status, its build problems, its failed tests (unmuted first, with failure details) and the log lines most likely to explain the failure: lines TeamCity marked as errors plus lines with error keywords, with a little context. Use this first for "why did build X fail?"; drill down with get_build_log, search_build_log or get_test_details afterwards. Example questions: - "Why did build 12345 fail?" - "What broke the nightly build?"
| Parameter | Type | Description |
|---|---|---|
build_id * | string | Numeric build ID |
context_lines | integer | Log lines of context around each match |
max_failed_tests | integer | Failed tests to include |
max_log_matches | integer | Error log lines to include |
find_build_config Find Build Config
Find build configurations by fuzzy name/project matching. The PRIMARY tool when a configuration is described in natural language, vague terms, abbreviations, or partial names — it matches against every configuration's name and full project path.
| Parameter | Type | Description |
|---|---|---|
query * | string | Free-text query — partial names, project-path fragments, or abbreviations. |
limit | integer | Maximum results to return |
resolve_teamcity_url Resolve Teamcity Url
Parse a TeamCity web URL and extract entity identifiers. Users often paste URLs from their browser. This parses a TeamCity URL and extracts the project, build-configuration, and/or build IDs.
| Parameter | Type | Description |
|---|---|---|
url * | string | A TeamCity web UI URL from the browser address bar. Supports both new-style URLs (/project/X, /buildConfiguration/X/123, /build/123, /change/45) and legacy URLs (/viewLog.html?buildId=X, /viewType.htm… |
get_server_info Get Server Info
Get TeamCity server version and status information. Returns the server version, build number, start time, and current time. Use this to verify connectivity or check which TeamCity version is running. Example questions: - "What version of TeamCity are we running?" - "Is TeamCity up?" - "When was TeamCity last restarted?"
get_server_health Get Server Health
Get server health items and runtime metrics. Combines TeamCity's reported health items (configuration/disk/plugin warnings) with runtime metrics (CPU, memory, queue size, etc.) — the two things that explain server-side ERROR builds or sluggishness. Each source degrades independently: if your token lacks permission for one, the other is still returned with a note.