---
title: "Debug Unity Builds From Rider With the TeamCity CLI and MCP"
description: "A Unity game worked locally but was missing its background on staging despite a successful TeamCity build. The developer used the TeamCity CLI from Rider’s terminal to inspect the WebGL build log and found the build parameter gameBuildFlavor set to diagnostic instead of the expected game. After committing the configuration change to the pipeline’s YAML, a new build was triggered automatically. An AI agent connected through TeamCity’s MCP endpoint could then retrieve build details, explain the issue, and monitor the new deployment. The fix restored the missing background, and the article suggests adding logging, validation, and smoke tests to catch similar problems earlier."
---

# Debug Unity Builds From Rider With the TeamCity CLI and MCP

[Jetbrains](https://yomu.fyi/company/jetbrains) · Olga Bedrina · Nov 10, 2026

**Type:** Tutorial

## Summary

A Unity game worked locally but was missing its background on staging despite a successful TeamCity build. The developer used the TeamCity CLI from Rider’s terminal to inspect the WebGL build log and found the build parameter gameBuildFlavor set to diagnostic instead of the expected game. After committing the configuration change to the pipeline’s YAML, a new build was triggered automatically. An AI agent connected through TeamCity’s MCP endpoint could then retrieve build details, explain the issue, and monitor the new deployment. The fix restored the missing background, and the article suggests adding logging, validation, and smoke tests to catch similar problems earlier.

## Context

A Unity game works locally but is missing its background on staging despite a successful TeamCity build. The developer uses the TeamCity CLI to inspect the WebGL build log, finds the build parameter gameBuildFlavor set to diagnostic instead of the expected game, and commits the fix. An AI agent connected through MCP can then explain the issue and monitor the new build.

## Approach / What changed

Use the TeamCity CLI from Rider’s terminal to inspect build logs and find an unexpected build parameter, then commit a configuration fix. Optionally connect an MCP-capable AI agent in Rider to TeamCity’s MCP endpoint so the agent can retrieve build details and logs, explain the issue, and follow the new deployment.

## Takeaways

- Use the TeamCity CLI command teamcity run log <build\_id> to search build logs for unexpected parameters; press / to search and n/N to navigate matches.
- Store pipeline YAML configuration in the repository so configuration changes can be reviewed and committed from the IDE, triggering a new build automatically.
- Connect an MCP-capable AI agent in Rider to TeamCity’s MCP endpoint to let the agent retrieve build logs, explain issues, and monitor new deployments without leaving the IDE.

## FAQ

### How do I install and authenticate the TeamCity CLI?

The TeamCity CLI is installed via Homebrew on macOS (brew install jetbrains/utils/teamcity) or WinGet on Windows (winget install JetBrains.TeamCityCLI). After installation, run teamcity auth login --server <your\_server\_url> and follow the browser-based authorization flow.

### How do I connect Rider to TeamCity MCP?

In Rider, go to Settings | Tools | AI Assistant | Model Context Protocol (MCP) and add an HTTP connection with the URL https://example.teamcity.com/app/mcp and an Authorization header containing a Bearer token. The token should be a project-scoped access token with Read-only permissions.

### What prompt should I use to ask the AI agent to investigate a CI issue?

The agent can use TeamCity MCP tools to retrieve build details and logs, then compare CI settings with local project files. A prompt should specify the build ID, project ID, and the symptom (e.g., missing background on staging). The agent will inspect the logs and explain the likely cause, citing the build ID, log entries, and files.

**Tags:** [CI/CD](https://yomu.fyi/topic/ci-cd), [MCP](https://yomu.fyi/topic/mcp), [Rider](https://yomu.fyi/topic/rider), [TeamCity](https://yomu.fyi/topic/teamcity), [Unity](https://yomu.fyi/topic/unity)

- Source: [Jetbrains](https://blog.jetbrains.com/teamcity/2026/11/debug-unity-builds-from-rider-with-teamcity-cli-mcp)
- Source URL: https://blog.jetbrains.com/teamcity/2026/11/debug-unity-builds-from-rider-with-teamcity-cli-mcp
- Ingested by Yomu: 2026-11-10T15:00:17.065Z

[Read original post](https://blog.jetbrains.com/teamcity/2026/11/debug-unity-builds-from-rider-with-teamcity-cli-mcp)
