quickcall-integrations 0.3.7__py3-none-any.whl → 0.3.9__py3-none-any.whl

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.
@@ -582,8 +582,16 @@ class GitHubClient:
582
582
  # Issue Operations
583
583
  # ========================================================================
584
584
 
585
- def _issue_to_dict(self, issue) -> Dict[str, Any]:
585
+ def _issue_to_dict(self, issue, summary: bool = False) -> Dict[str, Any]:
586
586
  """Convert PyGithub Issue to dict."""
587
+ if summary:
588
+ return {
589
+ "number": issue.number,
590
+ "title": issue.title,
591
+ "state": issue.state,
592
+ "labels": [label.name for label in issue.labels],
593
+ "html_url": issue.html_url,
594
+ }
587
595
  return {
588
596
  "number": issue.number,
589
597
  "title": issue.title,
@@ -595,6 +603,70 @@ class GitHubClient:
595
603
  "created_at": issue.created_at.isoformat(),
596
604
  }
597
605
 
606
+ def list_issues(
607
+ self,
608
+ owner: Optional[str] = None,
609
+ repo: Optional[str] = None,
610
+ state: str = "open",
611
+ labels: Optional[List[str]] = None,
612
+ assignee: Optional[str] = None,
613
+ creator: Optional[str] = None,
614
+ milestone: Optional[str] = None,
615
+ sort: str = "updated",
616
+ limit: int = 30,
617
+ ) -> List[Dict[str, Any]]:
618
+ """
619
+ List issues in a repository.
620
+
621
+ Args:
622
+ owner: Repository owner
623
+ repo: Repository name
624
+ state: Issue state: 'open', 'closed', or 'all'
625
+ labels: Filter by labels
626
+ assignee: Filter by assignee username
627
+ creator: Filter by issue creator username
628
+ milestone: Filter by milestone (number, title, or '*' for any, 'none' for no milestone)
629
+ sort: Sort by 'created', 'updated', or 'comments'
630
+ limit: Maximum issues to return
631
+
632
+ Returns:
633
+ List of issue summaries
634
+ """
635
+ gh_repo = self._get_repo(owner, repo)
636
+
637
+ kwargs = {"state": state, "sort": sort, "direction": "desc"}
638
+ if labels:
639
+ kwargs["labels"] = labels
640
+ if assignee:
641
+ kwargs["assignee"] = assignee
642
+ if creator:
643
+ kwargs["creator"] = creator
644
+ if milestone:
645
+ # Handle milestone - can be number, '*', 'none', or title
646
+ if milestone == "*" or milestone == "none":
647
+ kwargs["milestone"] = milestone
648
+ elif milestone.isdigit():
649
+ kwargs["milestone"] = gh_repo.get_milestone(int(milestone))
650
+ else:
651
+ # Search by title
652
+ for ms in gh_repo.get_milestones(state="all"):
653
+ if ms.title.lower() == milestone.lower():
654
+ kwargs["milestone"] = ms
655
+ break
656
+
657
+ issues = []
658
+ count = 0
659
+ for issue in gh_repo.get_issues(**kwargs):
660
+ # Skip pull requests (GitHub API returns PRs in issues endpoint)
661
+ if issue.pull_request is not None:
662
+ continue
663
+ issues.append(self._issue_to_dict(issue, summary=True))
664
+ count += 1
665
+ if count >= limit:
666
+ break
667
+
668
+ return issues
669
+
598
670
  def create_issue(
599
671
  self,
600
672
  title: str,
@@ -10,7 +10,7 @@ Also provides GitHub PAT authentication for users who can't install the GitHub A
10
10
  import os
11
11
  import logging
12
12
  import webbrowser
13
- from typing import Dict, Any
13
+ from typing import Dict, Any, Optional
14
14
 
15
15
  import httpx
16
16
  from github import Github, Auth, GithubException
@@ -20,6 +20,7 @@ from pydantic import Field
20
20
  from mcp_server.auth import (
21
21
  get_credential_store,
22
22
  DeviceFlowAuth,
23
+ get_github_pat,
23
24
  )
24
25
 
25
26
  logger = logging.getLogger(__name__)
@@ -532,9 +533,10 @@ def create_auth_tools(mcp: FastMCP):
532
533
 
533
534
  @mcp.tool(tags={"auth", "github"})
534
535
  def connect_github_via_pat(
535
- token: str = Field(
536
- ...,
537
- description="GitHub Personal Access Token (ghp_xxx or github_pat_xxx)",
536
+ token: Optional[str] = Field(
537
+ default=None,
538
+ description="GitHub Personal Access Token (ghp_xxx or github_pat_xxx). "
539
+ "If not provided, auto-detects from .quickcall.env or GITHUB_TOKEN env var.",
538
540
  ),
539
541
  ) -> Dict[str, Any]:
540
542
  """
@@ -543,17 +545,13 @@ def create_auth_tools(mcp: FastMCP):
543
545
  Use this if your organization can't install the QuickCall GitHub App.
544
546
  This is an alternative to the standard connect_github flow.
545
547
 
546
- This command:
547
- 1. Validates your PAT by calling GitHub API
548
- 2. Auto-detects your GitHub username
549
- 3. Stores the PAT securely in ~/.quickcall/credentials.json
550
-
551
- After connecting, you can use GitHub tools like list_repos, list_prs, etc.
548
+ Token auto-detection locations (in order):
549
+ 1. GITHUB_TOKEN or GITHUB_PAT environment variable
550
+ 2. .quickcall.env in your project root (where .git is)
551
+ 3. ~/.quickcall.env in your home directory
552
552
 
553
553
  Create a PAT at: https://github.com/settings/tokens
554
- Required scopes:
555
- - repo (full access to private repos)
556
- - OR public_repo (public repos only)
554
+ Required scopes (classic PAT): project, read:user, repo
557
555
 
558
556
  Note: PAT mode works independently of QuickCall. You don't need
559
557
  to run connect_quickcall first. However, Slack tools still require
@@ -571,11 +569,29 @@ def create_auth_tools(mcp: FastMCP):
571
569
  "hint": "Use disconnect_github_pat to remove it, then connect again with a new token.",
572
570
  }
573
571
 
572
+ # Auto-detect token if not provided
573
+ token_source = "provided directly"
574
+ if not token:
575
+ token, token_source = get_github_pat()
576
+ if not token:
577
+ return {
578
+ "status": "error",
579
+ "message": "No token provided and none found automatically.",
580
+ "searched_locations": [
581
+ "GITHUB_TOKEN / GITHUB_PAT environment variables",
582
+ ".quickcall.env in project root (where .git is located)",
583
+ "~/.quickcall.env in home directory",
584
+ ],
585
+ "hint": "Either provide the token directly, set GITHUB_TOKEN env var, "
586
+ "or create .quickcall.env with GITHUB_TOKEN=ghp_xxx",
587
+ }
588
+
574
589
  # Validate token format
575
590
  if not token.startswith(("ghp_", "github_pat_")):
576
591
  return {
577
592
  "status": "error",
578
593
  "message": "Invalid token format. GitHub PATs start with 'ghp_' or 'github_pat_'",
594
+ "token_source": token_source,
579
595
  "hint": "Create a new token at https://github.com/settings/tokens",
580
596
  }
581
597
 
@@ -619,6 +635,7 @@ def create_auth_tools(mcp: FastMCP):
619
635
  "message": f"Successfully connected GitHub as {username}!",
620
636
  "username": username,
621
637
  "mode": "pat",
638
+ "token_source": token_source,
622
639
  "hint": "You can now use GitHub tools. Run check_github_connection to verify.",
623
640
  }
624
641
 
@@ -270,7 +270,7 @@ def _get_client() -> GitHubClient:
270
270
  "2. Run connect_quickcall to use QuickCall (GitHub App + Slack)\n"
271
271
  "3. Set GITHUB_TOKEN environment variable\n\n"
272
272
  "For PAT: Create token at https://github.com/settings/tokens\n"
273
- "Required scopes: repo (private) or public_repo (public only)"
273
+ "Required scopes (classic PAT): project, read:user, repo"
274
274
  )
275
275
 
276
276
 
@@ -570,7 +570,7 @@ def create_github_tools(mcp: FastMCP) -> None:
570
570
  def manage_issues(
571
571
  action: str = Field(
572
572
  ...,
573
- description="Action: 'view', 'create', 'update', 'close', 'reopen', 'comment', "
573
+ description="Action: 'list', 'view', 'create', 'update', 'close', 'reopen', 'comment', "
574
574
  "'add_sub_issue', 'remove_sub_issue', 'list_sub_issues'",
575
575
  ),
576
576
  issue_numbers: Optional[List[int]] = Field(
@@ -610,13 +610,35 @@ def create_github_tools(mcp: FastMCP) -> None:
610
610
  default=None,
611
611
  description="Repository name. Required.",
612
612
  ),
613
+ state: Optional[str] = Field(
614
+ default="open",
615
+ description="Issue state filter for 'list': 'open', 'closed', or 'all' (default: 'open')",
616
+ ),
617
+ creator: Optional[str] = Field(
618
+ default=None,
619
+ description="Filter by issue creator username (for 'list')",
620
+ ),
621
+ milestone: Optional[str] = Field(
622
+ default=None,
623
+ description="Filter by milestone: number, title, '*' (any), or 'none' (for 'list')",
624
+ ),
625
+ sort: Optional[str] = Field(
626
+ default="updated",
627
+ description="Sort by: 'created', 'updated', or 'comments' (for 'list', default: 'updated')",
628
+ ),
629
+ limit: Optional[int] = Field(
630
+ default=30,
631
+ description="Maximum issues to return for 'list' action (default: 30)",
632
+ ),
613
633
  ) -> dict:
614
634
  """
615
- Manage GitHub issues: view, create, update, close, reopen, comment, and sub-issues.
635
+ Manage GitHub issues: list, view, create, update, close, reopen, comment, and sub-issues.
616
636
 
617
637
  Supports bulk operations for view/close/reopen/comment via issue_numbers list.
618
638
 
619
639
  Examples:
640
+ - list: manage_issues(action="list", state="open", milestone="v1.0")
641
+ - list by creator: manage_issues(action="list", creator="username")
620
642
  - view: manage_issues(action="view", issue_numbers=[42])
621
643
  - create: manage_issues(action="create", title="Bug", template="bug_report")
622
644
  - create as sub-issue: manage_issues(action="create", title="Task 1", parent_issue=42)
@@ -629,6 +651,26 @@ def create_github_tools(mcp: FastMCP) -> None:
629
651
  try:
630
652
  client = _get_client()
631
653
 
654
+ # === LIST ACTION ===
655
+ if action == "list":
656
+ issues = client.list_issues(
657
+ owner=owner,
658
+ repo=repo,
659
+ state=state or "open",
660
+ labels=labels,
661
+ assignee=assignees[0] if assignees else None,
662
+ creator=creator,
663
+ milestone=milestone,
664
+ sort=sort or "updated",
665
+ limit=limit or 30,
666
+ )
667
+ return {
668
+ "action": "list",
669
+ "state": state or "open",
670
+ "count": len(issues),
671
+ "issues": issues,
672
+ }
673
+
632
674
  # === CREATE ACTION ===
633
675
  if action == "create":
634
676
  if not title:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quickcall-integrations
3
- Version: 0.3.7
3
+ Version: 0.3.9
4
4
  Summary: MCP server with developer integrations for Claude Code and Cursor
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: fastmcp>=2.13.0
@@ -90,7 +90,7 @@ Add to MCP config (`~/.cursor/mcp.json` or `.cursor/mcp.json`):
90
90
  | **Slack** | Read/send messages, threads, channels | Yes |
91
91
 
92
92
  <details>
93
- <summary><strong>Available Tools (23)</strong></summary>
93
+ <summary><strong>Available Tools (24)</strong></summary>
94
94
 
95
95
  ### Git
96
96
  | Tool | Description |
@@ -102,10 +102,11 @@ Add to MCP config (`~/.cursor/mcp.json` or `.cursor/mcp.json`):
102
102
  |------|-------------|
103
103
  | `list_repos` | List accessible repositories |
104
104
  | `list_prs` | List pull requests (open/closed/all) |
105
- | `get_pr` | Get PR details (title, description, files changed) |
105
+ | `get_prs` | Get PR details (title, description, files changed) |
106
106
  | `list_commits` | List commits with optional filters |
107
107
  | `get_commit` | Get commit details (message, stats, files) |
108
108
  | `list_branches` | List repository branches |
109
+ | `manage_issues` | List, view, create, update, close, reopen, comment on issues + sub-issues |
109
110
  | `check_github_connection` | Verify GitHub connection |
110
111
 
111
112
  ### Slack
@@ -172,9 +173,13 @@ GITHUB_USERNAME=your-username # Optional: for better UX
172
173
 
173
174
  **Create a PAT at:** https://github.com/settings/tokens
174
175
 
175
- **Required scopes:**
176
- - `repo` - Full access to private repositories
177
- - `public_repo` - Access to public repositories only (if you don't need private repos)
176
+ **Required scopes (classic PAT):**
177
+
178
+ | Scope | Used For |
179
+ |-------|----------|
180
+ | `project` | GitHub Projects access |
181
+ | `read:user` | Read user profile data |
182
+ | `repo` | PRs, commits, branches, issues |
178
183
 
179
184
  **Note:** PAT mode provides access to GitHub tools only. For Slack integration, use QuickCall authentication.
180
185
 
@@ -228,6 +233,100 @@ List open PRs on [repo] and send titles to #updates channel
228
233
  What did I work on this week? Send summary to #standup
229
234
  ```
230
235
 
236
+ ## Issue Management
237
+
238
+ The `manage_issues` tool provides full issue lifecycle management:
239
+
240
+ ### Actions
241
+
242
+ | Action | Description |
243
+ |--------|-------------|
244
+ | `list` | List issues with filters |
245
+ | `view` | View issue details |
246
+ | `create` | Create new issue (with optional template) |
247
+ | `update` | Update issue title/body/labels |
248
+ | `close` | Close issue(s) |
249
+ | `reopen` | Reopen issue(s) |
250
+ | `comment` | Add comment to issue(s) |
251
+ | `add_sub_issue` | Add child issue to parent |
252
+ | `remove_sub_issue` | Remove child from parent |
253
+ | `list_sub_issues` | List sub-issues of a parent |
254
+
255
+ ### List Filters
256
+
257
+ | Filter | Description |
258
+ |--------|-------------|
259
+ | `state` | `'open'`, `'closed'`, or `'all'` (default: `'open'`) |
260
+ | `labels` | Filter by one or more labels |
261
+ | `assignees` | Filter by assignee |
262
+ | `creator` | Filter by issue creator username |
263
+ | `milestone` | Filter by milestone: number, title, `'*'` (any), or `'none'` |
264
+ | `sort` | Sort by: `'created'`, `'updated'`, or `'comments'` (default: `'updated'`) |
265
+ | `limit` | Max issues to return (default: 30) |
266
+
267
+ **Examples:**
268
+ ```
269
+ List open issues in milestone v1.0
270
+ List issues created by sagar
271
+ Show closed bugs sorted by comments
272
+ List issues without a milestone
273
+ ```
274
+
275
+ ### Issue Templates
276
+
277
+ QuickCall supports issue templates from two sources:
278
+
279
+ **1. GitHub Native Templates** (`.github/ISSUE_TEMPLATE/*.yml`)
280
+
281
+ Standard GitHub issue templates are automatically detected:
282
+ ```yaml
283
+ # .github/ISSUE_TEMPLATE/bug_report.yml
284
+ name: Bug Report
285
+ description: Report a bug
286
+ labels: [bug]
287
+ body:
288
+ - type: textarea
289
+ attributes:
290
+ label: Description
291
+ ```
292
+
293
+ **2. Custom Templates** (`.quickcall.env`)
294
+
295
+ Define custom templates in your project config:
296
+ ```bash
297
+ # .quickcall.env
298
+ ISSUE_TEMPLATE_PATH=/path/to/templates.yml
299
+ ```
300
+
301
+ ```yaml
302
+ # templates.yml
303
+ bug_report:
304
+ name: Bug Report
305
+ description: Report a bug
306
+ labels: [bug]
307
+ title_prefix: "[BUG] "
308
+ body: |
309
+ ## Description
310
+
311
+ ## Steps to Reproduce
312
+
313
+ ## Expected Behavior
314
+
315
+ feature_request:
316
+ name: Feature Request
317
+ labels: [enhancement]
318
+ body: |
319
+ ## Problem
320
+
321
+ ## Proposed Solution
322
+ ```
323
+
324
+ **Usage:**
325
+ ```
326
+ Create a bug report issue titled "Login fails on Safari"
327
+ Create issue with feature_request template
328
+ ```
329
+
231
330
  ## Troubleshooting
232
331
 
233
332
  ### Clean Reinstall
@@ -1,7 +1,7 @@
1
1
  mcp_server/__init__.py,sha256=6KGzjSPyVB6vQh150DwBjINM_CsZNDhOzwSQFWpXz0U,301
2
2
  mcp_server/server.py,sha256=kv5hh0J-M7yENUBBNI1bkq1y7MB0zn5R_-R1tib6_sk,3108
3
3
  mcp_server/api_clients/__init__.py,sha256=kOG5_sxIVpAx_tvf1nq_P0QCkqojAVidRE-wenLS-Wc,207
4
- mcp_server/api_clients/github_client.py,sha256=EXwNEP2u5r5YbVgxyaJO0Yb7eQixMk6QWhid7IIQ5uY,37568
4
+ mcp_server/api_clients/github_client.py,sha256=Mlh6BzMhZ05NqkX9A2O80eJIQXWuW4FnnN1DBM0WKC8,40135
5
5
  mcp_server/api_clients/slack_client.py,sha256=w3rcGghttfYw8Ird2beNo2LEYLc3rCTbUKMH4X7QQuQ,16447
6
6
  mcp_server/auth/__init__.py,sha256=D-JS0Qe7FkeJjYx92u_AqPx8ZRoB3dKMowzzJXlX6cc,780
7
7
  mcp_server/auth/credentials.py,sha256=sDS0W5c16i_UGvhG8Sh1RO93FxRn-hHVAdI9hlWuhx0,20011
@@ -10,12 +10,12 @@ mcp_server/resources/__init__.py,sha256=JrMa3Kf-DmeCB4GwVNfmfw9OGnxF9pJJxCw9Y7u7
10
10
  mcp_server/resources/github_resources.py,sha256=sXE06j9jrSDODxH2832fiCtY9n1lKBQR8QZ8U5wYbJY,4030
11
11
  mcp_server/resources/slack_resources.py,sha256=b_CPxAicwkF3PsBXIat4QoLbDUHM2g_iPzgzvVpwjaw,1687
12
12
  mcp_server/tools/__init__.py,sha256=vIR2ujAaTXm2DgpTsVNz3brI4G34p-Jeg44Qe0uvWc0,405
13
- mcp_server/tools/auth_tools.py,sha256=kCPjPC1jrVz0XaRAwPea-ue8ybjLLTxyILplBDJ9Mv4,24477
13
+ mcp_server/tools/auth_tools.py,sha256=BPuj9M0pZOvvWHxH0HPdiVm-Y6DJyD-PEvtrIh68vbc,25409
14
14
  mcp_server/tools/git_tools.py,sha256=jyCTQR2eSzUFXMt0Y8x66758-VY8YCY14DDUJt7GY2U,13957
15
- mcp_server/tools/github_tools.py,sha256=ogLo0j1G44LTBIOknPgOG-JgTnLaNLGbLj1UccgWtoE,38337
15
+ mcp_server/tools/github_tools.py,sha256=2YE0RtkfartAuLVUciVFuycqc-B3OhN0uNPwhDm1t48,40053
16
16
  mcp_server/tools/slack_tools.py,sha256=-HVE_x3Z1KMeYGi1xhyppEwz5ZF-I-ZD0-Up8yBeoYE,11796
17
17
  mcp_server/tools/utility_tools.py,sha256=oxAXpdqtPeB5Ug5dvk54V504r-8v1AO4_px-sO6LFOw,3910
18
- quickcall_integrations-0.3.7.dist-info/METADATA,sha256=_76mJSIKsz6RU0o6uAmHYEXK9NetNnSMviVycU1T3M0,7070
19
- quickcall_integrations-0.3.7.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
20
- quickcall_integrations-0.3.7.dist-info/entry_points.txt,sha256=kkcunmJUzncYvQ1rOR35V2LPm2HcFTKzdI2l3n7NwiM,66
21
- quickcall_integrations-0.3.7.dist-info/RECORD,,
18
+ quickcall_integrations-0.3.9.dist-info/METADATA,sha256=thgEYROxcB1cBO4BsAunkrS9BIYtyTmLWTe3Fci5qSI,9415
19
+ quickcall_integrations-0.3.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
20
+ quickcall_integrations-0.3.9.dist-info/entry_points.txt,sha256=kkcunmJUzncYvQ1rOR35V2LPm2HcFTKzdI2l3n7NwiM,66
21
+ quickcall_integrations-0.3.9.dist-info/RECORD,,