# teamcity

Connects coding assistants to JetBrains TeamCity to launch builds, inspect test failures, and inspect logs directly in chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 31
- Author: Daghis
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Daghis/teamcity-mcp
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/teamcity

## What it does

This server connects an AI coding assistant to a JetBrains TeamCity instance over the Model Context Protocol. It allows an agent to trigger pipelines, inspect failing tests, and pull build output into the conversation. Tokens stay hidden in log output.

Two modes govern tool availability: Dev and Full. Dev mode enables 31 tools focused on reading queues, checking parameters, and triggering routine runs. Full mode expands the registry to 87 tools, adding build configuration cloning, VCS root changes, and parameter management. Assistants switch modes on the fly using `get_mcp_mode` and `set_mcp_mode`.

Running the package requires Node.js 20.10.0 or later alongside TeamCity 2020.1 or newer. Without valid credentials passed through `TEAMCITY_URL` and `TEAMCITY_TOKEN`, the connection fails immediately.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `TEAMCITY_URL`, `TEAMCITY_TOKEN`, `MCP_MODE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env TEAMCITY_URL=<TEAMCITY_URL> --env TEAMCITY_TOKEN=<TEAMCITY_TOKEN> --env MCP_MODE=<MCP_MODE> --transport stdio teamcity -- npx -y @daghis/teamcity-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add teamcity --env TEAMCITY_URL=<TEAMCITY_URL> --env TEAMCITY_TOKEN=<TEAMCITY_TOKEN> --env MCP_MODE=<MCP_MODE> -- npx -y @daghis/teamcity-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "teamcity": {
            "command": "npx",
            "args": [
                "-y",
                "@daghis/teamcity-mcp"
            ],
            "env": {
                "TEAMCITY_URL": "<TEAMCITY_URL>",
                "TEAMCITY_TOKEN": "<TEAMCITY_TOKEN>",
                "MCP_MODE": "<MCP_MODE>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "teamcity": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@daghis/teamcity-mcp"
            ],
            "env": {
                "TEAMCITY_URL": "<TEAMCITY_URL>",
                "TEAMCITY_TOKEN": "<TEAMCITY_TOKEN>",
                "MCP_MODE": "<MCP_MODE>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e TEAMCITY_URL=<TEAMCITY_URL> -e TEAMCITY_TOKEN=<TEAMCITY_TOKEN> -e MCP_MODE=<MCP_MODE> teamcity npx -y @daghis/teamcity-mcp
```
Replace <…> with your own values

## When to use it
- trigger TeamCity builds and track execution progress
- retrieve error logs from failed test runs
- clone build configurations and edit build parameters
- inspect the active build queue and agent status

## Example prompts
- Inspect the latest failed build in TeamCity and pinpoint why the tests failed
- Switch to Full mode with `set_mcp_mode` and display the current build queue
- Trigger a build for the main test configuration and monitor its progress

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23643
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17160
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
