Skip to content

aforbco/Jira-dc-mcp-admin

Repository files navigation

Jira DC Admin MCP — AI-Powered Jira Administration Actions

MCP Jira DC ScriptRunner Python License

Write-capable MCP server that lets Claude (or any MCP-compatible AI) execute Jira Data Center administration actions — create issues, configure workflows, manage schemes, deploy scripts, and administer Assets/CMDB. 114 tools via ScriptRunner REST endpoint + Jira REST API.

What is this?

This is a Model Context Protocol (MCP) server for Jira Data Center that allows AI assistants like Claude Desktop, Claude Code, or any MCP-compatible client to execute administration actions on your Jira DC instance.

Instead of manual admin work, tell your AI:

  • "Create a new project with standard schemes"
  • "Add the 'Department' field to the HR create screen"
  • "Copy the ITSM workflow and add an approval step"
  • "Create an Assets schema for our hardware inventory"
  • "Bulk-transition all Done issues in sprint 42 to Closed"

Key Features

  • 102 administration tools covering every Jira DC admin domain
  • Full issue CRUD — create, update, transition, assign, comment, link, delete, bulk operations
  • Workflow automation — copy workflows, add steps, transitions, post-functions, validators, conditions
  • Scheme management — create and configure permission, notification, workflow, screen, field config, issue security schemes
  • Assets / Insight / CMDB — full CRUD via Java API (create schemas, object types, attributes, objects)
  • ScriptRunner management — Script Console, update/delete listeners, enable/disable behaviours, update scripted fields, manage jobs and fragments
  • Script deployment — deploy Groovy scripts to JIRA_HOME/scripts for ScriptRunner
  • Structure plugin — create/delete/copy structures, manage generators (automations)
  • Automation for Jira (A4J) — enable/disable/delete automation rules
  • JMWE — toggle/delete/duplicate event-based actions
  • Infrastructure inspection — mail servers, listeners, scheduled services, user directories
  • Safety built-in — destructive operations require confirmation, bulk ops show preview
  • Works with any MCP client — Claude Desktop, Claude Code, n8n, Open WebUI (MCPO), OpenCode, OpenClaw, Cursor, Windsurf, and any other MCP-compatible tool

Companion: jira-analyst-mcp (Read-Only Analysis)

This server focuses on write operations. For deep read-only analysis, use the companion:

👉 jira-analyst-mcp — 87 read-only tools for analyzing Jira configuration (incl. ScriptRunner, JMWE, Structure)

Together they form a complete AI Jira admin assistant:

  1. jira-analyst-mcp analyzes current configuration and identifies issues
  2. jira-admin-mcp executes the recommended changes (this repo)

Architecture

Claude → jira-admin MCP (Python/stdio) → Jira REST API /rest/api/2 (issue CRUD)
                                        → SR POST Endpoint (admin config via Java API)
  • 1 Groovy filescriptrunner/admin_executor.groovy (all admin writes via Jira Java API + ComponentAccessor)
  • 1 SR endpointPOST /rest/scriptrunner/latest/custom/adminExecutor
  • Issues → standard Jira REST API /rest/api/2

Tools (91 total)

