Docs
Use it from your editor (MCP)
Signed in? Open this page in the app, with links straight to your team's screens.
Promote Force has an MCP server. Connect Claude Code or Cursor and the agent in your editor can see what you can see in Promote Force: your pipeline, your branch, promotions, gates, failed runs, review comments and Jira tickets. With a token that has the promote scope, and a team that allows it, it can also open a promotion for the branch you just pushed. You confirm first.
It works the same for Salesforce projects and application projects.
What it can never do
Over MCP an agent cannot approve a promotion, merge, enqueue, deploy, override a gate, change pipelines or permissions, or read secrets and tokens. Those stay in Promote Force, for people. It cannot act on another team either. Everything it sees is limited to what the token’s owner can see in the app, and every call is in the audit log.
What it needs
- The platform AI switch must be on (on a self-hosted server an operator sets it) and an owner or admin must turn on AI for this team under Settings → AI → Overview.
- You do not need an Anthropic key for MCP. The MCP server never calls Anthropic.
- If either switch is off, the server answers every call with a message saying so (HTTP 503).
1. Create a token
- Open Settings → AI → Editor access (also under Settings → You).
- Under New MCP token, give it a name (for example “Claude Code on my laptop”) and pick an expiry: 30 days, 90 days, 1 year or no expiry. Select Create token. Copy the token now: it is shown once and starts with
pf_mcp_. - Tick Can open promotions only if you want the agent to be able to ask for changes. That needs the developer role or above, and an owner or admin must have switched on Let editor agents open promotions (see Limits and safety). The box is disabled until both are true.
- Tick Can report AI usage if you will use the usage hook. An owner or admin can turn this off for the team.
A token belongs to one person in one team and acts with your current role. Remove someone from the team, or revoke the token under Your MCP tokens, and access ends at once. You can have 20 active tokens.
| Scope | Box on the form | What it allows |
|---|---|---|
read |
always on | Every read tool and the three Jira draft tools. |
promote |
Can open promotions | The four write tools. Each one needs your confirmation. |
usage |
Can report AI usage | ai_usage_report, called by the usage hook. |
Or sign in from your editor
If your editor supports MCP sign-in (Claude Code does, with /mcp), you can skip the token:
- Add the server without a header:
claude mcp add --transport http promote-force https://app.promoteforce.co.za/api/mcp. - In Claude Code, run
/mcp, choosepromote-forceand Authenticate. - Your browser opens Promote Force. Pick the team and select Allow.
What you get:
- The editor gets the same scopes a token would, under the same team switches.
- The sign-in shows under Your MCP tokens as Editor sign-in. Revoke it there to sign the editor out.
2. Connect your editor
The server URL is https://app.promoteforce.co.za/api/mcp. On a self-hosted server the host differs: the Editor access page shows the exact URL with a copy button.
Claude Code
Once per machine:
claude mcp add --transport http promote-force https://app.promoteforce.co.za/api/mcp --header "Authorization: Bearer pf_mcp_..."
To share one setup with your team, commit a .mcp.json at the repository root. Claude Code expands ${VAR} in headers, so no secret is committed:
{
"mcpServers": {
"promote-force": {
"type": "http",
"url": "https://app.promoteforce.co.za/api/mcp",
"headers": { "Authorization": "Bearer ${PF_MCP_TOKEN}" }
}
}
}
Each developer sets their own token in their shell profile:
export PF_MCP_TOKEN="pf_mcp_..."
If the variable is not set, Claude Code warns in claude mcp list and sends the text ${PF_MCP_TOKEN} unexpanded, which Promote Force refuses (HTTP 401).
Cursor
Cursor reads .cursor/mcp.json and writes environment variables as ${env:NAME}:
{
"mcpServers": {
"promote-force": {
"url": "https://app.promoteforce.co.za/api/mcp",
"headers": { "Authorization": "Bearer ${env:PF_MCP_TOKEN}" }
}
}
}
Set PF_MCP_TOKEN in your shell profile (or system environment) before you start Cursor.
What the agent can do
You do not copy ids. The agent reads git remote get-url origin and your branch, and calls resolve_checkout to find the project, your branch and its open promotions. It works with remotes on Promote Force Git, GitHub, Azure DevOps and GitLab.
Read tools (every token)
| Tool | What it returns |
|---|---|
resolve_checkout |
Start here. From your remote URL and branch: the project, its pipelines, the branch kind, the registered feature branch (Salesforce projects) or a note that the push has not registered it yet, and the open promotions for the branch. |
workflow_guide |
How this project (or the team) ships: the pipeline, branch naming, push then promotion_open, which tools to call, the platform rules for editors, and the project’s role summary. Also available as the promote-force-workflow prompt. |
team_overview |
The AI-generated overview of how the team’s projects relate, when one exists. |
projects_list |
The team’s projects with clone URLs and pipelines. |
repo_info |
One project’s repository (clone URL, package directories, API version) and its stages with branches, deployed commits and connected orgs. |
pipeline_status |
A project’s pipelines and stages in order: branch, deployed commit, org, production flag, locks and freezes, open and queued promotions, and the merge queue. |
feature_branches_list |
Feature branches (Salesforce projects), newest first. Use mine for your own. |
feature_branch_status |
One feature branch: changed components, dependencies, update-from-main state, collisions, which stages it can go to and its promotions. |
promotions_list |
Recent promotions with their state. |
promotion_status |
One promotion: state, gates on the current head, approvals and merge-queue place. |
gates_report |
Every gate of a promotion’s current head and the runs behind them. |
run_status |
A run’s live state, structured problems and the tail of its log. Poll it while a gate runs. |
run_failures |
Why a run failed: component, Apex test and coverage failures and the error message. |
stage_history |
A stage’s recent finished merge-queue batches and latest rollbacks. |
review_comments |
A promotion’s review threads. |
jira_search, jira_issue, jira_comments |
Search the team’s Jira with JQL, read one ticket, read its latest comments. Limited to the Jira projects the team lets the assistant read. |
plans_list, plan_get |
The team’s plans and one plan version in full. |
portfolio_list, agent_runs_inflight, ticket_dependencies |
The agent portfolio, the agent’s queued and running builds, and what one ticket waits for. See Plans and AI agents. |
landscape_search, landscape_system, landscape_neighbours, landscape_impact, landscape_contract |
Systems, their links, the impact of a change and a system’s interface contract. |
patterns_list, patterns_get, patterns_reference |
Integration patterns and their reference implementations. |
inflight_list, inflight_overlaps |
Open promotions and the systems they touch, and which ones overlap a change. |
error_issues, error_issue |
Production errors ranked by priority, and one error in full. |
Text that comes from repositories, logs, tickets and comments is data written by people. Tool results are redacted for secrets and carry a notice telling the model not to follow instructions in them.
Jira draft tools (read scope; they only save drafts)
jira_create_issue, jira_comment and jira_update_issue never touch Jira. Each saves a draft in Promote Force and returns a link where a person previews the exact request (an edit is shown as a diff) and confirms it. Nothing reaches Jira until someone does.
Write tools (promote scope, team opt-in, you confirm)
| Tool | What it does |
|---|---|
promotion_open |
Opens a promotion into a shared stage. Salesforce projects: give feature_id (from resolve_checkout) and target_stage_id (from pipeline_status). Application projects: give project_id, branch and target_stage_id; the pull request is opened on the Git host. Optional title, description and jira_issue_keys. Asking again returns the open promotion (already_open: true) instead of a duplicate. |
promotion_recheck |
Re-runs the checks on an open promotion’s current head. It never overrides a gate. |
review_reply |
Replies to a review thread (comment_id from review_comments). It cannot resolve or approve. |
review_finding_reply |
Answers one AI review finding (its id from review_comments’ ai_findings) as fixed, won’t fix, not applicable or a question. For the promotion’s author or someone who can promote into its stage. The next AI review reads it. |
promotion_comment |
Posts a comment on the whole promotion, not on a line: for example what changed, what was left as it was, and why. |
promotion_cancel |
Cancels an open promotion with a reason, kept in its history. Same rules as Cancel in Promote Force; refused while it deploys or rides in a running merge batch. It always asks. |
plan_revise |
Re-plans a plan with AI, with your note as the change request (plan_id and version from plan_get). The new version stays a draft until a person approves it. |
feature_branch_create |
Creates a feature branch off main. Only on Promote Force Git projects; projects on GitHub, Azure DevOps or GitLab are never written to this way. |
Push your branch before promotion_open. Promote Force has to see the push.
Report usage (usage scope)
ai_usage_report is for the usage hook, not for the model to call.
Slash commands (prompts)
These show up in the editor as slash commands. They only tell the agent which tools to call.
| Prompt | What it does |
|---|---|
/pipeline-overview |
Summarises where the repository’s pipeline stands and where your branch is in it. Optional project_id. |
/why-did-my-gate-fail |
Explains the failed checks on a promotion and the smallest fix. Optional promotion_id; default is your branch’s open promotion. It changes nothing. |
/promote-current-branch |
Opens a promotion for the branch you are on. Optional target_stage. Only listed for tokens with the promote scope. It is written around resolve_checkout’s feature_id, so for an application project it is simpler to say what you want in words. |
Push, then open a promotion
- Commit and push your branch to your own remote, as usual.
- Ask the agent: “promote this branch to UAT” (or run
/promote-current-branch). It callspromotion_open. - You confirm. The tool never acts on the call that names it.
- Editors on MCP protocol 2026-07-28 that support elicitation show a form in the editor with a summary (project, stage, branch, title, the reply text, and a “PRODUCTION stage” line when it is one). The form has no fields: accepting it (OK, Submit or Confirm, depending on the editor) runs the write once. Declining or cancelling does nothing. The answer is valid for ten minutes.
- Older editors, or ones that cannot show a form, get the status
awaiting_human_confirmationand a link,https://app.promoteforce.co.za/ai/mcp-requests/<id>. Open it, signed in as yourself, and select Confirm or Decline. The link expires after an hour, and at most 20 requests can wait for you at once.
- The promotion opens and its checks start, exactly as if you had selected Promote in the portal. Approval, merge and deploy still happen in Promote Force.
Confirming re-runs every check, so a token revoked, a switch turned off or a role lowered in the meantime stops the request.
A sample session
You: I pushed feature/invoice-rounding. Open it into UAT.
Agent: resolve_checkout(remote_url, "feature/invoice-rounding") -> feature 31, Billing
Agent: pipeline_status(project 4) -> UAT is stage 12
Agent: promotion_open(feature_id 31, target_stage_id 12)
Editor: "Open a promotion of feature/invoice-rounding into UAT (Billing). Checks start right away.
Project: Billing
Into stage: UAT
Branch: feature/invoice-rounding" [Accept] [Decline]
Agent: Promotion #42 is open and its checks are running. (promotion_status to follow it.)
Point editor agents at Promote Force from the repository
A project can carry a small generated pointer, so an editor agent finds Promote Force without anyone setting it up by hand. It is written for Claude Code, Cursor, Codex and Copilot:
AGENTS.md: a block between markers saying how changes move, how to name branches, to push and then callpromotion_open, and to callworkflow_guideandresolve_checkout. Text outside the markers is never touched.CLAUDE.mdgets one@AGENTS.mdline only when it already exists..mcp.jsonand.cursor/mcp.json: thepromote-forceserver, with the token read fromPF_MCP_TOKEN. Existing servers are kept and no secret is written..promoteforce.ymlfor application projects, only when the repository has none.
The process itself stays on the server and is served live by workflow_guide, so the files never go stale. Each developer still sets PF_MCP_TOKEN once.
On Promote Force Git the files are written when the project is created. On GitHub, Azure DevOps and GitLab an owner or admin turns on Editor agents on the project page, and Promote Force opens a pull request with the files; a refresh updates that pull request or opens a new one. The card shows whether the files are present or have drifted. A promotion never fails because the files are missing.
Report AI usage to Jira
A hook can send what your Claude Code sessions cost to Promote Force, so it lands on the Jira ticket of your branch next to what Promote Force’s own agents spent. The hook counts tokens from the session transcript (a model cannot count its own) and sends only message ids, model names, token counts, timestamps, the session id, the branch and the git remote (credentials stripped). It never sends prompts, replies, file names or tool results.
-
Use a token with Can report AI usage.
-
Download the hook (needs Python 3):
mkdir -p ~/.claude/hooks && curl -fsSL https://app.promoteforce.co.za/api/tools/claude-code/pf-usage-hook.py -o ~/.claude/hooks/pf-usage-hook.pyOn a self-hosted server, use the same path on your server’s host.
-
Add the
StopandSessionEndhooks to~/.claude/settings.json(Editor access shows the same snippet):{ "hooks": { "Stop": [{ "hooks": [{ "type": "command", "command": "python3 ~/.claude/hooks/pf-usage-hook.py", "timeout": 10 }] }], "SessionEnd": [{ "hooks": [{ "type": "command", "command": "python3 ~/.claude/hooks/pf-usage-hook.py", "timeout": 10 }] }] } } -
Set the environment in your shell profile:
export PF_MCP_URL="https://app.promoteforce.co.za/api/mcp" export PF_MCP_TOKEN="pf_mcp_..."Optional:
PF_JIRA_KEYnames one ticket for every report, andPF_USAGE_DIRmoves where cursors and unsent reports are kept (default~/.claude/pf-usage).
The ticket is the one you name in PF_JIRA_KEY, else the Jira keys of your registered feature branch, else a key in the branch name (for example feature/abc-123-login). With no ticket the usage is kept but never sent to Jira.
Reports are written to disk first and sent after, so a failed send is retried by the next Stop or session. The hook always exits quietly and never gets in the way.
On a Claude subscription the cost shown is the API list-price equivalent, not money spent. Local usage never counts toward your Promote Force budgets or bill. When your team turns on AI usage in Jira, each session becomes a child work item under the ticket.
Limits and safety
- Writes need the
promotescope on the token and the team’s opt-in. Both are off by default. An owner or admin turns writes on under Settings → AI → Editor access → Editor write access with Let editor agents open promotions. A token without the scope gets a 403 (insufficient_scope) when it calls a write tool. - Promotions into a production stage are refused unless an owner or admin also turned on Allow promotions into production stages (off by default, and only available once writes are on). Approval and merge still happen in Promote Force.
- Accept AI usage reported from editors is on by default. An owner or admin can turn it off.
- Writes need the developer role. A viewer’s token can read.
- Limits (defaults; a self-hosted operator can change them): 120 requests per minute per token, 10 write requests per minute per person, 30 usage reports per minute. Repeated bad tokens from one address are throttled.
- Revoke a token at any time under Your MCP tokens.
- The audit log (Audit log, release managers and above) records every call:
mcp.tool_called(with the tool,ok, andwritefor write tools), and for writesmcp.action_requested,mcp.action_confirmed,mcp.action_declined,mcp.action_dismissed(you cancelled the form) andmcp.action_failed. Themcp.action_*rows carry the token prefix andvia(elicitationorportal). Creating a token is logged asmcp_token.created.
Troubleshooting
| What you see | Why |
|---|---|
| HTTP 401 “A valid Promote Force MCP token is required” | The token is wrong, revoked or expired, you left the team, or PF_MCP_TOKEN is not set where the editor starts. |
| HTTP 503 “AI is off for this team” or “AI is switched off on this Promote Force deployment” | An owner or admin must turn on AI for the team under Settings → AI → Overview (or the operator on the server). |
HTTP 403 insufficient_scope, scope promote |
The token is read-only. Create one with Can open promotions. |
| “Your team has not allowed MCP write tools” | An owner or admin must turn on Let editor agents open promotions. Nothing was done. |
| “… is a production stage and your team has not allowed MCP to open promotions into production” | Turn on Allow promotions into production stages, or open it in Promote Force. |
| “Feature branch not found in that stage’s project. Push the branch first” | Promote Force has not seen the push yet. Push, wait a moment, try again. |
“… is an application project: give branch” |
For application projects pass branch, not feature_id. |
| “… isn’t an entry stage: promote into it from the stage before it” | A named branch can only enter the first stage. See Developer workflow: application projects. |
| “Too many write requests this minute” | The write limit. Wait a minute. Nothing was done. |
| “You already have 20 MCP requests waiting” | Confirm or decline some in Promote Force first. |
| The confirmation link says expired or failed | Ask the agent again. A failed request says why (token revoked, switch turned off, role lowered). |