Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
mcp-server-jira
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-solutions
mcp-server-jira
Commits
36b31d3a
Commit
36b31d3a
authored
Mar 04, 2026
by
MD. SHAHIDUL ISLAM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: Add `assign_issue` tool and include `JIRA_QA_TESTER` in the context.
parent
65093f9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
jira_mcp_server.py
jira_mcp_server.py
+18
-1
No files found.
jira_mcp_server.py
View file @
36b31d3a
...
...
@@ -33,6 +33,7 @@ JIRA_SERVER = os.environ.get("JIRA_SERVER")
JIRA_USERNAME
=
os
.
environ
.
get
(
"JIRA_USERNAME"
)
JIRA_PASSWORD
=
os
.
environ
.
get
(
"JIRA_PASSWORD"
)
ACTIVE_PROJECT
=
os
.
environ
.
get
(
"JIRA_DEFAULT_PROJECT"
)
JIRA_QA_TESTER
=
os
.
environ
.
get
(
"JIRA_QA_TESTER"
)
BASE_URL
=
JIRA_SERVER
.
rstrip
(
"/"
)
if
JIRA_SERVER
else
""
...
...
@@ -339,6 +340,18 @@ def assign_issue_to_me(issue_key: str) -> str:
except
Exception
as
e
:
return
f
"Error assigning issue {issue_key}: {str(e)}"
@mcp.tool
()
def
assign_issue
(
issue_key
:
str
,
assignee_username
:
str
)
->
str
:
"""Assigns the specified issue to the given username (e.g. 'samia').
IMPORTANT: You must explicitly ask the user for confirmation before executing this tool.
"""
jira
=
_get_jira
()
try
:
jira
.
assign_issue
(
issue_key
,
assignee_username
)
return
f
"Successfully assigned issue [{issue_key}]({BASE_URL}/browse/{issue_key}) to {assignee_username}."
except
Exception
as
e
:
return
f
"Error assigning issue {issue_key}: {str(e)}"
@mcp.tool
()
def
transition_issue
(
issue_key
:
str
,
transition_name
:
str
)
->
str
:
"""Transitions an issue to a new status by name (e.g., 'Ready for QA').
...
...
@@ -453,7 +466,7 @@ def get_jira_context() -> str:
"""Returns a hardcoded list of known Project Names -> Project Keys, and known User Names.
Use this to look up a project key if the user only provides the project name, or to see the correct spellings of active users.
"""
return
"""
context_str
=
"""
Known Projects:
- e-GP Bhutan Phase III (Key: EGPBIII)
- eGPBhutan-RnD (Key: RND)
...
...
@@ -473,6 +486,10 @@ Active Users:
- Asif Anam
- Ayasha Hossain Jui
"""
if
JIRA_QA_TESTER
:
context_str
+=
f
"
\n
Configured QA Tester for this environment: {JIRA_QA_TESTER}
\n
"
return
context_str
if
__name__
==
"__main__"
:
# Start the FastMCP server
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment