Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
Model Context Protocol (MCP) server for JetBrains TeamCity: control builds, tests, agents and configs from AI coding assistants.
Jump to setup instructionsNo tool list is on record. This does not mean the server has no tools. Tools were not run.
No setup evidence yet No matching config or report on record. This does not mean the server is incompatible.
Fetched from the repository for this visit.
A Model Control Protocol (MCP) server that bridges AI coding assistants with JetBrains TeamCity CI/CD server, exposing TeamCity operations as MCP tools.
[!WARNING] This project is no longer maintained (November 2026). It still works and the published npm package stays installable, but there will be no further development, bug fixes, or releases, and new issues and pull requests won't be reviewed. Security fixes are not guaranteed.
For new setups, use JetBrains' official tooling instead:
- TeamCity CLI (
npm install -g @jetbrains/teamcity-cli): works with TeamCity 2020.1+ (including Cloud), ships an agent skill for Claude Code, Cursor, and others, and covers more than this project's Full mode.- TeamCity MCP: built into TeamCity 2026.1+ at
<server-url>/app/mcp.Where they don't yet fit: the built-in MCP needs TeamCity 2026.1 or later, and its tools are mostly generic REST calls. You can connect to it with an access token from your own profile, but changing its mode is a server setting that needs an administrator. If you're on an older server, or depend on task-shaped tools here such as
wait_for_build, test-failure analysis, or the Dev/Full mode write controls, this project may still be useful as is. It's MIT-licensed, so fork it if you want to carry it forward. See How this compares to JetBrains' official tooling for details.
The TeamCity MCP Server allows developers using AI-powered coding assistants (Claude Code, Cursor, Windsurf) to interact with TeamCity directly from their development environment via MCP tools.
Upgrading from 1.x? Version 2.0.0 moved 15 tools from Dev to Full mode, including queue management, agent compatibility checks, and server health monitoring. If you relied on these tools in Dev mode, switch to
MCP_MODE=fullor use runtime mode switching (v2.1.0+). See CHANGELOG.md for details.
Dev Mode (default): Safe CI/CD operations (31 tools, ~14k context tokens)
Full Mode: Complete infrastructure management (87 tools, ~26k context tokens)
Runtime Mode Switching (v2.1.0+): Switch between modes at runtime using the get_mcp_mode and set_mcp_mode tools—no restart required. MCP clients that support notifications will see the tool list update automatically.
Extra tools in Dev mode: To use a few Full-mode tools without switching to Full mode, list them in MCP_EXTRA_TOOLS (comma-separated), e.g. MCP_EXTRA_TOOLS=move_queued_build_to_top,reorder_queued_builds. Unknown names are logged as a warning at startup. Full mode is not affected.
See the Tools Mode Matrix for the complete list of 97 tools and their availability by mode.
As of October 2026 (TeamCity 2026.2, TeamCity CLI 1.6), JetBrains ships two first-party paths for AI agents, both generally available and officially supported:
<server-url>/app/mcp, so there's nothing to install. It's a deliberately small toolset: build logs, generic REST API GET/POST passthrough tools, and (since 2026.2) pipeline tools. By default it runs in a safe mode where the agent can read and queue personal builds; an opt-in "brave mode" lets it send arbitrary REST POST requests and edit or delete pipelines. Since 2026.2 you can also sign in with OAuth instead of pasting an access token.teamcity command (TeamCity 2020.1+) with an installable agent skill (teamcity skill install) for Claude Code, Cursor, and other agents. It covers runs, logs, tests, the queue, agents, pools, projects, VCS roots, parameters, and pipelines, falls back to raw REST access via teamcity api, and has a read-only mode (TEAMCITY_RO=1). JetBrains' own docs describe it as the broader of the two options.teamcity-mcp predates that tooling and overlaps with it heavily. The official tooling is the better default today. What teamcity-mcp still offers is narrower than it used to be:
PUT/DELETE (such as enabling agents or deleting parameters), which the built-in MCP's generic GET/POST tools don't reach.JetBrains' tooling is evolving quickly, so rather than pin down a feature-by-feature comparison here (it would go stale fast), check the current docs and pick what fits:
If you're comfortable with JetBrains' CLI, you may not need this project at all. This project is no longer maintained, but it stays MIT-licensed and installable for whatever the built-ins don't yet reach. Fork it if you want to take it further yourself.
# Clone the repository
git clone https://github.com/Daghis/teamcity-mcp.git
cd teamcity-mcp
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your TeamCity URL and token
# Run in development mode
npm run dev
Run the MCP server via npx (requires Node 20.x). Set your TeamCity environment variables inline or via a .env in the working directory.
# One-off run (inline envs)
TEAMCITY_URL="https://teamcity.example.com" \
TEAMCITY_TOKEN="<your_token>" \
MCP_MODE=dev \
npx -y @daghis/teamcity-mcp
# Or rely on .env in the current directory
npx -y @daghis/teamcity-mcp
.env for configuration):
claude mcp add teamcity -- npx -y @daghis/teamcity-mcpclaude mcp add teamcity -e TEAMCITY_URL="https://teamcity.example.com" -e TEAMCITY_TOKEN="tc_<your_token>" -- npx -y @daghis/teamcity-mcpclaude mcp add teamcity -- npx -y @daghis/teamcity-mcp --url "https://teamcity.example.com" --token "tc_<your_token>" --mode dev-s user to install user-wide instead of project-scoped (default)MCP_MODE=full): ~26k tokens for MCP toolsOn Windows, Claude Code's MCP configuration may not properly merge environment variables. Use CLI arguments as a workaround:
{
"mcpServers": {
"teamcity": {
"command": "npx",
"args": [
"-y",
"@daghis/teamcity-mcp",
"--url",
"https://teamcity.example.com",
"--token",
"YOUR_TOKEN"
]
}
}
}
Or use a config file for better security (token not visible in process list):
{
"mcpServers": {
"teamcity": {
"command": "npx",
"args": ["-y", "@daghis/teamcity-mcp", "--config", "C:\\path\\to\\teamcity.env"]
}
}
}
Environment is validated centrally with Zod. Supported variables and defaults:
# Server Configuration
PORT=3000
NODE_ENV=development
LOG_LEVEL=info
# TeamCity Configuration (aliases supported)
TEAMCITY_URL=https://teamcity.example.com
TEAMCITY_TOKEN=your-auth-token
# Optional aliases:
# TEAMCITY_SERVER_URL=...
# TEAMCITY_API_TOKEN=...
# MCP Mode (dev or full)
MCP_MODE=dev
# Full-mode tools to add in dev mode (comma-separated, optional)
# MCP_EXTRA_TOOLS=move_queued_build_to_top,reorder_queued_builds
# Optional advanced TeamCity options (defaults shown)
# Connection
# TEAMCITY_TIMEOUT=30000
# TEAMCITY_MAX_CONCURRENT=10
# TEAMCITY_KEEP_ALIVE=true
# TEAMCITY_COMPRESSION=true
# Extra headers attached to every TeamCity request — useful when TeamCity
# sits behind a reverse proxy that gates access on custom headers (e.g.
# Cloudflare Zero Trust service tokens). One env var per header; the part
# after `TEAMCITY_HEADER_` is used verbatim as the HTTP header name.
# Example (note the literal hyphens — most shells need quoting):
# TEAMCITY_HEADER_CF-Access-Client-Id=<id>
# TEAMCITY_HEADER_CF-Access-Client-Secret=<secret>
# Retry
# TEAMCITY_RETRY_ENABLED=true
# TEAMCITY_MAX_RETRIES=3
# TEAMCITY_RETRY_DELAY=1000
# TEAMCITY_MAX_RETRY_DELAY=30000
# Pagination
# TEAMCITY_PAGE_SIZE=100
# TEAMCITY_MAX_PAGE_SIZE=1000
# TEAMCITY_AUTO_FETCH_ALL=false
# Circuit Breaker
# TEAMCITY_CIRCUIT_BREAKER=true
# TEAMCITY_CB_FAILURE_THRESHOLD=5
# TEAMCITY_CB_RESET_TIMEOUT=60000
# TEAMCITY_CB_SUCCESS_THRESHOLD=2
These values are normalized in src/config/index.ts and consumed by src/teamcity/config.ts via helper getters.
Once integrated with your AI coding assistant:
"Build the frontend on feature branch"
"Why did last night's tests fail?"
"Deploy staging with the latest build"
"Create a new build config for the mobile app"
content[0].text contains a JSON string. Example shape:
{ "items": [...], "pagination": { "page": 1, "pageSize": 100 } } or { "items": [...], "pagination": { "mode": "all", "pageSize": 100, "fetched": 250 } }.pageSize, maxPages, and all:
pageSize controls items per page.all: true fetches multiple pages up to maxPages.count on list_builds is kept for compatibility but pageSize is preferred.success: false and error.code = VALIDATION_ERROR.import { TeamCityAPI } from '@/api-client';
// Get the API client instance
const api = TeamCityAPI.getInstance();
// List projects
const projects = await api.listProjects();
// Get build status
const build = await api.getBuild('BuildId123');
// Trigger a new build
const newBuild = await api.triggerBuild('BuildConfigId', {
branchName: 'main',
});
Note: The legacy helpers exported from
src/teamcity/index.tsremain only for compatibility and include placeholder implementations. Prefer the MCP tools (see the reference linked above) or theTeamCityAPIshown here when automating workflows.
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Lint code
npm run lint
# Format code
npm run format
# Type check
npm run typecheck
# Build for production
npm run build
# Analyze bundle for Codecov
npm run build:bundle
The CI workflow runs npm run build:bundle and uploads the generated coverage/bundles JSON using codecov/codecov-action with the javascript-bundle plugin.
teamcity-mcp/
├── src/ # Source code
│ ├── tools.ts # All 87 MCP tool definitions
│ ├── server.ts # MCP server setup
│ ├── api-client.ts # TeamCity API singleton
│ ├── config/ # Configuration with Zod validation
│ ├── teamcity/ # Domain logic (build, agent, config managers)
│ ├── teamcity-client/ # Auto-generated OpenAPI client
│ ├── types/ # TypeScript type definitions
│ └── utils/ # Logger, MCP helpers, pagination
├── tests/ # Unit and integration tests
├── docs/ # Documentation
└── scripts/ # Build and maintenance scripts
The MCP server exposes tools for TeamCity operations. Each tool corresponds to specific TeamCity REST API endpoints:
TriggerBuild - Queue a new buildGetBuildStatus - Check build progressFetchBuildLog - Retrieve build logsListBuilds - Search builds by criteriaListTestFailures - Get failing testsGetTestDetails - Detailed test informationAnalyzeBuildProblems - Identify failure reasonscreate_build_config - Create new TeamCity build configurations with full support for:
clone_build_config - Duplicate existing configurations into any project, preserving steps, triggers, and parameters.update_build_config - Adjust names, descriptions, artifact rules, and pause state for a configuration.manage_build_steps - Add, update, remove, or reorder build steps through a single tool surface.manage_build_triggers - Add or delete build triggers with full property support.create_vcs_root & add_vcs_root_to_build - Define VCS roots and attach them to build configurations.See also: docs/TEAMCITY_MCP_TOOLS_GUIDE.md for expanded workflows and examples that align with the current MCP implementation.
This project is no longer maintained, and new issues and pull requests won't be reviewed. If you want to change it, please fork it. CONTRIBUTING.md still documents the conventions the codebase follows, which may help if you do.
TEAMCITY_TOKEN via environment variable or config file (see .env.example); never commit real tokensThis repository has GitHub secret scanning and push protection enabled. See SECURITY.md for vulnerability reporting.
This project is no longer maintained, so there is no active support. The docs/ folder in this repository still describes how everything works. For a supported option, see JetBrains' TeamCity CLI and the TeamCity MCP built into TeamCity 2026.1+.
Built with ❤️ for developers who love efficient CI/CD workflows
Loading reviews...
GitHub checked 1084h ago - refresh overdue. Recently viewed repositories target hourly refresh.
Find a documented setup for your client. No sign-in, installation, or tool execution.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.