TeamCity CI/CD

io.github.desty2k由 GitHub 账号 desty2k 发布v1.0.1更新于 Nov 3, 2026

用于 JetBrains TeamCity 的只读 MCP 服务器——构建、配置、日志、测试、代理

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

Read-only MCP server for JetBrains TeamCity — builds, configs, logs, tests, agents

已验证STDIO仅桌面开发者工具

概览

TeamCity CI/CD 的本地 MCP 服务;无需登录;STDIO。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

安装

在 SourceWeft 中

  1. 打开 控制台中的 TeamCity CI/CD,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

readonly-mcp-teamcity

[CI] [PyPI] [Python] [License: MIT]

A read-only Model Context Protocol (MCP) server that lets AI agents explore a JetBrains TeamCity server: projects, build configurations, builds, logs, test results, problems, the queue, agents, and VCS changes. 29 tools, all of them reads.

Quick start

With uv installed, there is nothing else to install:

bash
claude mcp add teamcity \  -e TEAMCITY_BASE_URL=https://teamcity.example.com \  -e TEAMCITY_TOKEN=your-token \  -- uvx readonly-mcp-teamcity

uvx downloads the package into a cached, isolated environment and runs it. Python 3.11 or newer.

Read-only by design. This server only ever issues GET requests (a test fails if the HTTP client gains any other method). It cannot trigger, cancel, pin, tag, or modify anything in TeamCity, and every tool is annotated readOnlyHint. Scope the token read-only on the TeamCity side as a second line of defense: see Token. Read the post about this server and why I build read-only MCP servers.

Token

Create a token under Profile → Access Tokens. Set Permissions scope to Limit per project, pick the root project (or the projects the agent should see), and choose the Read-only preset. A token scoped that way cannot change anything even if a client misbehaves.

The Read-only preset selects the 14 VIEW_* permissions TeamCity marks as read-only, including global ones for agent details and server settings. A token never gets more than its owner has: with a token from a user who has only the Project viewer role, agent tools still work, and get_server_health reports metrics as unavailable but still returns health items. Checked against TeamCity 2026.2.1, where a preset token could not pin a build (HTTP 403).

Tools

Projects

ToolDescription
search_projectsSearch projects by name, ID, or parent; browse the hierarchy.
get_project_detailsFull project: child projects, build configs, parameters.

Build configurations

ToolDescription
search_build_configsStructured search by project ID, build type ID, or paused state.
find_build_configFuzzy search across config names and project paths; flags ambiguous matches and lists matching projects.
get_build_config_detailsSteps, triggers, parameters, VCS roots, settings, agent requirements.
get_build_config_branchesBranches a configuration can build, with default/active status.

Builds

ToolDescription
search_buildsSearch build history filtered by config, project, status, branch, date, etc.
get_build_detailsOne build: status, agent, revisions, parameters, dependencies, test summary, tags.
get_build_statisticsNumeric metrics: durations, test counts, coverage, artifact size.
get_build_chainSnapshot-dependency chain upstream (depends-on) and downstream (dependents).

Logs

ToolDescription
get_build_logPaginated log retrieval with tail and line-range support.
search_build_logFull-text search within a build log, with surrounding context.

Tests & problems

ToolDescription
diagnose_buildWhy a build failed, in one call: problems, failed tests (unmuted first) and the error lines of the log.
get_build_test_resultsTest occurrences for a build, filterable by status.
get_test_detailsOne test occurrence: failure reason, history brackets, mute/investigation state.
get_build_problemsStructured failure reasons (compilation, exit code, dependency).
search_investigationsActive investigations by project, build config, or assignee.
list_muted_testsCurrently muted tests with scope, who muted them, and why.

Infrastructure

ToolDescription
get_build_queueBuilds waiting for an agent, with wait reasons.
search_agentsBuild agents with connection/authorization/enabled state and current build.
list_agent_poolsAgent pools with agent and project counts.
get_agent_detailsOne agent's state with enabled/authorized comments, last activity, current build.
list_build_artifactsBrowse a build's artifact tree (one directory level).
get_build_artifact_contentRead a text artifact (size-capped, line-paginated).
search_changesVCS changes (commits) by build, config, project, committer, or since-commit.
get_change_detailsOne change with its full modified-file list.
resolve_teamcity_urlParse a TeamCity web URL into project / build-config / build / change IDs.
get_server_infoTeamCity version, build number, and uptime.
get_server_healthServer health items + runtime metrics (CPU, memory, queue).

Install

Run it without installing (recommended):

bash
uvx readonly-mcp-teamcity

Or install it into an environment:

bash
uv tool install readonly-mcp-teamcity   # or: pip install readonly-mcp-teamcity

Docker

The image serves the streamable HTTP transport on port 8080. That transport has no authentication, so publish it on the host's loopback only:

bash
docker run --rm \  -e TEAMCITY_BASE_URL=https://teamcity.example.com \  -e TEAMCITY_TOKEN=your-token \  -p 127.0.0.1:8080:8080 \  ghcr.io/desty2k/readonly-mcp-teamcity:latest

