Skip to content

Commit ac59b02

Browse files
committed
docs: comprehensive documentation update
- Fix deprecated /rest/api/3/search to /rest/api/3/search/jql - Add TOON output format documentation - Add response truncation and raw logs section - Add Technical Details section - Enhance CLI commands with PATCH example - Add JMESPath filtering examples
1 parent 61f3316 commit ac59b02

1 file changed

Lines changed: 108 additions & 6 deletions

File tree

README.md

Lines changed: 108 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ This MCP server provides 5 generic tools that can access any Jira API endpoint:
119119
### Common API Paths
120120

121121
**Projects:**
122-
- `/rest/api/3/project/search` - List all projects
122+
- `/rest/api/3/project/search` - List all projects (paginated, recommended)
123+
- `/rest/api/3/project` - List all projects (non-paginated, legacy)
123124
- `/rest/api/3/project/{projectKeyOrId}` - Get project details
124125

125126
**Issues:**
126-
- `/rest/api/3/search/jql` - Search issues with JQL (use `jql` query param)
127+
- `/rest/api/3/search/jql` - Search issues with JQL (use `jql` query param). **IMPORTANT:** `/rest/api/3/search` is deprecated!
127128
- `/rest/api/3/issue/{issueIdOrKey}` - Get issue details
128129
- `/rest/api/3/issue` - Create issue (POST)
129130
- `/rest/api/3/issue/{issueIdOrKey}/transitions` - Get/perform transitions
@@ -143,6 +144,22 @@ This MCP server provides 5 generic tools that can access any Jira API endpoint:
143144
- `/rest/api/3/issuetype` - List issue types
144145
- `/rest/api/3/priority` - List priorities
145146

147+
### TOON Output Format
148+
149+
By default, all responses use **TOON (Token-Oriented Object Notation)** format, which reduces token usage by 30-60% compared to JSON. TOON uses tabular arrays and minimal syntax, making it ideal for AI consumption.
150+
151+
**To use JSON instead:** Add `--output-format json` to CLI commands or set `outputFormat: "json"` in MCP tool calls.
152+
153+
**Example TOON vs JSON:**
154+
```
155+
TOON: key|summary|status
156+
PROJ-1|First issue|Open
157+
PROJ-2|Second issue|Done
158+
159+
JSON: [{"key":"PROJ-1","summary":"First issue","status":"Open"},
160+
{"key":"PROJ-2","summary":"Second issue","status":"Done"}]
161+
```
162+
146163
### JMESPath Filtering
147164

148165
All tools support optional JMESPath (`jq`) filtering to extract specific data:
@@ -159,6 +176,15 @@ npx -y @aashari/mcp-server-atlassian-jira get \
159176
--jq "{key: key, summary: fields.summary, status: fields.status.name}"
160177
```
161178

179+
### Response Truncation and Raw Logs
180+
181+
For large API responses (>40k characters ≈ 10k tokens), responses are automatically truncated with guidance. The complete raw response is saved to `/tmp/mcp/mcp-server-atlassian-jira/<timestamp>-<random>.txt` for reference.
182+
183+
**When truncated, you'll see:**
184+
- A truncation notice with the raw file path
185+
- Suggestions to refine your query with better filters
186+
- Percentage of data shown vs total size
187+
162188
## Real-World Examples
163189

164190
### Explore Your Projects
@@ -194,13 +220,19 @@ Ask your AI assistant:
194220
The CLI mirrors the MCP tools for direct terminal access:
195221

196222
```bash
197-
# GET request
223+
# GET request (returns TOON format by default)
198224
npx -y @aashari/mcp-server-atlassian-jira get --path "/rest/api/3/project/search"
199225

200-
# GET with query parameters
226+
# GET with query parameters and JSON output
201227
npx -y @aashari/mcp-server-atlassian-jira get \
202228
--path "/rest/api/3/search/jql" \
203-
--query-params '{"jql": "project=DEV AND status=\"In Progress\"", "maxResults": "10"}'
229+
--query-params '{"jql": "project=DEV AND status=\"In Progress\"", "maxResults": "10"}' \
230+
--output-format json
231+
232+
# GET with JMESPath filtering to extract specific fields
233+
npx -y @aashari/mcp-server-atlassian-jira get \
234+
--path "/rest/api/3/issue/PROJ-123" \
235+
--jq "{key: key, summary: fields.summary, status: fields.status.name}"
204236

205237
# POST request (create an issue)
206238
npx -y @aashari/mcp-server-atlassian-jira post \
@@ -217,11 +249,21 @@ npx -y @aashari/mcp-server-atlassian-jira put \
217249
--path "/rest/api/3/issue/PROJ-123" \
218250
--body '{"fields": {"summary": "Updated title"}}'
219251

