A TeamCity MCP connection is working, but your AI Agent can also see inherited projects or reach a signing workflow.
The fastest safe route is a controlled pilot: use security mode, a project-scoped identity, and read-only diagnostics first. Keep Brave Mode off for general production use, restrict write actions to a test project, and route Xcode signing to an isolated trusted Mac Agent Pool.
This week’s action: export the current roles and tokens, create one non-production test project, and run the acceptance checks below before allowing any production pipeline action.
01Who should use this acceptance guide
This guide is for engineering productivity leaders connecting Claude Code, Codex, Cursor, or another external Agent to TeamCity.
It is also for security owners reviewing MCP identity, permission inheritance, and audit evidence, plus platform teams managing Xcode build pools, signing nodes, and remote Mac capacity.
The conclusion is deliberately narrow: TeamCity 2026.2 MCP enterprise acceptance should begin as a restricted pilot, not as an unrestricted production control plane.
Last updated September 3, 2026. Version and MCP capability checks should be repeated against the TeamCity 2026.2 release notes, the MCP integration documentation, and the current upgrade notes before production approval.
02The permission matrix gives you the first release decision
TeamCity 2026.2 officially documents MCP tools for reading, creating, updating, and deleting Pipeline configurations. That capability split creates four different risk levels. A successful connection proves authentication, not safe authorization. Check the actual project and action permissions using the TeamCity roles and permissions documentation.
| Capability | Pilot decision | Production position | Required evidence |
|---|---|---|---|
| Read logs and build status | Allow first | Allow with project scope | The Agent sees only approved projects and cannot modify configuration |
| Trigger a personal or approved build | Allow with limits | Allow only for approved workflows | Build identity, branch restriction, queue behavior, and cancellation path are recorded |
| Create or update a Pipeline | Test project only | Delay until change control is proven | Before-and-after diff, approval record, version history, and rollback test |
| Delete a Pipeline or project configuration | Do not expose to a general Agent | Keep blocked unless separately approved | Explicit role review, deletion audit event, recovery procedure, and break-glass owner |
Can TeamCity 2026.2 MCP modify or delete a Pipeline by default?
Do not assume that MCP grants or denies these actions independently of TeamCity permissions. The official tool list confirms that read, create, update, and delete operations exist, while the effective result depends on the identity, project scope, and assigned permissions. Treat every write and delete tool as blocked until an access test proves the opposite in your environment.
A safe pilot therefore has three phases:
- Phase A: read-only diagnostics for approved projects.
- Phase B: controlled build triggers using a dedicated identity.
- Phase C: configuration writes in a sandbox, with deletion remaining blocked.
Do not allow a broad Agent identity to jump directly from Phase A to production Pipeline administration. The change is difficult to review when one token combines project discovery, build execution, configuration writing, and deletion.
03Acceptance reminder: “The MCP server connects” is not an acceptance result. The result must state which identity reached which project, which tool was called, what TeamCity changed, and how the action was reversed.
Platform engineering: define the MCP control plane boundary
The platform owner must document four separate permission layers:
- MCP control-plane authorization: how the external Agent obtains and uses access.
- TeamCity project permissions: which projects, builds, and configurations the identity can view or change.
- Build Agent permissions: what the selected worker can execute during a build.
- macOS local permissions: what the local account can read, modify, or access in Keychain and the filesystem.
These layers are related, but they are not interchangeable. A TeamCity identity with permission to trigger a build does not automatically need interactive access to the Mac host. Conversely, a privileged Mac account can undermine a carefully scoped TeamCity project if untrusted code is routed to that node.
The platform acceptance record should include:
- The MCP endpoint and authentication flow.
- The TeamCity user or service identity.
- Project and build configuration scope.
- Agent Pool and compatible build requirements.
- Branch and environment restrictions.
- Token storage and rotation ownership.
- The exact tools exposed to the external Agent.
- The emergency disable procedure.
TeamCity’s Agent communication guidance and Agent Pool configuration documentation should support the node-side review. Use them to verify that the worker selected for a build is part of the intended pool and is not an accidental fallback for sensitive jobs.
How do you restrict an AI Agent to one TeamCity project?
Start with a dedicated TeamCity identity that has no global administrator role. Grant only the project permissions needed for the pilot, then test a project outside the allowlist. Check parent-project inheritance as well as direct permissions. A project name restriction in the Agent prompt is not an access control.
The test must cover at least these paths:
- Allowed project: read an approved build log.
- Unapproved sibling project: attempt the same read.
- Parent project: inspect inherited visibility.
- Build configuration: attempt a permitted trigger.
- Pipeline settings: attempt an update when update permission is absent.
- Deletion: confirm that the tool fails and that the failure is logged.
Record both successful and denied requests. A security review that stores only successful screenshots cannot show whether the boundary is real.
04Security engineering: choose identity before choosing automation
Security should review OAuth PKCE, user tokens, and project-scoped restricted tokens as different control patterns.
OAuth PKCE is the preferred starting point for a user-driven approval flow.
It lets the authorization process bind the request to a verifier rather than relying only on a static client secret. Confirm the actual redirect URI, authorization screen, granted scopes, session lifetime, and revocation behavior. Follow the current TeamCity MCP integration documentation instead of assuming that every external client implements the flow identically.
A user token can be appropriate for a narrowly owned, interactive diagnostic workflow. It is less suitable when the team cannot explain who owns the token after the employee changes role or leaves the company.
A project-scoped restricted token is more appropriate for a service workflow that must operate inside a defined project boundary. Its scope still needs an actual access test. A token label or naming convention does not prove that inherited permissions are absent.
The security evidence package should contain:
- Authorization confirmation and granted scope.
- Token owner and business purpose.
- Expiration or rotation policy.
- Secret storage location.
- Revocation owner and response time target.
- List of projects visible to the identity.
- Results from allowed and denied access tests.
- Evidence that no administrator token is being reused.
Do not put a TeamCity administrator token into an Agent configuration simply because it makes the first demonstration easier. That shortcut removes the evidence needed for production approval.
Does Brave Mode fit a long-term enterprise production policy?
Use Brave Mode only for an isolated test project and a defined time window. The official MCP documentation describes a boundary between safer operation and more permissive behavior, but that boundary does not replace project permissions, code review, or release approval. Keep Brave Mode disabled for a general production Agent unless your security team has separately approved the exposure and monitoring.
The pilot should prove that closing Brave Mode, revoking the token, and ending the OAuth session actually prevents further Agent actions. Do not infer this from the user interface. Test it.
05Project ownership: separate read access from Pipeline writes
The project owner is responsible for proving that the Agent’s useful actions do not automatically include destructive actions.
Begin with diagnostic tasks. Ask the Agent to retrieve a failed build log, identify the failed step, and summarize the error. Then test a controlled build trigger on a non-production branch. Only after those actions are understood should you test Pipeline creation or update.
Configuration writes require a different evidence standard:
- Capture the configuration before the change.
- Capture the proposed diff.
- Record the approving person or system.
- Apply the change only in the sandbox project.
- Run a validation build.
- Restore the previous version.
- Confirm the restored configuration produces the expected result.
TeamCity’s permission model and REST permission reference provide the basis for mapping actions to roles. Your acceptance record must still use real requests. Documentation can confirm that a permission exists; it cannot prove that your parent-project inheritance, token scope, or external Agent behavior is configured correctly.
What should happen when the Agent tries to delete a Pipeline?
The request should be denied for the pilot identity, produce an observable audit event where supported, and leave the configuration unchanged. If the deletion succeeds, stop the pilot and remove the identity’s write access until the role and token model are redesigned.
The main advantages of separating these actions are clear:
- Read-only diagnosis has a smaller blast radius.
- Controlled triggers can be limited to known branches and pools.
- Configuration writes receive normal change review.
- Deletion stays behind a human-controlled break-glass process.
The disadvantages also need to be accepted:
- Engineers may need a manual step for unusual builds.
- Agent-generated fixes take longer to release.
- Project owners must maintain test configurations.
- Audit records require active review rather than passive collection.
For an enterprise team, these costs are preferable to allowing an Agent to combine diagnosis, execution, and irreversible administration.
06Mac platform engineering: keep signing outside the MCP trust boundary
MCP should be treated as a TeamCity control-plane entry point. It should not become a direct login channel to a production Mac, a Keychain reader, or an unrestricted shell.
Use separate Agent Pools for different trust levels:
- Diagnostic pool: safe logs, metadata, and non-sensitive checks.
- Untrusted-code validation pool: jobs that may execute code from branches or external contributions.
- Release build pool: reviewed source and controlled dependencies.
- Signing pool: fixed workflows, restricted credentials, and no general Agent access.
TeamCity’s Agent Pool configuration guidance should be used to verify pool membership and job routing. The acceptance test should prove that a diagnostic or untrusted job cannot silently fall back to the signing pool when the intended worker is unavailable.
How should an iOS build triggered by an AI Agent be isolated from a signing Mac?
Let the Agent trigger an approved TeamCity configuration, not a shell session on the signing host. Route ordinary diagnostics and untrusted validation to separate workers. Allow the signing pool to accept only a fixed Pipeline with reviewed source, controlled inputs, and the minimum credential access required for the release step.
A real Xcode test should inspect:
- The TeamCity job that the Agent can trigger.
- The Agent Pool selected by the job.
- The macOS account running the build.
- Keychain access during signing.
- Certificate and provisioning-profile flow.
- Build artifacts and log visibility.
- Behavior after a node restart.
- Behavior when the signing node is unavailable.
The last two items require testing in your environment. TeamCity documentation can describe Agent communication and configuration. It cannot prove your Mac account permissions, Keychain ACLs, recovery behavior, or credential flow.
For capacity planning, start with isolation rather than maximum utilization. A spare remote Mac used as a test Agent Pool can reveal routing, Xcode dependency, and restart problems before they affect a release queue. If the pilot passes, compare a dedicated Mac node with an elastic pool based on queue growth, signing frequency, and recovery requirements. Do not convert an unverified shared host into a signing node because the first build succeeded.
You can review VpsMesh remote Mac options when you need a separate downstream test node. The relevant question is not only whether the Mac can run Xcode. It is whether the node can be placed in the intended TeamCity pool and tested without exposing production signing credentials.
07Operations: prove that failure can be stopped
The operations owner needs a stop procedure that works while an Agent is active. Test each control independently:
- Revoke the project token.
- End the OAuth session.
- Disable Brave Mode.
- Cancel an active build.
- Remove the Agent from the permitted pool.
- Confirm that no new build starts.
- Compare TeamCity configuration with the approved version.
- Restore service through the documented manual path.
The sequence is an operational test plan, not a claim about automatic recovery. Measure the observed result in your environment and attach the logs.
Review high-frequency REST activity, repeated build triggers, unexpected configuration changes, and deletion attempts. TeamCity’s user action tracking documentation is the starting point for identifying recorded actions. Add request monitoring where your deployment supports it.
The audit record should answer five questions:
- Who authorized the Agent?
- Which TeamCity identity made the request?
- Which project and configuration were affected?
- What changed or executed?
- Who approved, reversed, or stopped it?
A useful failure drill includes a revoked token, an unavailable Mac node, and a deliberately invalid Pipeline change. The target is not an impressive recovery claim. The target is a reproducible record showing what stopped, what continued, and how the approved configuration was restored.
08Operational boundary: If you cannot distinguish an Agent action from a human action in the audit trail, keep the integration in the pilot tier. Attribution is required for incident review and access renewal.
Management review: turn evidence into a release tier
The technical director should not approve “MCP enabled” as a single binary state. Use three outcomes:
- Approved for restricted pilot: read-only diagnostics and narrowly controlled triggers pass. Write and delete actions remain blocked.
- Limited production: approved projects and fixed Pipelines pass permission, audit, and Mac isolation tests. Configuration writes remain subject to change control.
- Deferred: any denied-access test fails, audit attribution is incomplete, Brave Mode cannot be controlled, or signing credentials are reachable from an untrusted route.
A production expansion should require all of the following:
- The external Agent uses a dedicated identity.
- Project visibility is narrower than the user’s normal administrator access.
- OAuth PKCE or an equivalent approved authorization path is verified.
- Token ownership, storage, expiry, and revocation are documented.
- Brave Mode is disabled by default or restricted to an approved isolated scope.
- Read, trigger, update, and delete behavior are tested separately.
- Xcode signing is routed to an isolated trusted pool.
- Build Agent and macOS account permissions are independently reviewed.
- Audit records identify the actor and affected configuration.
- A manual stop and recovery procedure has passed an exercise.
After these checks, convert workload growth into a Mac capacity decision. More Agent-triggered builds may require a dedicated build pool, while sensitive releases may require a separate signing node. Review Mac mini rental pricing only after the isolation model is clear. Hardware quantity should follow approved workload and trust boundaries, not the number of MCP demonstrations.
09Current setup versus a remote Mac pilot
Many teams begin with a developer-owned Mac or one shared office Mac. That approach can work for a small test, but it creates practical weaknesses when an Agent becomes part of the workflow:
- The host may mix personal development, CI jobs, and signing credentials.
- Capacity is tied to one physical location and one owner.
- Permission changes are often local-account changes rather than centrally reviewed TeamCity actions.
- A failed or rebooted machine can block the only available Xcode path.
- Reproducing the same node state for an audit is difficult.
Renting a separate remote Mac through VpsMesh can provide a cleaner pilot boundary: a dedicated downstream node, a defined rental period, and access through the service’s remote administration methods. It does not remove the need for TeamCity permissions, Keychain controls, or evidence collection. It gives you a more deliberate place to test Agent Pool routing, node restart behavior, and a real Xcode project without placing the experiment on a developer’s workstation.
If you need a short-lived validation environment, start with one isolated remote Mac and keep signing credentials out of the first test. After the route, permissions, and recovery checks pass, decide whether the workload justifies a longer-term build pool or a dedicated signing node. For a stable, heavy workload that needs guaranteed physical interfaces or direct local hardware control, purchasing and operating your own Mac may still be the better fit.
For an enterprise acceptance decision, the sensible order is simple: restrict the Agent, prove the TeamCity boundary, isolate the Mac pool, then expand. Use VpsMesh’s Mac ordering option only when the test plan identifies a real need for an additional node rather than treating rental as a substitute for access governance.