You can almost hear the sigh from that build engineer watching yet another script crawl through the CI pipeline. TeamCity is solid, but its automation story gets messy once custom agents, artifacts, and external systems come into play. That’s where TeamCity XML-RPC quietly shines — a protocol you can wire up to control builds, query results, or trigger deployments from anywhere, with far less glue code.
TeamCity XML-RPC is JetBrains’ remote procedure call interface. It lets your own systems speak directly to TeamCity without relying on brittle webhook logic or ad hoc API wrappers. Think of it as structured remote control: access methods to start builds, read statuses, and pull artifacts over plain XML requests. The setup is simple but requires clear thinking about identities and permissions before you start automating.
Here’s how it works conceptually. Each XML-RPC call runs under a TeamCity user identity, which maps to roles that define build management rights. Rather than embedding passwords in scripts, configure tokens and restrict them with something like AWS IAM conditions or OIDC scopes. A correct mapping flow means your CI tool can talk to TeamCity without exposing credentials or expanding privileges. Done right, this feels more like orchestration than hacking API endpoints.
Before you wire it all together, check three common pitfalls:
- Mixing user-level and service-level tokens causes confusing permissions errors.
- XML serialization mismatches can create “valid” requests that still fail silently.
- Forgetting SSL or endpoint isolation turns an otherwise sturdy workflow into a security hole.
Use proper secret rotation rather than static keys. Tie service accounts to specific build configurations. Audit all RPC traffic like any other external endpoint. You’ll end up with a pipeline that’s both predictable and compliant with SOC 2 or internal governance rules.
Here’s the quick answer most engineers search: