@vira_m/jira-mcp-server 1.0.0 → 1.0.2
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/SETUP.md +69 -0
- package/dist/index.js +7 -6
- package/package.json +1 -1
- package/src/index.ts +13 -7
package/SETUP.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Jira MCP Server — Инструкции подключения
|
|
2
|
+
|
|
3
|
+
Пакет: `@vira_m/jira-mcp-server`
|
|
4
|
+
Инструмент: `get_jira_issue` — получить тикет по ключу (например `PROJ-123`)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Codemie Платформа
|
|
9
|
+
|
|
10
|
+
1. Открой **Skills** → **Create Skill**
|
|
11
|
+
2. Заполни:
|
|
12
|
+
- **Skill Name:** `jira-ticket-fetcher`
|
|
13
|
+
- **Description:** `Use this skill to fetch Jira issues by key from Jira Server`
|
|
14
|
+
- **Instructions:**
|
|
15
|
+
```
|
|
16
|
+
Use the get_jira_issue tool to fetch a Jira ticket by its key.
|
|
17
|
+
Always return the full ticket details including summary, status, priority, assignee, and description.
|
|
18
|
+
```
|
|
19
|
+
3. В **External tools** добавь MCP сервер:
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"command": "npx",
|
|
23
|
+
"args": ["-y", "@vira_m/jira-mcp-server"],
|
|
24
|
+
"env": {
|
|
25
|
+
"JIRA_BASE_URL": "https://jira.yourcompany.com",
|
|
26
|
+
"JIRA_PAT": "your_personal_access_token"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
4. Нажми **Create Skill**
|
|
31
|
+
5. Прикрепи скил к нужному ассистенту: **Assistants** → выбери ассистента → **Edit** → **Skills** → добавь `jira-ticket-fetcher`
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Codemie Code (локально)
|
|
36
|
+
|
|
37
|
+
Открой конфиг MCP (обычно `~/.codemie/mcp.json` или через `ctrl+p` → MCP Settings) и добавь:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"mcpServers": {
|
|
42
|
+
"jira": {
|
|
43
|
+
"command": "npx",
|
|
44
|
+
"args": ["-y", "@vira_m/jira-mcp-server"],
|
|
45
|
+
"env": {
|
|
46
|
+
"JIRA_BASE_URL": "https://jira.yourcompany.com",
|
|
47
|
+
"JIRA_PAT": "your_personal_access_token"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Перезапусти Codemie Code — инструмент `get_jira_issue` станет доступен.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Использование
|
|
59
|
+
|
|
60
|
+
После подключения просто напиши ассистенту:
|
|
61
|
+
```
|
|
62
|
+
Покажи тикет PROJ-123
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
или
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Fetch Jira issue PROJ-456
|
|
69
|
+
```
|
package/dist/index.js
CHANGED
|
@@ -2,12 +2,9 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
3
|
import axios from "axios";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
console.error("Missing JIRA_BASE_URL or JIRA_PAT environment variables");
|
|
9
|
-
process.exit(1);
|
|
10
|
-
}
|
|
5
|
+
// Support both direct env vars (local) and Codemie platform integration env vars
|
|
6
|
+
const JIRA_BASE_URL = process.env.JIRA_BASE_URL || process.env.url;
|
|
7
|
+
const JIRA_PAT = process.env.JIRA_PAT || process.env.token;
|
|
11
8
|
const jira = axios.create({
|
|
12
9
|
baseURL: `${JIRA_BASE_URL}/rest/api/2`,
|
|
13
10
|
headers: {
|
|
@@ -19,6 +16,10 @@ const server = new McpServer({
|
|
|
19
16
|
name: "jira-mcp-server",
|
|
20
17
|
version: "1.0.0",
|
|
21
18
|
});
|
|
19
|
+
server.tool("debug_env", "Debug: show which env variables are set (keys only, no values)", {}, async () => {
|
|
20
|
+
const keys = Object.keys(process.env).sort();
|
|
21
|
+
return { content: [{ type: "text", text: keys.join("\n") }] };
|
|
22
|
+
});
|
|
22
23
|
server.tool("get_jira_issue", "Fetch a Jira issue by its key (e.g. PROJ-123)", { issue_key: z.string().describe("Jira issue key, e.g. PROJ-123") }, async ({ issue_key }) => {
|
|
23
24
|
const { data } = await jira.get(`/issue/${issue_key}`);
|
|
24
25
|
const f = data.fields;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -3,13 +3,9 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
3
3
|
import axios from "axios";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
if (!JIRA_BASE_URL || !JIRA_PAT) {
|
|
10
|
-
console.error("Missing JIRA_BASE_URL or JIRA_PAT environment variables");
|
|
11
|
-
process.exit(1);
|
|
12
|
-
}
|
|
6
|
+
// Support both direct env vars (local) and Codemie platform integration env vars
|
|
7
|
+
const JIRA_BASE_URL = process.env.JIRA_BASE_URL || process.env.url;
|
|
8
|
+
const JIRA_PAT = process.env.JIRA_PAT || process.env.token;
|
|
13
9
|
|
|
14
10
|
const jira = axios.create({
|
|
15
11
|
baseURL: `${JIRA_BASE_URL}/rest/api/2`,
|
|
@@ -24,6 +20,16 @@ const server = new McpServer({
|
|
|
24
20
|
version: "1.0.0",
|
|
25
21
|
});
|
|
26
22
|
|
|
23
|
+
server.tool(
|
|
24
|
+
"debug_env",
|
|
25
|
+
"Debug: show which env variables are set (keys only, no values)",
|
|
26
|
+
{},
|
|
27
|
+
async () => {
|
|
28
|
+
const keys = Object.keys(process.env).sort();
|
|
29
|
+
return { content: [{ type: "text", text: keys.join("\n") }] };
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
|
|
27
33
|
server.tool(
|
|
28
34
|
"get_jira_issue",
|
|
29
35
|
"Fetch a Jira issue by its key (e.g. PROJ-123)",
|