@rui.branco/jira-mcp 1.6.22 → 1.7.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.
- package/index.js +16 -11
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2505,19 +2505,24 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
2505
2505
|
|
|
2506
2506
|
const content = [{ type: "text", text: result.text }];
|
|
2507
2507
|
|
|
2508
|
-
// Add Jira images
|
|
2508
|
+
// Add Jira images. Anthropic vision only accepts png/jpeg/gif/webp;
|
|
2509
|
+
// SVG and other formats must be skipped or the API rejects the whole
|
|
2510
|
+
// response with "Improperly formed request". Also skip files over 5MB.
|
|
2511
|
+
const mimeByExt = {
|
|
2512
|
+
".png": "image/png",
|
|
2513
|
+
".jpg": "image/jpeg",
|
|
2514
|
+
".jpeg": "image/jpeg",
|
|
2515
|
+
".gif": "image/gif",
|
|
2516
|
+
".webp": "image/webp",
|
|
2517
|
+
};
|
|
2518
|
+
const MAX_IMAGE_BYTES = 5 * 1024 * 1024;
|
|
2509
2519
|
for (const imagePath of result.jiraImages) {
|
|
2510
2520
|
try {
|
|
2511
|
-
const imageData = fs.readFileSync(imagePath);
|
|
2512
2521
|
const ext = path.extname(imagePath).toLowerCase();
|
|
2513
|
-
const mimeType =
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
? "image/gif"
|
|
2518
|
-
: ext === ".webp"
|
|
2519
|
-
? "image/webp"
|
|
2520
|
-
: "image/jpeg";
|
|
2522
|
+
const mimeType = mimeByExt[ext];
|
|
2523
|
+
if (!mimeType) continue;
|
|
2524
|
+
const imageData = fs.readFileSync(imagePath);
|
|
2525
|
+
if (imageData.length > MAX_IMAGE_BYTES) continue;
|
|
2521
2526
|
content.push({
|
|
2522
2527
|
type: "image",
|
|
2523
2528
|
data: imageData.toString("base64"),
|
|
@@ -2532,7 +2537,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
2532
2537
|
for (const design of result.figmaDesigns) {
|
|
2533
2538
|
if (design.images && design.images.length > 0) {
|
|
2534
2539
|
for (const img of design.images) {
|
|
2535
|
-
if (img.buffer) {
|
|
2540
|
+
if (img.buffer && img.buffer.length <= MAX_IMAGE_BYTES) {
|
|
2536
2541
|
content.push({
|
|
2537
2542
|
type: "image",
|
|
2538
2543
|
data: img.buffer.toString("base64"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rui.branco/jira-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.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": {
|