Give AI coding agents private, scoped access to Jira and Confluence MCP servers, then revoke one agent without interrupting unrelated workloads.

Give each coding agent its own identity, then enforce access in two places: the private connection to the MCP server and the authorization check inside the server. Scope the identity to named Jira projects, Confluence spaces, tools, actions, and argument limits.

Revoke the identity or its policy when the task ends. Do not rely on a shared API key, a hidden tool list, or an access token’s expiry.

That separation matters. Reaching an MCP server answers “can this workload connect?” It does not answer “can this agent edit Jira project PAY or read the incident space in Confluence?” The second question belongs to authorization at the tool and backend boundary.

The control model: identity, reachability, authorization

The safest design has three independent decisions. Identity identifies the agent, the employee or workload that delegated the task, and the MCP server. Reachability determines whether a network path exists. Authorization decides which operation may run after the request arrives.

LayerDecisionExample for a coding agentFailure result
Workload identityWhich agent is calling?codex-payments-readNo authenticated principal
Private reachabilityMay this identity reach the MCP service?Jira and Confluence MCP endpoints onlyNo route or connection
MCP authorizationWhich tool and arguments are allowed?Read issues in PAY, no issue transitions403 Forbidden
Backend permissionWhat may Jira or Confluence actually do?Jira browse in one project, Confluence view in one spaceDownstream denial

The layers should agree, but they should not collapse into one broad credential. MCP authorization defines transport authorization for HTTP-based MCP servers. It requires the server to validate tokens for the intended resource and distinguishes an invalid token from insufficient permission. That is authentication and resource authorization, not a complete Jira or Confluence policy.

For private connectivity, NetFoundry’s AI access governance describes a model where each agent, model, and MCP server has a cryptographic identity, and policy authorizes a connection before a routable path exists. That is the network control. Keep the application control inside the MCP server.

Give each agent a revocable workload identity

An AI coding agent should not inherit a developer’s long-lived personal token or share one service account with every repository and automation job. Issue a distinct identity for the agent instance, project, or bounded task. The right unit depends on how you need to audit and revoke access, but the identity must be narrower than “all engineering automation.”

Record the delegation separately from the workload identity. For example, an employee may authorize an agent to inspect a release failure, while the agent identity identifies the process that actually called search_issues. Your logs then answer both questions: who delegated the work and which non-human identity performed the operation.

For HTTP MCP transports, follow the protocol’s resource discovery and audience rules. The client requests a token for the specific MCP server, and the server rejects a token issued for another resource. The MCP authorization specification also requires the bearer token in every HTTP request and recommends short-lived access tokens as one protection against token theft.

Short-lived tokens reduce exposure. They do not provide immediate revocation by themselves. A stolen token can remain usable until its expiry unless the resource server, gateway, or policy layer checks a current deny decision.

Scope Jira and Confluence at three boundaries

The useful policy unit is not “Jira access” or “Confluence access.” Name the project, space, operation, and constraints.

Start with a policy record that an operator can review:

{
  "identity": "codex-payments-read",
  "resources": {
    "jira": {
      "projects": ["PAY"],
      "operations": ["search_issues", "get_issue"],
      "write": false
    },
    "confluence": {
      "spaces": ["ENGPAY"],
      "operations": ["search_pages", "get_page"],
      "write": false
    }
  },
  "expiresAt": "task-end",
  "default": "deny"
}

Apply the same intent at three boundaries:

  1. Gateway or connection policy: allow this identity to reach only the Jira and Confluence MCP services. Do not give it a route to every internal MCP server.
  2. MCP tool policy: expose and authorize only named read tools. A write-capable agent needs separate approval for operations such as creating an issue, changing a status, or updating a page.
  3. Backend authorization: map the call to Jira project permissions and Confluence space permissions. The MCP server must not use a broad backend credential that silently bypasses those limits.

Per-tool authorization is the key boundary. NetFoundry’s per-tool RBAC guidance puts it plainly: identity proves who is asking, while tool policy decides what that identity can do. It also recommends checking every tools/call, even when tools/list has already filtered the visible tools.

Keep internal MCP servers private

