Security teams should keep credentials out of the agent’s local runtime and authorize actions at execution time instead. A secure action runtime lets the agent call external tools without pasting raw tokens into terminals or config files, which reduces exposure to prompt injection and credential exfiltration. That approach also preserves centralized logging and makes tool use easier to audit across sessions.
Why MCP Tool Credentials Should Stay Out of the Agent Runtime
The core design choice is to treat the agent as a caller, not as the place where long-lived tool credentials live. When GitHub, Slack, or Jira are connected through MCP, the safer pattern is to keep tool authority in a secure action layer and issue access only when an action is actually executed. That reduces token exposure, limits reuse across sessions, and keeps the agent from becoming a secrets container.
That matters because MCP integrations often bridge conversational inputs, external APIs, and high-value work systems. If the agent runtime can see raw tokens, it can also leak them through logs, prompts, memory, terminal history, or copied config files. If the credential is absent from the runtime, the agent can still act, but it does so through constrained authorization rather than direct possession of secrets.
For GitHub specifically, the practical goal is to avoid giving the agent a bearer token that can be replayed outside the intended action path. For Slack and Jira, the same principle applies: the agent may need to request a message post, ticket update, or issue lookup, but it should not hold broad standing credentials that outlive the task or session. That is why externalized authorization and just-in-time access are stronger than “paste a token and trust the agent” workflows.
How Execution-Time Authorization Changes the Trust Model
Execution-time authorization changes the trust boundary from “the agent has the secret” to “the system decides whether this specific action is allowed.” That allows security teams to enforce policy per request, scope access to the minimum necessary operation, and attach the decision to a user, task, or session context. It also makes it easier to separate read, write, and administrative actions instead of handing one token broad tool reach.
A secure action runtime also improves auditability. Instead of trying to reconstruct what an agent did from scattered prompts or environment variables, teams can record the approved action, the tool target, the principal, and the outcome in a centralized log. For environments already standardizing on MCP, the MCP authorization specification is the clearest reference point for treating the server as an OAuth resource server rather than a token passthrough endpoint.
This design is especially important where the agent is operating across multiple tools. A single leaked token should not become a universal pathway into code, chat, and ticketing systems. Segmented authorization reduces blast radius, and it also prevents hidden privilege accumulation when the agent is reused across different workflows or teams.
What Security Teams Should Standardize for GitHub, Slack, and Jira
Security teams should standardize on short-lived, scoped credentials or delegated authorization flows, not persistent tokens embedded in local agent environments. The agent should request access when needed, receive only the permission required for the current action, and lose that authority when the session or task ends. That model is easiest to govern when the MCP server or gateway mediates access rather than passing raw tool tokens through the client.
Teams should also define which actions are safe for direct automation and which require human approval. A comment post or draft issue update may be low risk, while repository write access, permission changes, or bulk ticket changes may need stricter policy. The practical test is whether a compromised prompt, plugin, or context window could cause irreversible damage with the credential in hand.
The security baseline is stronger when tool access is paired with a narrow trust model. AI Agent Authorisation Guide is useful here because it frames least privilege, task-scoped access, and per-action decisions as the default pattern for agent tooling. For a broader implementation view, MCP Security Guide covers the same operational idea in MCP terms, including token passthrough avoidance and gateway-based control.
Risk and Threat Considerations
Keeping tool credentials inside the agent runtime creates a direct exposure path for prompt injection, secret exfiltration, and unintended reuse. Once a token can be surfaced to the model, a malicious prompt, a poisoned tool response, or an overbroad integration can turn one local mistake into access across GitHub, Slack, or Jira.
Failure mechanism: The agent or surrounding workflow exposes a reusable secret, then a compromised prompt, log, memory store, or config file leaks that secret beyond the intended action boundary. Because tool tokens often grant API-level authority, the attacker can then perform actions that look legitimate to downstream systems.
Impact: The result can be unauthorized repository changes, message tampering, ticket manipulation, data disclosure, or lateral movement into related SaaS systems. The bigger the token scope and the longer it lives, the more the compromise behaves like standing privilege rather than temporary automation.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and OWASP Agentic AI Top 10 address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Tool tokens in agent runtimes are secrets that can be leaked via prompts, logs, or config. |
| NHI-05 — Overprivileged NHI | GitHub, Slack, and Jira access should be scoped to the minimum action the agent needs. | |
| Recommendation — Keep tool secrets out of agent memory and runtime, and broker access through short-lived authorization. Restrict each tool credential to the narrowest action scope and session duration possible. | ||
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Execution-time authorization prevents an agent from exercising broad standing privilege. |
| Recommendation — Enforce per-action authorization so the agent cannot exceed the privilege needed for the task. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | The question is about handling tool credentials, rotation, and limiting credential exposure. |
| AC-6 — Least Privilege | Agent access to GitHub, Slack, and Jira should be constrained to minimum necessary rights. | |
| Recommendation — Manage tool authenticators centrally and replace long-lived secrets with short-lived, revocable credentials. Grant the agent only the permissions required for the current action and no standing extras. | ||
Practitioner Guidance
What to prioritise: Put a broker or gateway between the agent and the tool, then make the broker hold or mint authority instead of the agent runtime. That is the simplest way to stop local secrets from becoming the default integration pattern.
What to verify: Confirm that no GitHub, Slack, or Jira token appears in shell history, environment dumps, prompt logs, config files, or agent memory. Also verify that a token stolen from one session cannot be replayed for a different task or tool chain.
Decision rule: If the credential can write, delete, or administer something material, treat it as a high-value secret and move to just-in-time authorization with narrow scope. If the action is low risk and reversible, still avoid raw token exposure, but the approval path can usually be lighter.
Practitioner takeaway: The safest MCP pattern is not “make the agent trusted,” it is “make the agent untrusted but well-bounded,” so every tool action is authorized at execution time and every credential remains outside the agent’s local reach.
Related resources from NHI Mgmt Group
- How should security teams handle tool discovery for AI agents in MCP environments?
- What mistakes do teams make when connecting AI agents to API security systems through MCP?
- How should security teams govern machine identity credentials in agentic AI environments?
- How should security teams manage permissions for AI agents?