The Adaptavist Group LogoDocumentation

Connect AI Agents to ScriptRunner for Jira Cloud with MCP

Connect AI agents such as Claude Code, Codex and ChatGPT to ScriptRunner for Jira Cloud using the Model Context Protocol (MCP).

Note: MCP support is brand new, and we're still shaping it. Things may change as we develop. Changes made through MCP don't show up in the ScriptRunner audit log yet.

Want your AI agent to help with ScriptRunner? With our Model Context Protocol (MCP) server, agents like Claude Code, Codex, and ChatGPT can work with ScriptRunner for Jira Cloud on your behalf. They can look through your setup, build and update configuration for you, and help work out why a script didn't behave.

Setup takes a few minutes. You'll need to be a Jira administrator, and an organisation or site admin needs to switch MCP tools on once for your site.

Step 1: Turn on MCP tools

MCP tools are off by default, so an admin needs to switch them on first:
  1. Go to https://admin.atlassian.com and pick your site once signed in.

  2. Select Apps → Sites and pick your site.

  3. Select Connected apps.

  4. Find ScriptRunner for Jira, and then select View app details.

  5. On the Details tab, scroll to the bottom and under Expose tools to MCP-compatible apps, select Enable tools.

Tip: Changed your mind? You can switch it off any time with Disable tools on the same page.

Step 2: Connect your agent

  1. Copy the MCP server URL: https://mcp.atlassian.com/forge/1dd33d5a-4685-4816-9851-1b36b2fb3dbd

  2. Optional: Connect Claude Code.
    1. Run this command:
      claude mcp add --transport http scriptrunner https://mcp.atlassian.com/forge/1dd33d5a-4685-4816-9851-1b36b2fb3dbd
    2. Run /mcp and select Authenticate.

  3. Optional: Connect Codex.
    1. Run these two commands:
      codex mcp add scriptrunner --url https://mcp.atlassian.com/forge/1dd33d5a-4685-4816-9851-1b36b2fb3dbd
      codex mcp login scriptrunner
  4. Prompted by your browser, sign in with your Atlassian account.

  5. Pick your site, and then select Accept.

Install ScriptRunner skills

CAUTION: We really recommend this step. The MCP server lets your agent take action, but it doesn't teach it ScriptRunner. Our skills give your agent the documentation, platform know-how, and example scripts it needs to write scripts that actually work.
npx skills add adaptavist/scriptrunner-skills
You can find out more about each skill on skills.sh.

What your agent can do

You won't need to call these tools yourself. Your agent picks the right ones for what you ask. In the table, CHANGES DATA marks tools that create, update or delete things on your site, and RUNS A SCRIPT marks tools that run code.
ToolWhat it does
sr-explore-configLets your agent read your existing listeners, scheduled jobs, escalation services, scripted fields, and behaviours, so it understands your current setup.
sr-apply-config-changeCHANGES DATACreates, updates, or deletes any of those.
sr-list-behaviour-fieldsFinds the create screen fields a behaviour can use.
sr-list-script-variablesLets your agent see which Script Variables you have, so it can use them in scripts. It only ever sees the names. Values are never returned to the agent, so your secrets stay safe.
sr-test-scripted-fieldRUNS A SCRIPTTries out a scripted field on one work item, without saving anything.
sr-explore-workflowsLets your agent read your existing workflows, including their ScriptRunner conditions, validators, and post functions.
sr-change-workflow-ruleCHANGES DATACreates, updates, enables, disables, moves, or deletes a workflow rule.
sr-explore-script-managerBrowses and reads your Script Manager files.
sr-change-script-manager-fileCHANGES DATACreates, updates, moves, renames, or deletes a Script Manager file.
sr-list-executionsShows recent runs of a configuration.
sr-read-execution-logsReads the logs from a run, handy for figuring out what went wrong.
sr-search-hapi, sr-get-hapiLook things up in the ScriptRunner HAPI API.
sr-explore-rest-apiLooks things up in the Atlassian REST API specifications.
sr-check-agent-accessHelps sort out access problems.

Good to know

  • Your agent works as you, with your Jira permissions, and its changes go live straight away. Trying something new? A test site is a great place to start.

  • MCP changes don't appear in the ScriptRunner audit log yet, so use your agent's history to see what it changed.

  • If your agent connects but can't find any ScriptRunner tools, or says an admin must enable external MCP access for this app, MCP tools haven't been turned on for your site yet. Ask an admin to complete Step 1.

  • For now, MCP is available for ScriptRunner for Jira Cloud only. Script fragments, the Script Console, and built-in scripts aren't supported yet.

Want to dig deeper? Check out the MCP specification and the ScriptRunner skills.

Search documentation

Start typing to search the docs.