MCP Directory

How to add TeamCity MCP Server to Cursor

Control JetBrains TeamCity CI/CD — builds, tests, agents, and configs — from AI coding assistants. Paste the config into ~/.cursor/mcp.json and restart Cursor.

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

Cursor 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 Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
  2. 2Paste the TeamCity MCP Server config below into the "mcpServers" object.
  3. 3Fill in placeholder secrets, then save.
  4. 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
  5. 5Ask Cursor to use one of TeamCity MCP Server's tools to confirm it's connected.

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 Cursor

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 + Cursor FAQ

Where is the Cursor config file?

Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the TeamCity MCP Server config there under the "mcpServers" key and restart the client.

Is TeamCity MCP Server safe to use with Cursor?

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