Do not make Jira or Confluence MCP endpoints publicly reachable just because an AI provider hosts the coding agent. The agent needs an authorized path, not a public endpoint.

An outbound-only overlay or private landing zone can provide that path. The agent and the MCP server establish authenticated connections, and policy determines whether they can see one another. The backend stays off the public internet. NetFoundry’s private MCP server pattern shows this separation: the agent calls a private service, while the MCP server remains reachable only through the authorized overlay.

The network layer still does not know whether update_issue is allowed for project PAY. Treat it as a front door, not the complete permission model. Conversely, tool authorization cannot protect an MCP server that is exposed to the internet with a broad, reusable credential. You need both controls.

Make revocation independent of token expiry

Revocation should remove one permission without stopping unrelated agents. That requires policy identities that are independently addressable.

Use a short procedure:

  1. Identify the agent identity, delegated user, MCP service, project or space, and policy version in the audit record.
  2. Disable the identity or remove its specific service policy. Do not rotate a shared credential used by other agents.
  3. Reject new connections and tool calls against the revoked identity.
  4. Decide how active sessions are handled. Terminate them when the task is sensitive; otherwise require a fresh authorization decision before the next call.
  5. Run a permitted and denied test, then retain the denial event and policy version.

The revocation path should be separate from the model, the agent’s prompt, and the downstream application. If the agent is compromised, it must not be able to grant itself access again. If the developer’s Jira permissions change, the agent should not retain a broader backend token that keeps working.

For cross-domain authorization, treat identity chaining as a bounded exchange, not token forwarding. The IETF identity chaining draft describes exchanging authorization information across trust domains while preserving subject and scope context. It also discusses downscoping claims and limiting grants to the intended audience. The draft is work in progress, so use it as an architectural reference and verify the exact profile your IdP and SaaS provider support.

Test the policy as an allow and deny matrix

A successful read proves very little. Test the transport, tool handler, argument checks, downstream API, and revocation path together.

PrincipalRequestExpected result
codex-payments-readSearch Jira issues in PAYAllow
codex-payments-readRead a Confluence page in ENGPAYAllow
codex-payments-readSearch Jira project HRDeny
codex-payments-readTransition a Jira issueDeny
codex-payments-writeUpdate a permitted PAY issueApproval or allow, per policy
Revoked identityRepeat the earlier permitted readDeny

Also test an old cached tool list, a direct call to a hidden tool, a malformed argument, a token with the wrong audience, an expired token, and a request after the identity is revoked. The MCP server should validate inputs and enforce access before it invokes Jira or Confluence. The MCP tools specification calls for input validation, access controls, rate limits, and output sanitization.

Log the principal, delegated subject, tool, target resource, request ID, policy version, decision, and denial reason. Redact tokens and sensitive issue or page content. Return a generic forbidden response to the agent while keeping the useful reason in the protected audit stream.

Frequently asked questions

Should an AI coding agent use the developer’s Jira token?

No. Give the agent a separate workload identity and map the employee’s delegation to a narrower policy. That makes the agent independently auditable and lets you revoke it without revoking the developer’s unrelated access.

Is hiding tools from tools/list enough to secure an MCP server?

No. A client can cache an older tool list or submit a direct tools/call. Filter discovery for usability, then authorize every invocation on the server.

Does a private MCP connection replace Jira and Confluence permissions?

No. Private reachability controls whether the agent can reach the MCP service. Jira project permissions, Confluence space permissions, and MCP tool checks still decide what the request may do.

How can I revoke one agent without breaking other agents?

Assign each agent an independent workload identity and policy attachment. Revoke that identity or attachment, then test a new connection and a tool call while leaving other identities unchanged.

Should the MCP server pass the agent’s token to Jira or Confluence?

Usually not. Validate the inbound token for the MCP resource, then use a separate, narrowly scoped downstream credential when the server calls another API. Token passthrough can create a confused deputy and can cross an unintended trust boundary.

What is the minimum useful audit record?

Record who delegated the task, which workload identity called, the MCP tool and target resource, the policy version, the decision, and the request ID. Redact bearer tokens and sensitive arguments, and keep denial events as well as successes.

Sources & References