Get the FREE Ultimate OpenClaw Setup Guide →

teamcity

Model Context Protocol (MCP) server for JetBrains TeamCity: control builds, tests, agents and configs from AI coding assistants.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio daghis-teamcity-mcp npx -y @daghis/teamcity-mcp

How to use

The TeamCity MCP Server provides a bridge between AI coding assistants and a JetBrains TeamCity CI/CD server. It exposes TeamCity operations as MCP tools that can be invoked from supported AI assistants, enabling actions such as triggering builds, fetching build logs, inspecting test failures, and managing configurations and parameters. The server supports two runtime modes: Dev (default) for safe CI/CD operations with a subset of tools, and Full for complete infrastructure management. You can switch modes at runtime using get_mcp_mode and set_mcp_mode when supported by the client, and the tool list may update dynamically. To use, configure the MCP server (via environment variables or client-provided arguments) and start the server; then use your MCP-enabled client to call tools like triggering a build, listing projects, or querying queues, all backed by the TeamCity REST API with token-based authentication and redacted sensitive values in logs.

How to install

Prerequisites:

  • Node.js 20.x (LTS versions 20, 22, 24 tested)
  • Access to a TeamCity Server 2020.1+ with REST API and an authentication token

Install steps:

  1. Clone the repository git clone https://github.com/Daghis/teamcity-mcp.git cd teamcity-mcp

  2. Install dependencies npm install

  3. Configure environment (example): cp .env.example .env

    Edit .env to set TEAMCITY_URL and TEAMCITY_TOKEN, plus optional MCP_MODE

  4. Run in development mode npm run dev

  5. Run via npx (one-off) with required env vars (inline): TEAMCITY_URL="https://teamcity.example.com"
    TEAMCITY_TOKEN="<your_token>"
    MCP_MODE=dev
    npx -y @daghis/teamcity-mcp

  6. Alternatively, rely on a local .env file: npx -y @daghis/teamcity-mcp

Additional notes

Tips and common considerations:

  • Ensure TeamCity_URL and TEAMCITY_TOKEN are correctly set; token-based authentication is required for API access.
  • You can configure MCP_MODE to switch between Dev (default, ~14k tokens) and Full (~26k tokens) tool sets; runtime switching is supported in newer MCP clients.
  • If you encounter environment-variable merging issues on Windows with Claude Code, prefer using explicit CLI arguments for tool configuration.
  • The server uses a centralized environment validation (via Zod) and supports a variety of optional advanced TeamCity options (timeouts, retries, pagination, circuit breaker).
  • For security, avoid exposing tokens in process listings; prefer using a .env file or config-based invocation when possible.

Related MCP Servers

Sponsor this space

Reach thousands of developers