MCP Directory

How to add TeamCity MCP Server to Windsurf

Control JetBrains TeamCity CI/CD — builds, tests, agents, and configs — from AI coding assistants. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 25 · stdio · apikey

Windsurf config for TeamCity MCP Server

npx -y @daghis/teamcity-mcp
{
  "mcpServers": {
    "teamcity-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@daghis/teamcity-mcp"
      ],
      "env": {
        "TEAMCITY_URL": "https://teamcity.example.com",
        "TEAMCITY_TOKEN": "tc_<your_token>",
        "MCP_MODE": "dev"
      }
    }
  }
}

Setup steps

  1. 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the TeamCity MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5TeamCity MCP Server's tools become available to Cascade.

Before you start

  • Node.js >= 20.10.0 (LTS 20, 22, 24 tested in CI)
  • TeamCity Server 2020.1+ with REST API access
  • A TeamCity authentication token

What TeamCity MCP Server can do in Windsurf

TriggerBuild

Queue a new build.

GetBuildStatus

Check build progress.

FetchBuildLog

Retrieve build logs.

ListBuilds

Search builds by criteria.

ListTestFailures

Get failing tests.

GetTestDetails

Detailed test information.

AnalyzeBuildProblems

Identify failure reasons.

create_build_config

Create new TeamCity build configurations with full support for VCS roots (Git, SVN, Perforce), build steps (script, Maven, Gradle, npm, Docker, PowerShell), triggers, and parameters. Full mode only.

Security

Token-based authentication only (no username/password); use a token with minimal required permissions — read-only tokens work for most Dev mode operations. Logs redact sensitive values including tokens. Prefer Dev mode unless Full mode is explicitly needed, since Full mode enables destructive operations (project deletion, agent management). AI assistants can be manipulated via prompt injection embedded in build logs or test output; Dev mode's limited tool set reduces the blast radius. All actions appear in TeamCity's audit log under the token's user. Always use HTTPS for TeamCity connections.

TeamCity MCP Server + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the TeamCity MCP Server config there under the "mcpServers" key and restart the client.

Is TeamCity MCP Server safe to use with Windsurf?

Token-based authentication only (no username/password); use a token with minimal required permissions — read-only tokens work for most Dev mode operations. Logs redact sensitive values including tokens. Prefer Dev mode unless Full mode is explicitly needed, since Full mode enables destructive operations (project deletion, agent management). AI assistants can be manipulated via prompt injection embedded in build logs or test output; Dev mode's limited tool set reduces the blast radius. All actions appear in TeamCity's audit log under the token's user. Always use HTTPS for TeamCity connections.

How do I add it to Claude Code?

Run `claude mcp add teamcity -- npx -y @daghis/teamcity-mcp` (relying on a .env file), or pass env vars inline with `-e TEAMCITY_URL=... -e TEAMCITY_TOKEN=...`. Add `-s user` to install user-wide instead of project-scoped.

What is the difference between Dev mode and Full mode?

Dev mode (default) exposes 31 safe CI/CD tools (~14k context tokens) for triggering/monitoring builds and reading data. Full mode exposes all 87 tools (~26k tokens), adding build-config CRUD, VCS/agent management, parameter CRUD, queue management, and server administration. Set MCP_MODE=full, or switch at runtime with set_mcp_mode (v2.1.0+).

Does it work with older TeamCity servers?

Yes. It supports TeamCity Server 2020.1+ with REST API access, and is a recommended option for servers older than 2026.1 (which ships a more limited built-in MCP endpoint).

View repo Full TeamCity MCP Server page