Sending Jira issues to any coding agent: a Forge app, an OAuth provider and 80 lines of MCP
TL;DR: AgentRQ for Jira is a small, open-source Atlassian Forge app (AGPL-3.0). It adds ••• → Send to AgentRQ to every Jira Cloud issue. When you choose it, the app reads the issue and all its comments as you, turns Jira
TL;DR: AgentRQ for Jira is a small, open-source Atlassian Forge app (AGPL-3.0). It adds ••• → Send to AgentRQ to every Jira Cloud issue. When you choose it, the app reads the issue and all its comments as you, turns Jira's rich text into Markdown and creates a task in an AgentRQ workspace. Whatever agent is connected there picks the task up: Claude Code, Codex, Gemini CLI or another. Later comments go to the same task as replies, oldest first, and each one goes exactly once. The app reaches AgentRQ as a plain MCP client: an OAuth 2 provider with PKCE and three tool calls over Streamable HTTP.
Here is how it works, and why it is built the way it is.
What problem does it solve?
Coding agents start from a prompt. Your backlog lives in Jira. Somebody has to bridge the two by hand: open the ticket, copy the description, paste it into a terminal, then remember to pass along the comment that changed the plan an hour later.
There are already ways to automate that, including webhooks and Jira Automation rules that fire on assignment. Many teams want a smaller step: a person decides, ticket by ticket, that this one goes to an agent, and in which repository. That is a button, not a pipeline.
The constraints we set:
- Any agent. No integration per agent. The app talks to one system, and that system routes the work to whatever agent runs in the chosen workspace.
- Per-user identity on both sides. Jira is read as the person who presses the button, and AgentRQ is written as that same person.
- The whole ticket. The description and every comment, with authors and times, in order.
- Follow-ups without duplicates. New comments reach the agent exactly once, even if a send fails halfway through.
What does the user see?
On an issue, open the ••• menu and choose Send to AgentRQ:
The first time, the dialog asks you to connect your AgentRQ account through a standard OAuth consent page. After that you pick a workspace and who gets the task: the agent, to start on it, or yourself, to hand over later.
If you open the action again on an issue you already sent, it links to the task and offers to send the comments made since:
How is the Forge app put together?
The manifest declares one jira:issueAction module, rendered natively with UI Kit, plus one resolver function that the dialog calls. The resolver exposes five operations: state, connect, send, sendNewComments and forget.
The permissions are deliberately narrow:
permissions:
scopes:
- read:jira-work
- storage:app
external:
fetch:
backend:
- remote: agentrq-server
The app can read issues, keep its own key-value storage and call one remote, the AgentRQ MCP origin. It cannot write to Jira. If a future version needs a new scope, Jira asks the site admin to approve it again.
All the logic sits behind a createApp({ auth, agentrq, jira, store, appUrl }) factory. Forge's user-bound APIs exist only inside an invocation, so index.js builds a fresh app per call and passes in the real dependencies. The tests pass in fakes. That is how the repository can require 100% coverage without mocking Forge itself.
How does the app sign in to AgentRQ?
Forge has a feature built for this: external auth providers. The manifest declares AgentRQ as an OAuth 2 provider:
providers:
auth:
- key: agentrq
type: oauth2
clientId: ${AGENTRQ_CLIENT_ID}
pkce: true
scopes:
- supervisor-mcp
bearerMethod: authorization-header
A few details are worth calling out:
-
PKCE and no client secret. AgentRQ registers MCP clients as public clients, so Forge's
providers configurestep asks for a secret you can fill with any value. PKCE is what protects the code exchange. -
One scope.
supervisor-mcpis the account-wide MCP server that any MCP client gets. The app gets no special API. -
Profile without a profile endpoint. Forge wants a
retrieveProfilecall to name the connected account. AgentRQ has no user-info endpoint, so the manifest points that call at the server's public/.well-known/oauth-protected-resource/mcpmetadata. A 200 there proves the server is reachable, and the account is labelled after the resource host, such as "AgentRQ (mcp.agentrq.com)". -
Tokens never touch app code.
api.asUser().withProvider('agentrq', 'agentrq-server')returns afetchthat Forge signs with that user's token. Forge stores the token and refreshes it.
Because every user connects their own account, there is no shared service credential to leak. A teammate can only send to their own workspaces.
What does an MCP client look like with no SDK?
AgentRQ's MCP server is stateless Streamable HTTP, so a tools/call needs no initialize handshake first. The whole client is one function:
async function callTool(name, action, payload) {
const res = await fetchFn('/mcp', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Accept: 'application/json, text/event-stream',
},
body: JSON.stringify({
jsonrpc: '2.0', id: nextID++, method: 'tools/call',
params: { name, arguments: { action, payload } },
}),
});
const msg = parseRPC(await res.text()); // last "data:" line of the SSE, or plain JSON
// ...map msg.error and result.isError to typed errors, JSON.parse the text content
}
The server's tools follow an {action, payload} shape, so the app needs exactly three calls:
| Call | Used for |
|---|---|
workspace / list
|
Filling the workspace picker |
task / create
|
Sending the issue (workspaceId, title, body, assignee) |
task / reply
|
Sending each new comment |
A server that answers with the error text not found is mapped to notFound: true. That is how the app tells a deleted task apart from a network failure.
The path is always /mcp. A server with an mcp. host answers on every path, and one without serves MCP at /mcp, so the same path works for both.
How does a Jira issue become a task?
Jira is read with api.asUser().requestJira, so the app sees exactly what the person pressing the button sees. A restricted comment they cannot read never reaches the agent. Comments are paged 100 at a time, ordered by creation.
The task title is KEY: summary, cut to 255 characters with an ellipsis, which is the size of the column. The body is plain Markdown that the agent reads as its instructions:
Jira issue [PAY-142](https://acme.atlassian.net/browse/PAY-142): Retry failed webhook deliveries
- Type: Story
- Status: To Do
- Priority: High
- Reporter: ...
- Labels: backend
## Description
...
## Comments
**Ana** (2026-12-03 14:02):
...
Jira Cloud stores rich text as ADF (Atlassian Document Format), a JSON tree. A small recursive converter maps it to Markdown. Paragraphs, headings, lists, code blocks, quotes, tables and expand panels are blocks. Mentions, emoji, smart links, status lozenges and dates are inline nodes. Marks are bold, italic, strike, code and links. Tables are the fiddly part: a | inside a cell has to be escaped, and so does a backslash that comes before one. The latest fix in the repository escapes backslashes before pipes for exactly that reason.
How do follow-up comments stay exactly-once?
The app keeps one record per user per issue in Forge storage:
// key: `sent:${accountId}:${issueId}`
{ workspaceId, workspaceName, taskId, lastCommentId, sentAt }
Jira numbers comments in the order they are made, so a comment's numeric id works as a cursor. Send new comments loads every comment with an id above lastCommentId, sorts them ascending, and for each one:
- posts it as a reply on the task,
- moves
lastCommentIdforward and saves the record, - continues with the next comment.
Saving after every reply, not once at the end, is what makes it exactly-once. If the third of five replies fails, the first two are recorded, and the next press resumes at the third. Edits are not resent, because the cursor only moves forward. That trade-off is explicit in the UI: post a new comment if the agent must see a change.
Two more cases follow from the record:
-
The task was deleted in AgentRQ. The reply call comes back
notFound. The app deletes the record and offers to send the issue again as a new task. - Two people send the same issue. The key includes the Jira account id, so each person gets their own record and their own task, and neither sees the other's.
Nothing is sent without a click. Closing the dialog sends nothing, which matters when the comment thread is half-written.
Can I point it at a self-hosted AgentRQ?
Yes, but Forge fixes the remote's base URL at deploy time, so each server needs its own deployment. A configure script does the OAuth part for you:
npm run configure -- https://mcp.your-domain.com https://your-domain.com
It fetches the server's /.well-known/oauth-authorization-server metadata. It checks that the registration endpoint is on the same origin, registers the app as a client through dynamic client registration and prints the variables the manifest reads: AGENTRQ_MCP_ORIGIN, AGENTRQ_AUTHORIZE_PATH, AGENTRQ_TOKEN_PATH and AGENTRQ_CLIENT_ID. It also prints a forge variables set AGENTRQ_APP_URL … command for the task links. Export them, then run:
npm ci
forge register
forge deploy
forge providers configure agentrq # any value for the secret
forge install
Atlassian's servers make the outbound calls, so the server must be reachable over public HTTPS.
Why a button instead of a webhook?
AgentRQ also has a Jira hook. A Jira Automation rule or an admin webhook posts issues to a URL, and filters decide which ones become tasks. That suits "every issue assigned to the agent's account goes to the agent". The app suits a different question: should this ticket go to an agent, and which repository's agent? Routing is a dropdown, made per issue by the person who knows the answer. It also needs no hook registration and no webhook secret, only a one-time install by a site admin.
FAQ
Does it work on Jira Data Center? No. It is a Forge app, and Forge apps run on Jira Cloud.
Can the agent comment back on the ticket? Not through this app, because it holds only read:jira-work. Give the agent a Jira CLI if you want it to transition or comment. The task in AgentRQ is where it reports.
What does the agent actually receive? A normal AgentRQ task. The connected agent gets it through its workspace channel, works on it, asks for approval before risky commands and replies with the result.
How big is it? Eight source files: the MCP client, the Jira reader, the task writer, the ADF converter, the app logic, the Forge wiring and two for the dialog. Each one has its own test file.
The code is at github.com/agentrq/agentrq-jira, and AgentRQ itself is at agentrq.com.
How does your team hand tickets to agents today: copy-paste, a webhook, or something in between?
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.

