@manhq/localmcp 1.0.0

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 (106) hide show
  1. package/README.md +239 -0
  2. package/README.vi.md +239 -0
  3. package/bin/localmcp.js +31 -0
  4. package/dist/cli.d.ts +2 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +333 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/index.d.ts +4 -0
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/index.js +102 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/services/atlassian/client.d.ts +4 -0
  13. package/dist/services/atlassian/client.d.ts.map +1 -0
  14. package/dist/services/atlassian/client.js +26 -0
  15. package/dist/services/atlassian/client.js.map +1 -0
  16. package/dist/services/atlassian/index.d.ts +3 -0
  17. package/dist/services/atlassian/index.d.ts.map +1 -0
  18. package/dist/services/atlassian/index.js +7 -0
  19. package/dist/services/atlassian/index.js.map +1 -0
  20. package/dist/services/atlassian/tools/confluence.d.ts +3 -0
  21. package/dist/services/atlassian/tools/confluence.d.ts.map +1 -0
  22. package/dist/services/atlassian/tools/confluence.js +222 -0
  23. package/dist/services/atlassian/tools/confluence.js.map +1 -0
  24. package/dist/services/atlassian/tools/jira.d.ts +3 -0
  25. package/dist/services/atlassian/tools/jira.d.ts.map +1 -0
  26. package/dist/services/atlassian/tools/jira.js +266 -0
  27. package/dist/services/atlassian/tools/jira.js.map +1 -0
  28. package/dist/services/atlassian/types.d.ts +74 -0
  29. package/dist/services/atlassian/types.d.ts.map +1 -0
  30. package/dist/services/atlassian/types.js +2 -0
  31. package/dist/services/atlassian/types.js.map +1 -0
  32. package/dist/services/figma/client.d.ts +3 -0
  33. package/dist/services/figma/client.d.ts.map +1 -0
  34. package/dist/services/figma/client.js +27 -0
  35. package/dist/services/figma/client.js.map +1 -0
  36. package/dist/services/figma/index.d.ts +3 -0
  37. package/dist/services/figma/index.d.ts.map +1 -0
  38. package/dist/services/figma/index.js +13 -0
  39. package/dist/services/figma/index.js.map +1 -0
  40. package/dist/services/figma/tools/comments.d.ts +3 -0
  41. package/dist/services/figma/tools/comments.d.ts.map +1 -0
  42. package/dist/services/figma/tools/comments.js +41 -0
  43. package/dist/services/figma/tools/comments.js.map +1 -0
  44. package/dist/services/figma/tools/components.d.ts +3 -0
  45. package/dist/services/figma/tools/components.d.ts.map +1 -0
  46. package/dist/services/figma/tools/components.js +101 -0
  47. package/dist/services/figma/tools/components.js.map +1 -0
  48. package/dist/services/figma/tools/files.d.ts +3 -0
  49. package/dist/services/figma/tools/files.d.ts.map +1 -0
  50. package/dist/services/figma/tools/files.js +86 -0
  51. package/dist/services/figma/tools/files.js.map +1 -0
  52. package/dist/services/figma/tools/images.d.ts +3 -0
  53. package/dist/services/figma/tools/images.d.ts.map +1 -0
  54. package/dist/services/figma/tools/images.js +67 -0
  55. package/dist/services/figma/tools/images.js.map +1 -0
  56. package/dist/services/figma/tools/variables.d.ts +3 -0
  57. package/dist/services/figma/tools/variables.d.ts.map +1 -0
  58. package/dist/services/figma/tools/variables.js +44 -0
  59. package/dist/services/figma/tools/variables.js.map +1 -0
  60. package/dist/services/figma/types.d.ts +65 -0
  61. package/dist/services/figma/types.d.ts.map +1 -0
  62. package/dist/services/figma/types.js +2 -0
  63. package/dist/services/figma/types.js.map +1 -0
  64. package/dist/services/google-chat/auth.d.ts +2 -0
  65. package/dist/services/google-chat/auth.d.ts.map +1 -0
  66. package/dist/services/google-chat/auth.js +18 -0
  67. package/dist/services/google-chat/auth.js.map +1 -0
  68. package/dist/services/google-chat/client.d.ts +3 -0
  69. package/dist/services/google-chat/client.d.ts.map +1 -0
  70. package/dist/services/google-chat/client.js +14 -0
  71. package/dist/services/google-chat/client.js.map +1 -0
  72. package/dist/services/google-chat/index.d.ts +3 -0
  73. package/dist/services/google-chat/index.d.ts.map +1 -0
  74. package/dist/services/google-chat/index.js +5 -0
  75. package/dist/services/google-chat/index.js.map +1 -0
  76. package/dist/services/google-chat/tools/messages.d.ts +3 -0
  77. package/dist/services/google-chat/tools/messages.d.ts.map +1 -0
  78. package/dist/services/google-chat/tools/messages.js +144 -0
  79. package/dist/services/google-chat/tools/messages.js.map +1 -0
  80. package/dist/services/google-chat/types.d.ts +31 -0
  81. package/dist/services/google-chat/types.d.ts.map +1 -0
  82. package/dist/services/google-chat/types.js +2 -0
  83. package/dist/services/google-chat/types.js.map +1 -0
  84. package/dist/shared/env.d.ts +18 -0
  85. package/dist/shared/env.d.ts.map +1 -0
  86. package/dist/shared/env.js +27 -0
  87. package/dist/shared/env.js.map +1 -0
  88. package/dist/shared/errors.d.ts +8 -0
  89. package/dist/shared/errors.d.ts.map +1 -0
  90. package/dist/shared/errors.js +38 -0
  91. package/dist/shared/errors.js.map +1 -0
  92. package/dist/shared/response.d.ts +7 -0
  93. package/dist/shared/response.d.ts.map +1 -0
  94. package/dist/shared/response.js +7 -0
  95. package/dist/shared/response.js.map +1 -0
  96. package/dist/shared/settings.d.ts +36 -0
  97. package/dist/shared/settings.d.ts.map +1 -0
  98. package/dist/shared/settings.js +104 -0
  99. package/dist/shared/settings.js.map +1 -0
  100. package/docs/atlassian.md +170 -0
  101. package/docs/figma.md +154 -0
  102. package/docs/google-chat.md +130 -0
  103. package/docs/vi/atlassian.md +170 -0
  104. package/docs/vi/figma.md +154 -0
  105. package/docs/vi/google-chat.md +130 -0
  106. package/package.json +53 -0