252+
# PATCH request (partial update)
253+
npx -y @aashari/mcp-server-atlassian-jira patch \
254+
--path "/rest/api/3/issue/PROJ-123" \
255+
--body '{"fields": {"summary": "Updated title"}}'
256+
220257
# DELETE request
221258
npx -y @aashari/mcp-server-atlassian-jira delete \
222259
--path "/rest/api/3/issue/PROJ-123/comment/12345"
223260
```
224261

262+
**Note:** All CLI commands support:
263+
- `--output-format` - Choose between `toon` (default, token-efficient) or `json`
264+
- `--jq` - Filter response with JMESPath expressions
265+
- `--query-params` - Pass query parameters as JSON string
266+
225267
## Troubleshooting
226268

227269
### "Authentication failed" or "403 Forbidden"
@@ -316,6 +358,59 @@ npx -y @aashari/mcp-server-atlassian-jira get \
316358
--query-params '{"jql": "assignee=currentUser() AND status=\"In Progress\""}'
317359
```
318360

361+
## Technical Details
362+
363+
### Recent Updates
364+
365+
**Version 3.2.1** (December 2025):
366+
- Added TOON output format for 30-60% token reduction
367+
- Implemented automatic response truncation for large payloads (>40k chars)
368+
- Raw API responses saved to `/tmp/mcp/mcp-server-atlassian-jira/` for reference
369+
- Updated to MCP SDK v1.23.0 with modern `registerTool` API
370+
- Fixed deprecated `/rest/api/3/search` endpoint (now use `/rest/api/3/search/jql`)
371+
- Updated all dependencies to latest versions (Zod v4.1.13, Commander v14.0.2)
372+
373+
### Requirements
374+
375+
- **Node.js**: 18.0.0 or higher
376+
- **MCP SDK**: v1.23.0 (uses modern registration APIs)
377+
- **Jira**: Cloud only (Server/Data Center not supported)
378+
379+
### Architecture
380+
381+
This server follows the 5-layer MCP architecture:
382+
1. **CLI Layer** - Human interface using Commander.js
383+
2. **Tools Layer** - AI interface with Zod validation
384+
3. **Controllers Layer** - Business logic and orchestration
385+
4. **Services Layer** - Direct Jira REST API calls
386+
5. **Utils Layer** - Cross-cutting concerns (logging, formatting, transport)
387+
388+
### Debugging
389+
390+
Enable debug logging by setting the `DEBUG` environment variable:
391+
392+
```bash
393+
# In Claude Desktop config
394+
{
395+
"mcpServers": {
396+
"jira": {
397+
"command": "npx",
398+
"args": ["-y", "@aashari/mcp-server-atlassian-jira"],
399+
"env": {
400+
"DEBUG": "true",
401+
"ATLASSIAN_SITE_NAME": "your-company",
402+
"ATLASSIAN_USER_EMAIL": "your.email@company.com",
403+
"ATLASSIAN_API_TOKEN": "your_api_token"
404+
}
405+
}
406+
}
407+
}
408+
```
409+
410+
Debug logs are written to `~/.mcp/data/mcp-server-atlassian-jira.<session-id>.log`
411+
412+
**Check raw API responses:** When responses are truncated, the full raw response is saved to `/tmp/mcp/mcp-server-atlassian-jira/<timestamp>-<random>.txt` with request/response details.
413+
319414
## Migration from v2.x
320415

321416
Version 3.0 replaces 8+ specific tools with 5 generic HTTP method tools. If you're upgrading from v2.x:
@@ -326,7 +421,7 @@ jira_ls_projects, jira_get_project, jira_ls_issues, jira_get_issue,
326421
jira_create_issue, jira_ls_comments, jira_add_comment, jira_ls_statuses, ...
327422
```
328423

329-
**After (v3.0):**
424+
**After (v3.0+):**
330425
```
331426
jira_get, jira_post, jira_put, jira_patch, jira_delete
332427
```
@@ -339,6 +434,13 @@ jira_get, jira_post, jira_put, jira_patch, jira_delete
339434
- `jira_add_comment` -> `jira_post` with path `/rest/api/3/issue/{key}/comment`
340435
- `jira_ls_statuses` -> `jira_get` with path `/rest/api/3/status`
341436

437+
**Benefits of v3.0+:**
438+
- Full access to any Jira REST API v3 endpoint (not just predefined tools)
439+
- JMESPath filtering for efficient data extraction
440+
- Consistent interface across all HTTP methods
441+
- TOON format for 30-60% token savings
442+
- Automatic response truncation with raw file logging
443+
342444
## Support
343445

344446
Need help? Here's how to get assistance:

0 commit comments

Comments
 (0)