Configuration

All configuration comes from TEAMCITY_* environment variables.

VariableRequiredDefaultDescription
TEAMCITY_BASE_URLyes—TeamCity server base URL (e.g. https://teamcity.example.com).
TEAMCITY_TOKENyes—REST API bearer token. See Token.
TEAMCITY_TIMEOUTno30HTTP request timeout (seconds).
TEAMCITY_MAX_RETRIESno3Retries for transient network / 5xx errors.
TEAMCITY_POOL_MAX_CONNECTIONSno20httpx connection-pool size.
TEAMCITY_DEFAULT_LIMITno50Default page size for list tools.
TEAMCITY_MAX_LIMITno500Maximum page size.
TEAMCITY_INDEX_REFRESH_INTERVALno300Seconds between fuzzy-index refreshes. A failed load is retried sooner.
TEAMCITY_LOG_CACHE_MAX_BYTESno67108864Size cap of the build-log cache. Logs of running builds are never cached.
TEAMCITY_LOG_CACHE_TTLno300Seconds a finished build's log stays cached.
TEAMCITY_TRANSPORTnostdiostdio, http, or sse.
TEAMCITY_HTTP_HOSTno127.0.0.1Bind address for http/sse. These transports have no authentication; a non-loopback address logs a warning.
TEAMCITY_HTTP_PORTno8080Port for the http/sse transports.
TEAMCITY_LOG_FORMATnojsonjson (production) or text (local dev).
TEAMCITY_LOG_LEVELnoINFODEBUG, INFO, WARNING, or ERROR.

See .env.example for a copy-paste template.

OpenTelemetry tracing

Tracing is opt-in and a no-op when disabled. The base install carries no OTel SDK; install the extra and enable it to export spans for each upstream TeamCity call:

bash
pip install 'readonly-mcp-teamcity[otel]'export TEAMCITY_OTEL_ENABLED=trueexport TEAMCITY_OTEL_ENDPOINT=http://localhost:4317   # optional; falls back to OTEL_EXPORTER_OTLP_ENDPOINT
VariableDefaultDescription
TEAMCITY_OTEL_ENABLEDfalseMaster switch for tracing.
TEAMCITY_OTEL_SERVICE_NAMEreadonly-mcp-teamcityservice.name on every span.
TEAMCITY_OTEL_ENDPOINTunsetOTLP collector endpoint.
TEAMCITY_OTEL_PROTOCOLgrpcgrpc or http/protobuf.
TEAMCITY_OTEL_CONSOLE_EXPORTfalseAlso print spans to stderr.

MCP client configuration

Claude Desktop

Add to claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows):

json
{  "mcpServers": {    "teamcity": {      "command": "uvx",      "args": ["readonly-mcp-teamcity"],      "env": {        "TEAMCITY_BASE_URL": "https://teamcity.example.com",        "TEAMCITY_TOKEN": "your-token"      }    }  }}

Claude Code

See Quick start.

How it compares

As of November 2026. Check the projects themselves before relying on this.

This serverJetBrains MCP (2026.1+)Daghis 2.12.12itcaat 1.0.8kate-horshchar 1.4.0
Writesnone, by constructionpersonal builds in the default safe mode; more with brave modetrigger and cancel by default; a full mode the agent can switch ontrigger, cancel, pin, tag; no off switchnone, GET only
Runs whereyour machinethe TeamCity server (/app/mcp)your machineyour machineyour machine
Find a config from a vague namefuzzy index over names and project pathsnot documentedlocator onlylocator partial matchno
Paste a TeamCity URLmodern, short and legacy URLsnot documentednonono

Sources: JetBrains AI agent integration, JetBrains/teamcity-mcp, Daghis/teamcity-mcp, itcaat/teamcity-mcp, kate-horshchar/teamcity-qa-mcp. The JetBrains plugin README and its help page disagree on whether brave mode is on by default; check your server's setting.

Use the built-in server if you want an agent to act on TeamCity. Use this one when the agent should only look.

Example questions

  • "Find the deploy pipeline for the auth service."
  • "Show me the last 10 builds for Proj_Build and which failed."
  • "Why did build 12345 fail?" (one diagnose_build call)
  • "What tests failed in that build, and what was the error?"
  • "Search the build log for OutOfMemoryError."
  • "Which agents are offline right now?"
  • "What's in the build queue and why is it waiting?"
  • "Who is investigating the failures in the Payments project?"
  • "What commits went into this build?"
  • "Resolve https://teamcity.example.com/buildConfiguration/Proj_Build/12345."

Development

bash
git clone https://github.com/desty2k/readonly-mcp-teamcitycd readonly-mcp-teamcityuv sync --all-extrasuv run pytest --covuv run ruff check .uv run ruff format --check .

A live smoke test against a real server (reads credentials from .env):

bash
uv run python tests/smoke_test.py

License

MIT — see LICENSE.

来源:README.md,提交 a271610

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.1最新Nov 3, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分