Domain Tools What it does
Issues create_issue, update_issue, transition_issue, assign_issue, add_comment, link_issues, delete_issue, bulk_transition Full issue CRUD via REST API
Watchers add_watcher, remove_watcher Manage issue watchers
Attachments list_attachments List issue attachments (read)
Worklogs add_worklog, delete_worklog Time tracking — add/delete work logs
Subtasks create_subtask Create subtask under parent issue
Custom Fields create_custom_field, update_custom_field, remove_custom_field, add_field_option, remove_field_option, enable_field_option, disable_field_option Create/manage fields and options
Screens create_screen, add_field_to_screen, remove_field_from_screen Create screens, manage fields
Screen Schemes create_screen_scheme, create_issue_type_screen_scheme Create SS and ITSS
Field Configs create_field_configuration, set_field_layout_item, create_field_config_scheme, add_field_config_scheme_mapping Create FC, set hidden/required, create FCS, map issue types
Permission Schemes create_permission_scheme, add_permission_grant, remove_permission_grant Create schemes, manage grants
Notification Schemes create_notification_scheme, add_notification_entry, remove_notification_entry Create schemes, manage recipients
Issue Security create_issue_security_scheme, add_security_level, add_security_grant Create security schemes, levels, grants
Issue Types create_issue_type, create_status, create_priority, create_resolution Create issue types, statuses, priorities, resolutions
Issue Type Schemes create_issue_type_scheme, add_issue_type_to_scheme Create ITS, add issue types
Workflow Schemes create_workflow_scheme, add_workflow_scheme_mapping Create WS, map issue type → workflow (draft)
Workflows create_workflow_copy, add_workflow_step, add_workflow_transition, add_script_post_function, add_validator, add_condition Copy workflows, add steps/transitions/automation
Projects create_project, assign_permission_scheme, assign_notification_scheme, assign_workflow_scheme, assign_issue_type_scheme, assign_field_config_scheme Create projects, assign all scheme types
Components & Versions create_component, create_version, release_version Create project components and versions
Other create_project_category, create_issue_link_type Categories, link types
Users & Groups create_group, add_user_to_group, remove_user_from_group, add_project_role_member, remove_project_role_member Manage groups and project roles
Assets (CMDB) create_object_schema, create_object_type, create_object_type_attribute, create_asset_object, update_asset_object, delete_asset_object Full Assets/Insight CRUD
ScriptRunner sr_run_script, sr_update_listener, sr_delete_listener, sr_enable_behaviour, sr_disable_behaviour, sr_delete_behaviour, sr_update_scripted_field, sr_delete_scheduled_job, sr_delete_fragment Script Console, manage listeners/behaviours/scripted fields/jobs/fragments
Script Files write_script_file, read_script_file, list_script_files Deploy/read Groovy scripts to JIRA_HOME/scripts
Structure create_structure, delete_structure, copy_structure, create_structure_generator, delete_structure_generator Create/delete/copy structures, manage generators
A4J enable_a4j_rule, disable_a4j_rule, delete_a4j_rule Enable/disable/delete Automation for Jira rules
JMWE toggle_jmwe_event_action, delete_jmwe_event_action, duplicate_jmwe_event_action Toggle/delete/duplicate event-based actions
Infrastructure list_mail_servers, list_listeners, list_services, list_user_directories Mail, listeners, scheduled services, LDAP/AD directories

Setup

1. ScriptRunner REST Endpoint

Jira DC → Administration → ScriptRunner → REST Endpoints → Create:

  • Inline Script: paste contents of scriptrunner/admin_executor.groovy
  • The script registers endpoint adminExecutor with httpMethod: "POST" and groups: ["jira-administrators"]
  • URL: POST /rest/scriptrunner/latest/custom/adminExecutor

Test:

curl -X POST \
  -H "Authorization: Bearer <PAT>" \
  -H "Content-Type: application/json" \
  -d '{"action":"create_group","name":"test-group"}' \
  "https://jira.example.com/rest/scriptrunner/latest/custom/adminExecutor"

Compatibility: Tested on Jira DC 9.x / 10.x with ScriptRunner 8.x+. Script uses javax.ws.rs imports. If your SR uses jakarta.ws.rs, replace the import.

2. Python environment

git clone https://github.com/aforbco/Jira-DC-MCP-admin.git
cd Jira-DC-MCP-admin
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

3. Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "jira-admin": {
      "command": "/path/to/jira-admin-mcp/.venv/bin/python",
      "args": ["/path/to/jira-admin-mcp/server.py"],
      "env": {
        "JIRA_BASE_URL": "https://jira.example.com",
        "JIRA_PAT": "your_jira_personal_access_token"
      }
    }
  }
}

Restart Claude Desktop after editing config.

4. Claude Code (CLI)

claude mcp add jira-admin -- /path/to/.venv/bin/python /path/to/server.py

Then set env vars in .env file (see .env.example).

5. Docker / SSE

cp .env.example .env
# Edit .env with your credentials
docker compose up -d
# Server available at http://localhost:8002/sse