@@ -0,0 +1,170 @@
1
+ # Atlassian
2
+
3
+ [English](atlassian.md) | [Tiếng Việt](vi/atlassian.md)
4
+
5
+ Integrates Jira and Confluence through the Atlassian REST API.
6
+
7
+ ## Environment Variables
8
+
9
+ | Variable | Required | Description |
10
+ |----------|----------|-------------|
11
+ | `ATLASSIAN_HOST` | Yes | Organization URL, for example `https://yourcompany.atlassian.net` |
12
+ | `ATLASSIAN_EMAIL` | Yes | Atlassian account email |
13
+ | `ATLASSIAN_API_TOKEN` | Yes | API token from Atlassian account settings |
14
+
15
+ The service is enabled only when **all three** variables are set.
16
+
17
+ ### Get an API Token
18
+
19
+ 1. Go to [Atlassian API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)
20
+ 2. Create a new token and copy its value
21
+ 3. Add it to `.env`:
22
+ ```
23
+ ATLASSIAN_HOST=https://yourcompany.atlassian.net
24
+ ATLASSIAN_EMAIL=your@email.com
25
+ ATLASSIAN_API_TOKEN=ATATT3xxxxx
26
+ ```
27
+
28
+ ## MCP Endpoint
29
+
30
+ ```
31
+ http://localhost:47001/mcp/atlassian
32
+ ```
33
+
34
+ ## Register with AI Agents
35
+
36
+ **Claude Code** — `.claude/settings.local.json`
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "atlassian": {
41
+ "url": "http://localhost:47001/mcp/atlassian"
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ Or register from the command line:
48
+ ```bash
49
+ claude mcp add --transport http atlassian http://localhost:47001/mcp/atlassian
50
+ ```
51
+
52
+ **Codex** — `~/.codex/config.toml`
53
+ ```toml
54
+ [mcp_servers.atlassian]
55
+ url = "http://localhost:47001/mcp/atlassian"
56
+ ```
57
+
58
+ Or register from the command line:
59
+ ```bash
60
+ codex mcp add atlassian --url http://localhost:47001/mcp/atlassian
61
+ ```
62
+
63
+ **GitHub Copilot / VS Code** — `.vscode/mcp.json`
64
+ ```json
65
+ {
66
+ "servers": {
67
+ "atlassian": {
68
+ "type": "http",
69
+ "url": "http://localhost:47001/mcp/atlassian"
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ **Cursor** — `.cursor/mcp.json`
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "atlassian": {
80
+ "url": "http://localhost:47001/mcp/atlassian"
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ **Windsurf** — `~/.codeium/windsurf/mcp_config.json`
87
+ ```json
88
+ {
89
+ "mcpServers": {
90
+ "atlassian": {
91
+ "serverUrl": "http://localhost:47001/mcp/atlassian"
92
+ }
93
+ }
94
+ }
95
+ ```
96
+
97
+ **Antigravity** — `~/.gemini/config/mcp_config.json`
98
+ ```json
99
+ {
100
+ "mcpServers": {
101
+ "atlassian": {
102
+ "serverUrl": "http://localhost:47001/mcp/atlassian"
103
+ }
104
+ }
105
+ }
106
+ ```
107
+
108
+ ## Tools
109
+
110
+ ### Jira
111
+
112
+ | Tool | Description |
113
+ |------|-------------|
114
+ | `getJiraIssue` | Gets issue details by ID or key, for example `PROJECT-123`. |
115
+ | `searchJiraIssuesUsingJql` | Searches issues with JQL. |
116
+ | `createJiraIssue` | Creates a new issue in a project. |
117
+ | `editJiraIssue` | Updates summary, description, assignee, or priority. |
118
+ | `transitionJiraIssue` | Moves an issue through workflow states, for example to "In Progress" or "Done". |
119
+ | `getTransitionsForJiraIssue` | Lists available transitions for an issue. |
120
+ | `addCommentToJiraIssue` | Adds a comment to an issue. |
121
+ | `addWorklogToJiraIssue` | Logs work time on an issue. |
122
+ | `getVisibleJiraProjects` | Lists all projects the account can access. |
123
+ | `getJiraProjectIssueTypesMetadata` | Lists issue types in a project. |
124
+ | `getJiraIssueTypeMetaWithFields` | Gets field metadata for creating a specific issue type. |
125
+ | `getIssueLinkTypes` | Lists issue link types, such as blocks or duplicates. |
126
+ | `getJiraIssueRemoteIssueLinks` | Lists external links attached to an issue, for example Confluence pages. |
127
+ | `lookupJiraAccountId` | Finds a user's account ID by name or email. |
128
+
129
+ ### Confluence
130
+
131
+ | Tool | Description |
132
+ |------|-------------|
133
+ | `getConfluencePage` | Gets page content by ID. |
134
+ | `getConfluencePageDescendants` | Lists child pages for a page. |
135
+ | `getConfluencePageFooterComments` | Gets footer comments on a page. |
136
+ | `getConfluencePageInlineComments` | Gets inline comments attached to specific text. |
137
+ | `getConfluenceCommentChildren` | Shows replies to a comment. |
138
+ | `getConfluenceSpaces` | Lists all spaces the account can access. |
139
+ | `getPagesInConfluenceSpace` | Lists pages in a space. |
140
+ | `createConfluencePage` | Creates a new page in a space. |
141
+ | `updateConfluencePage` | Updates page content or title. Requires the current version number. |
142
+ | `createConfluenceFooterComment` | Adds a footer comment or reply to a page. |
143
+ | `createConfluenceInlineComment` | Creates an inline comment attached to specific text. |
144
+ | `searchConfluenceUsingCql` | Searches content with CQL. |
145
+
146
+ ## Common JQL Examples
147
+
148
+ ```
149
+ # Issues in progress in the current sprint
150
+ project = PROJ AND sprint in openSprints() AND status = "In Progress"
151
+
152
+ # Unresolved high-priority bugs
153
+ project = PROJ AND issuetype = Bug AND priority in (High, Highest) AND status != Done
154
+
155
+ # Issues assigned to me
156
+ assignee = currentUser() AND status != Done ORDER BY created DESC
157
+ ```
158
+
159
+ ## Common CQL Examples
160
+
161
+ ```
162
+ # Find pages in a space by title
163
+ space = "DEV" AND title ~ "API" AND type = page
164
+
165
+ # Find recently edited content
166
+ lastModified > now("-7d") ORDER BY lastModified DESC
167
+
168
+ # Find pages created by a specific user
169
+ creator = "user@email.com" AND type = page
170
+ ```
package/docs/figma.md ADDED
@@ -0,0 +1,154 @@
1
+ # Figma
2
+
3
+ [English](figma.md) | [Tiếng Việt](vi/figma.md)
4
+
5
+ Integrates the Figma API, allowing agents to read design files, retrieve design tokens, export images, and manage comments.
6
+
7
+ ## Environment Variables
8
+
9
+ | Variable | Required | Description |
10
+ |----------|----------|-------------|
11
+ | `FIGMA_HOST` | Yes | API base URL, defaults to `https://api.figma.com/v1` |
12
+ | `FIGMA_TOKEN` | Yes | Personal access token from Figma account settings |
13
+
14
+ The service is enabled only when **both** variables are set.
15
+
16
+ ### Get a Token
17
+
18
+ 1. Go to [Figma Account Settings](https://www.figma.com/settings)
19
+ 2. Scroll to **Personal access tokens** and create a new token
20
+ 3. Add it to `.env`:
21
+ ```
22
+ FIGMA_HOST=https://api.figma.com/v1
23
+ FIGMA_TOKEN=figd_xxxxxxxxxxxx
24
+ ```
25
+
26
+ ## MCP Endpoint
27
+
28
+ ```
29
+ http://localhost:47001/mcp/figma
30
+ ```
31
+
32
+ ## Register with AI Agents
33
+
34
+ **Claude Code** — `.claude/settings.local.json`
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "figma": {
39
+ "url": "http://localhost:47001/mcp/figma"
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ Or register from the command line:
46
+ ```bash
47
+ claude mcp add --transport http figma http://localhost:47001/mcp/figma
48
+ ```
49
+
50
+ **Codex** — `~/.codex/config.toml`
51
+ ```toml
52
+ [mcp_servers.figma]
53
+ url = "http://localhost:47001/mcp/figma"
54
+ ```
55
+
56
+ Or register from the command line:
57
+ ```bash
58
+ codex mcp add figma --url http://localhost:47001/mcp/figma
59
+ ```
60
+
61
+ **GitHub Copilot / VS Code** — `.vscode/mcp.json`
62
+ ```json
63
+ {
64
+ "servers": {
65
+ "figma": {
66
+ "type": "http",
67
+ "url": "http://localhost:47001/mcp/figma"
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
73
+ **Cursor** — `.cursor/mcp.json`
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "figma": {
78
+ "url": "http://localhost:47001/mcp/figma"
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ **Windsurf** — `~/.codeium/windsurf/mcp_config.json`
85
+ ```json
86
+ {
87
+ "mcpServers": {
88
+ "figma": {
89
+ "serverUrl": "http://localhost:47001/mcp/figma"
90
+ }
91
+ }
92
+ }
93
+ ```
94
+
95
+ **Antigravity** — `~/.gemini/config/mcp_config.json`
96
+ ```json
97
+ {
98
+ "mcpServers": {
99
+ "figma": {
100
+ "serverUrl": "http://localhost:47001/mcp/figma"
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ ## Tools
107
+
108
+ ### File & Node
109
+
110
+ | Tool | Description |
111
+ |------|-------------|
112
+ | `figma_get_metadata` | Gets the file tree or a specific node: name, ID, type, and bounding box. Use before reading detailed design data. |
113
+ | `figma_get_design_context` | Gets full design properties for a node: colors, typography, auto-layout, effects, and constraints. |
114
+
115
+ ### Comments
116
+
117
+ | Tool | Description |
118
+ |------|-------------|
119
+ | `figma_get_comments` | Gets all comments in a file: content, author, creation date, and resolved state. |
120
+ | `figma_post_comment` | Posts a comment to a file. Can attach to a specific node via `nodeId`. |
121
+
122
+ ### Design Tokens
123
+
124
+ | Tool | Description |
125
+ |------|-------------|
126
+ | `figma_get_variables` | Gets all local design variables in a file: colors, spacing, typography, radius, and more. |
127
+ | `figma_get_published_variables` | Gets design variables published from a library file. |
128
+
129
+ ### Images & Assets
130
+
131
+ | Tool | Description |
132
+ |------|-------------|
133
+ | `figma_export_image` | Exports a node as an image and returns a temporary download URL. Supports PNG, JPG, SVG, and PDF. |
134
+ | `figma_get_image_fills` | Gets download URLs for all image fills embedded in the file. |
135
+
136
+ ### Components & Styles
137
+
138
+ | Tool | Description |
139
+ |------|-------------|
140
+ | `figma_get_components` | Gets published components in the file: name, description, and node ID. |
141
+ | `figma_get_component_sets` | Gets component sets, meaning variant groups, in the file. |
142
+ | `figma_get_styles` | Gets all published styles: color styles, text styles, effect styles, and grid styles. |
143
+ | `figma_get_team_components` | Gets components from all shared team libraries. Requires `teamId`. |
144
+
145
+ ### Account
146
+
147
+ | Tool | Description |
148
+ |------|-------------|
149
+ | `figma_whoami` | Shows the authenticated Figma account: name, email, and account ID. |
150
+
151
+ ## Find fileKey and nodeId
152
+
153
+ - **fileKey**: the string in the Figma file URL, for example `https://www.figma.com/file/`**`AbCdEfGh`**`/File-name`
154
+ - **nodeId**: usually shaped like `123:456`; get it from the URL after selecting a layer, or use `figma_get_metadata` to browse the tree.
@@ -0,0 +1,130 @@
1
+ # Google Chat
2
+
3
+ [English](google-chat.md) | [Tiếng Việt](vi/google-chat.md)
4
+
5
+ Integrates the Google Chat API to search conversations, read messages, and send messages. The tool set is equivalent to the official [Google Chat MCP server](https://developers.google.com/workspace/chat/api/reference/mcp).
6
+
7
+ ## Environment Variables
8
+
9
+ | Variable | Required | Description |
10
+ |----------|----------|-------------|
11
+ | `GCHAT_CLIENT_ID` | Yes | OAuth 2.0 Client ID |
12
+ | `GCHAT_CLIENT_SECRET` | Yes | OAuth 2.0 Client Secret |
13
+ | `GCHAT_REFRESH_TOKEN` | Yes | OAuth 2.0 Refresh Token |
14
+
15
+ The service is enabled only when **all three** variables are set.
16
+
17
+ ### Get Credentials
18
+
19
+ 1. Go to [Google Cloud Console](https://console.cloud.google.com), then create or select a project
20
+ 2. Enable **Google Chat API**
21
+ 3. Go to **APIs & Services -> Credentials -> Create Credentials -> OAuth client ID**
22
+ - Application type: **Web application**
23
+ - Authorized redirect URIs: `http://localhost`
24
+ 4. Copy **Client ID** and **Client Secret**
25
+ 5. Get a Refresh Token by running an OAuth flow with these scopes:
26
+ ```
27
+ https://www.googleapis.com/auth/chat.spaces.readonly
28
+ https://www.googleapis.com/auth/chat.messages.readonly
29
+ https://www.googleapis.com/auth/chat.messages.create
30
+ ```
31
+ 6. Add credentials to `.env`:
32
+ ```
33
+ GCHAT_CLIENT_ID=xxxx.apps.googleusercontent.com
34
+ GCHAT_CLIENT_SECRET=GOCSPX-xxxx
35
+ GCHAT_REFRESH_TOKEN=1//xxxx
36
+ ```
37
+
38
+ ## MCP Endpoint
39
+
40
+ ```
41
+ http://localhost:47001/mcp/google-chat
42
+ ```
43
+
44
+ ## Register with AI Agents
45
+
46
+ **Claude Code** — `.claude/settings.local.json`
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "google-chat": {
51
+ "url": "http://localhost:47001/mcp/google-chat"
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ Or register from the command line:
58
+ ```bash
59
+ claude mcp add --transport http google-chat http://localhost:47001/mcp/google-chat
60
+ ```
61
+
62
+ **Codex** — `~/.codex/config.toml`
63
+ ```toml
64
+ [mcp_servers.google-chat]
65
+ url = "http://localhost:47001/mcp/google-chat"
66
+ ```
67
+
68
+ Or register from the command line:
69
+ ```bash
70
+ codex mcp add google-chat --url http://localhost:47001/mcp/google-chat
71
+ ```
72
+
73
+ **GitHub Copilot / VS Code** — `.vscode/mcp.json`
74
+ ```json
75
+ {
76
+ "servers": {
77
+ "google-chat": {
78
+ "type": "http",
79
+ "url": "http://localhost:47001/mcp/google-chat"
80
+ }
81
+ }
82
+ }
83
+ ```
84
+
85
+ **Cursor** — `.cursor/mcp.json`
86
+ ```json
87
+ {
88
+ "mcpServers": {
89
+ "google-chat": {
90
+ "url": "http://localhost:47001/mcp/google-chat"
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ **Windsurf** — `~/.codeium/windsurf/mcp_config.json`
97
+ ```json
98
+ {
99
+ "mcpServers": {
100
+ "google-chat": {
101
+ "serverUrl": "http://localhost:47001/mcp/google-chat"
102
+ }
103
+ }
104
+ }
105
+ ```
106
+
107
+ **Antigravity** — `~/.gemini/config/mcp_config.json`
108
+ ```json
109
+ {
110
+ "mcpServers": {
111
+ "google-chat": {
112
+ "serverUrl": "http://localhost:47001/mcp/google-chat"
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ ## Tools
119
+
120
+ | Tool | Description |
121
+ |------|-------------|
122
+ | `search_conversations` | Searches spaces, DMs, and group DMs by name or participant list. |
123
+ | `list_messages` | Gets messages from a conversation. Supports filtering by thread, time range, and pagination. |
124
+ | `search_messages` | Searches messages by keywords, sender, time, mention, and more. |
125
+ | `send_message` | Sends a message to a conversation. Supports replying to a specific thread. |
126
+
127
+ ## Get conversationId and threadId
128
+
129
+ - **conversationId**: the space resource name, shaped like `spaces/AAAAAAA`. Get it with `search_conversations`.
130
+ - **threadId**: the thread resource name, shaped like `spaces/AAAAAAA/threads/BBBBBBB`. Get it from `thread.name` in `list_messages` results.
@@ -0,0 +1,170 @@
1
+ # Atlassian
2
+
3
+ [English](../atlassian.md) | [Tiếng Việt](atlassian.md)
4
+
5
+ Tích hợp Jira và Confluence qua Atlassian REST API.
6
+
7
+ ## Biến môi trường
8
+
9
+ | Biến | Bắt buộc | Mô tả |
10
+ |------|----------|-------|
11
+ | `ATLASSIAN_HOST` | Có | URL tổ chức, ví dụ `https://yourcompany.atlassian.net` |
12
+ | `ATLASSIAN_EMAIL` | Có | Email tài khoản Atlassian |
13
+ | `ATLASSIAN_API_TOKEN` | Có | API token từ cài đặt tài khoản Atlassian |
14
+
15
+ Service chỉ được bật khi **cả ba** biến trên có giá trị.
16
+
17
+ ### Lấy API token
18
+
19
+ 1. Vào [Atlassian API tokens](https://id.atlassian.com/manage-profile/security/api-tokens)
20
+ 2. Tạo token mới, sao chép giá trị
21
+ 3. Điền vào `.env`:
22
+ ```
23
+ ATLASSIAN_HOST=https://yourcompany.atlassian.net
24
+ ATLASSIAN_EMAIL=your@email.com
25
+ ATLASSIAN_API_TOKEN=ATATT3xxxxx
26
+ ```
27
+
28
+ ## Endpoint MCP
29
+
30
+ ```
31
+ http://localhost:47001/mcp/atlassian
32
+ ```
33
+
34
+ ## Đăng ký với AI Agents
35
+
36
+ **Claude Code** — `.claude/settings.local.json`
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "atlassian": {
41
+ "url": "http://localhost:47001/mcp/atlassian"
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ Hoặc đăng ký bằng command line:
48
+ ```bash
49
+ claude mcp add --transport http atlassian http://localhost:47001/mcp/atlassian
50
+ ```
51
+
52
+ **Codex** — `~/.codex/config.toml`
53
+ ```toml
54
+ [mcp_servers.atlassian]
55
+ url = "http://localhost:47001/mcp/atlassian"
56
+ ```
57
+
58
+ Hoặc đăng ký bằng command line:
59
+ ```bash
60
+ codex mcp add atlassian --url http://localhost:47001/mcp/atlassian
61
+ ```
62
+
63
+ **GitHub Copilot / VS Code** — `.vscode/mcp.json`
64
+ ```json
65
+ {
66
+ "servers": {
67
+ "atlassian": {
68
+ "type": "http",
69
+ "url": "http://localhost:47001/mcp/atlassian"
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ **Cursor** — `.cursor/mcp.json`
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "atlassian": {
80
+ "url": "http://localhost:47001/mcp/atlassian"
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ **Windsurf** — `~/.codeium/windsurf/mcp_config.json`
87
+ ```json
88
+ {
89
+ "mcpServers": {
90
+ "atlassian": {
91
+ "serverUrl": "http://localhost:47001/mcp/atlassian"
92
+ }
93
+ }
94
+ }
95
+ ```
96
+
97
+ **Antigravity** — `~/.gemini/config/mcp_config.json`
98
+ ```json
99
+ {
100
+ "mcpServers": {
101
+ "atlassian": {
102
+ "serverUrl": "http://localhost:47001/mcp/atlassian"
103
+ }
104
+ }
105
+ }
106
+ ```
107
+
108
+ ## Danh sách tools
109
+
110
+ ### Jira
111
+
112
+ | Tool | Mô tả |
113
+ |------|-------|
114
+ | `getJiraIssue` | Lấy chi tiết issue theo ID hoặc key (ví dụ `PROJECT-123`) |
115
+ | `searchJiraIssuesUsingJql` | Tìm kiếm issues bằng JQL |
116
+ | `createJiraIssue` | Tạo issue mới trong một project |
117
+ | `editJiraIssue` | Cập nhật summary, description, assignee, hoặc priority |
118
+ | `transitionJiraIssue` | Chuyển trạng thái workflow (ví dụ sang "In Progress", "Done") |
119
+ | `getTransitionsForJiraIssue` | Liệt kê các transitions khả dụng của một issue |
120
+ | `addCommentToJiraIssue` | Đăng comment lên issue |
121
+ | `addWorklogToJiraIssue` | Ghi nhận thời gian làm việc lên issue |
122
+ | `getVisibleJiraProjects` | Liệt kê tất cả projects có quyền truy cập |
123
+ | `getJiraProjectIssueTypesMetadata` | Liệt kê các loại issue trong một project |
124
+ | `getJiraIssueTypeMetaWithFields` | Lấy metadata fields khi tạo issue theo loại cụ thể |
125
+ | `getIssueLinkTypes` | Liệt kê các kiểu liên kết issue (blocks, duplicates, v.v.) |
126
+ | `getJiraIssueRemoteIssueLinks` | Liệt kê các link ngoài gắn vào issue (ví dụ trang Confluence) |
127
+ | `lookupJiraAccountId` | Tìm account ID của user theo tên hoặc email |
128
+
129
+ ### Confluence
130
+
131
+ | Tool | Mô tả |
132
+ |------|-------|
133
+ | `getConfluencePage` | Lấy nội dung trang theo ID |
134
+ | `getConfluencePageDescendants` | Liệt kê các trang con của một trang |
135
+ | `getConfluencePageFooterComments` | Lấy footer comments của trang |
136
+ | `getConfluencePageInlineComments` | Lấy inline comments gắn với đoạn text cụ thể |
137
+ | `getConfluenceCommentChildren` | Xem các reply của một comment |
138
+ | `getConfluenceSpaces` | Liệt kê tất cả spaces có quyền truy cập |
139
+ | `getPagesInConfluenceSpace` | Liệt kê các trang trong một space |
140
+ | `createConfluencePage` | Tạo trang mới trong một space |
141
+ | `updateConfluencePage` | Cập nhật nội dung hoặc tiêu đề trang (cần số version hiện tại) |
142
+ | `createConfluenceFooterComment` | Thêm footer comment hoặc reply vào trang |
143
+ | `createConfluenceInlineComment` | Tạo inline comment gắn với đoạn text cụ thể |
144
+ | `searchConfluenceUsingCql` | Tìm kiếm nội dung bằng CQL |
145
+
146
+ ## Ví dụ JQL thường dùng
147
+
148
+ ```
149
+ # Issues đang làm trong sprint hiện tại
150
+ project = PROJ AND sprint in openSprints() AND status = "In Progress"
151
+
152
+ # Bugs chưa xử lý, ưu tiên cao
153
+ project = PROJ AND issuetype = Bug AND priority in (High, Highest) AND status != Done
154
+
155
+ # Issues được giao cho tôi
156
+ assignee = currentUser() AND status != Done ORDER BY created DESC
157
+ ```
158
+
159
+ ## Ví dụ CQL thường dùng
160
+
161
+ ```
162
+ # Tìm trang trong space theo tiêu đề
163
+ space = "DEV" AND title ~ "API" AND type = page
164
+
165
+ # Tìm nội dung được chỉnh sửa gần đây
166
+ lastModified > now("-7d") ORDER BY lastModified DESC
167
+
168
+ # Tìm trang của một người cụ thể
169
+ creator = "user@email.com" AND type = page
170
+ ```