@rui.branco/jira-mcp 1.5.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +49 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -224,8 +224,8 @@ async function searchUser(query) {
224
224
 
225
225
  // Parse text with @mentions and build ADF content
226
226
  async function buildCommentADF(text) {
227
- // Match @FirstName LastName pattern (2 capitalized words)
228
- const mentionRegex = /@([A-Z][a-z]+\s[A-Z][a-z]+)/g;
227
+ // Match @Name patterns: single name, two names, or three+ names (e.g. @Hemant, @Julia Pereszta, @C Hemmant Kumar)
228
+ const mentionRegex = /@([A-Z][a-zà-ÿ]*(?:\s[A-Z][a-zà-ÿ]*)*)/g;
229
229
 
230
230
  const content = [];
231
231
  let lastIndex = 0;
@@ -1127,6 +1127,26 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
1127
1127
  required: ["issueKey"],
1128
1128
  },
1129
1129
  },
1130
+ {
1131
+ name: "jira_search_users",
1132
+ description:
1133
+ "Search for Jira users by name or email. Returns account IDs and display names. Use this to find users for mentions or assignments.",
1134
+ inputSchema: {
1135
+ type: "object",
1136
+ properties: {
1137
+ query: {
1138
+ type: "string",
1139
+ description:
1140
+ "Search query - name or email (e.g., 'Julia', 'hemant', 'rui.branco@kone.com')",
1141
+ },
1142
+ maxResults: {
1143
+ type: "number",
1144
+ description: "Max results (default 5)",
1145
+ },
1146
+ },
1147
+ required: ["query"],
1148
+ },
1149
+ },
1130
1150
  ],
1131
1151
  };
1132
1152
  });
@@ -1145,6 +1165,33 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
1145
1165
  },
1146
1166
  ],
1147
1167
  };
1168
+ } else if (name === "jira_search_users") {
1169
+ const maxResults = args.maxResults || 5;
1170
+ const users = await fetchJira(
1171
+ `/user/search?query=${encodeURIComponent(args.query)}&maxResults=${maxResults}`,
1172
+ );
1173
+ if (!users || users.length === 0) {
1174
+ return {
1175
+ content: [
1176
+ {
1177
+ type: "text",
1178
+ text: `No users found for "${args.query}".`,
1179
+ },
1180
+ ],
1181
+ };
1182
+ }
1183
+ const lines = users.map(
1184
+ (u) =>
1185
+ `- **${u.displayName}** (accountId: ${u.accountId}${u.emailAddress ? `, email: ${u.emailAddress}` : ""})`,
1186
+ );
1187
+ return {
1188
+ content: [
1189
+ {
1190
+ type: "text",
1191
+ text: `Found ${users.length} user(s) for "${args.query}":\n\n${lines.join("\n")}`,
1192
+ },
1193
+ ],
1194
+ };
1148
1195
  } else if (name === "jira_get_ticket") {
1149
1196
  const downloadImages = args.downloadImages !== false;
1150
1197
  const fetchFigma = args.fetchFigma !== false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rui.branco/jira-mcp",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "Jira MCP server for Claude Code - fetch tickets, search with JQL, update tickets, manage comments, change status, and get Figma designs",
5
5
  "main": "index.js",
6
6
  "bin": {