Example Workflows

Create a fully configured project

You: "Create project MARKETING with standard ITSM configuration"

AI → create_project(key="MKT", name="Marketing", lead="admin")
   → assign_permission_scheme(projectKey="MKT", schemeId=10100)
   → assign_notification_scheme(projectKey="MKT", schemeId=10200)
   → assign_workflow_scheme(projectKey="MKT", schemeId=10300)
   → create_component(projectKey="MKT", name="Campaigns")
   → create_version(projectKey="MKT", name="Q1 2025")

Analyze + execute with both MCPs

You: "Add field 'Department' to the HR project create screen"

jira-analyst → list_screens, get_screen → finds screen ID 10200
jira-admin → add_field_to_screen(screenId=10200, fieldId=customfield_10500)

Assets / CMDB management

You: "Create an asset schema for hardware inventory"

AI → create_object_schema(name="Hardware Inventory", key="HW")
   → create_object_type(schemaId=1, name="Server")
   → create_object_type_attribute(objectTypeId=1, name="Hostname", type=0)
   → create_object_type_attribute(objectTypeId=1, name="IP Address", type=0)
   → create_asset_object(objectTypeId=1, attributes={...})

Safety

  • Destructive operations (delete, remove, scheme reassignment) require explicit confirmation
  • Bulk operations show preview before execution
  • All changes are logged with status responses
  • SR endpoint restricted to jira-administrators group
  • Personal Access Token (PAT) authentication — no password storage

How It Works

The MCP server uses a single ScriptRunner Groovy endpoint that accesses the Jira Java API directly via ComponentAccessor. This gives it access to internal managers that the REST API doesn't expose:

  • CustomFieldManager — create/update/delete custom fields
  • FieldScreenManager — create screens, add/remove fields
  • WorkflowManager — copy workflows, add steps/transitions
  • PermissionSchemeManager — create schemes, manage grants
  • NotificationSchemeManager — create schemes, manage entries
  • FieldLayoutManager — create field configurations, set hidden/required
  • ProjectManager — create projects, assign schemes
  • ObjectSchemaFacade, ObjectTypeFacade, ObjectFacade — Assets/Insight CRUD via OSGi

Issues use standard REST APIs for maximum compatibility.

FAQ

Q: Does this modify Jira configuration? A: Yes — this is the write-capable server. Use jira-analyst-mcp for read-only analysis.

Q: Does it work with Jira Cloud? A: No. This is designed for Jira Data Center only. It uses ScriptRunner and the Jira Java API.

Q: What permissions are needed? A: The user whose PAT is used must be in the jira-administrators group.

Q: Can I deploy ScriptRunner scripts through this? A: Yes — write_script_file deploys Groovy scripts to JIRA_HOME/scripts/ where ScriptRunner can reference them.

Q: Is it safe to use in production? A: Destructive operations require confirmation. We recommend testing on a staging instance first.

Q: Can I use it with other AI clients besides Claude? A: Yes — any MCP-compatible client works. Tested transports: stdio (Claude Desktop, Claude Code, Cursor, Windsurf) and SSE (n8n, Open WebUI/MCPO, OpenCode, OpenClaw, custom apps).

Keywords

Jira Data Center, Jira DC, MCP server, Model Context Protocol, ScriptRunner, Groovy, Jira administration, Jira automation, AI Jira admin, Claude MCP, Jira REST API, Jira Java API, ComponentAccessor, custom fields, workflows, screens, permission schemes, notification schemes, workflow schemes, issue security, Assets, Insight, CMDB, issue CRUD, project creation, scheme management, Atlassian Data Center, Claude Desktop, Claude Code, FastMCP, Python MCP server, Jira configuration management, workflow automation, bulk operations, n8n, Open WebUI, MCPO, OpenCode, OpenClaw, Cursor, Windsurf, SSE transport, stdio transport

About

AI-powered Jira Data Center admin actions — 111 write MCP tools via ScriptRunner + Java API. Issues, workflows, schemes, Assets/CMDB, SR listeners/behaviours/jobs, Structure views, JMWE, script deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors