Skip to content

TeamCity MCP Plugin

A TeamCity plugin that turns a TeamCity server into a Model Context Protocol (MCP) server, so AI agents — Claude, Junie, Gemini, OpenAI Codex, and any other MCP-compatible client — can read build state, inspect logs, run REST API calls, and manage pipelines on your behalf.

The plugin exposes a streamable-http MCP endpoint at https://<your-teamcity>/app/mcp on the TeamCity server. It implements MCP protocol version 2025-11-25 and also accepts 2025-06-18.

MCP capabilities

The plugin exposes the following capabilities to connected AI agents over MCP:

  • REST API accessteamcity_rest_get, teamcity_rest_post, teamcity_rest_put, teamcity_rest_delete tools wrap the full TeamCity REST API.
  • Build logsteamcity_build_log tool retrieves and paginates build logs.
  • Pipeline management — read, create, and delete TeamCity pipelines.
  • Operation modes:
    • Safe (default) — read-only and curated, safe-by-default write paths.
    • Brave — full read/write access, including DELETE and arbitrary POST.
  • Auth-aware — supports TeamCity bearer tokens and 2FA-equipped accounts.

Requirements

  • TeamCity server 2026.1 or later.
  • JDK 17+ on the TeamCity server (the plugin runs in TeamCity's JVM).
  • An MCP-compatible client (Claude Code, Junie, the official MCP CLI, etc.).

Installation

  1. Download the latest mcp.zip from Releases (or build it yourself — see Building from source).
  2. In TeamCity, go to Administration → Plugins → Upload plugin zip and upload mcp.zip.
  3. Enable the plugin and restart the TeamCity server (the plugin descriptor declares allow-runtime-reload="true", but a restart is recommended on first install).
  4. Verify by visiting https://<your-teamcity>/app/mcp — you should see an MCP transport response.

Configuration

Configuration is done via TeamCity internal properties (<DATA_DIR>/config/internal.properties):

Property Default Description
teamcity.ai.mcp.enabled true Master switch for the MCP server.
teamcity.ai.mcp.braveMode.enabled false Enable destructive operations (PUT, DELETE, arbitrary POST).
teamcity.ai.mcp.pipeline.enabled true Enable pipeline tools.

Connecting an AI agent

The MCP endpoint is https://<your-teamcity>/app/mcp and requires a TeamCity bearer token in the Authorization: Bearer <token> header. Generate a token under Profile → Access Tokens in TeamCity.

Claude Code

claude mcp add --transport http teamcity \
  https://teamcity.example.com/app/mcp \
  --header "Authorization: Bearer <your-token>"

Other MCP clients

The endpoint speaks the standard MCP streamable-http transport, so any compliant client works. Point it at /app/mcp and supply the bearer token.

Building from source

Note: The build pulls TeamCity SDK artifacts from a JetBrains Maven repository that currently requires credentials. See CONTRIBUTING.md for setup details if you hit auth errors.

./gradlew serverPlugin

The plugin zip lands in build/distributions/mcp.zip.

To run the full integration + e2e suite against a fresh TeamCity instance:

TC_DIST=~/Downloads/TeamCity-2026.1.tar.gz ./run_integration_tests.sh

Contributing

We welcome contributions — bug reports, feature requests, questions, and pull requests are all tracked on the GitHub issue tracker. See CONTRIBUTING.md for development setup and the PR process, and CODE_OF_CONDUCT.md for community standards.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages