Skip to content

Read an issue thread and your inbox over MCP - #244

Merged
imshashank merged 4 commits into
mainfrom
feat/mcp-inbox-and-issue-comments
Aug 8, 2026
Merged

imshashank merged 4 commits into
mainfrom
feat/mcp-inbox-and-issue-comments

Conversation

@imshashank

@imshashank imshashank commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Three tools so an assistant can work a board rather than only write to it.

  • list_issue_comments: an assistant could post a comment but never read the
    thread it was replying to. get_issue does not return comments and the docs
    equivalent list_doc_comments had no issue twin.
  • list_notifications: mentions already landed in the notification table and
    nothing exposed them, so an assistant could be named on an issue and never
    know. Each row resolves its issue, because a mention entity is the comment and
    the identifier was otherwise recoverable only by parsing the url.
  • mark_notification_read: the cursor. markRead already scopes to the caller,
    so one account cannot clear another inbox.

All three are thin wrappers over listComments, listInbox and markRead,
which already existed. No new tables and no schema change.

Greptile Summary

The PR adds MCP tools for reading issue discussions, listing the authenticated user's notifications, and marking notifications as read.

  • Registers and documents the three new MCP tools.
  • Enriches notifications with related issue summaries.
  • Resolves comment author names and exposes cursor-based comment pagination.
  • Adds integration coverage for pagination, authorization boundaries, filtering, deleted authors, and read-only tokens.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified in the changed paths.

The new tools delegate authorization and mutation to existing scoped services, preserve their pagination contracts, and add focused integration coverage for the exposed behavior.

Important Files Changed

Filename Overview
packages/mcp-server/src/tools/inbox.ts Adds caller-scoped notification listing, issue enrichment, and read-state updates without an accepted correctness or authorization defect.
packages/mcp-server/src/tools/issues.ts Adds authorized, paginated issue-comment retrieval with author-name enrichment.
packages/mcp-server/src/tools/index.ts Registers the new inbox tools alongside the existing MCP tool groups.
packages/mcp-server/tests/tools/inbox.test.ts Covers notification enrichment, filtering, caller isolation, read-state updates, and OAuth scope visibility.
packages/mcp-server/tests/tools/issue-comments.test.ts Covers ordering, pagination, contributor access, empty threads, and deleted-author fallback behavior.
docs/mcp.md Documents the three new tools and their required read or write scopes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[MCP client] --> B{Tool}
  B -->|list_issue_comments| C[Resolve authorized issue]
  C --> D[List paginated comments]
  D --> E[Resolve author names]
  E --> F[Return comment thread]
  B -->|list_notifications| G[List caller-scoped inbox]
  G --> H[Resolve comment-to-issue links]
  H --> I[Load issue summaries]
  I --> J[Return enriched notifications]
  B -->|mark_notification_read| K[Mark caller-owned rows read]
  K --> L[Return marked IDs]
Loading

Reviews (1): Last reviewed commit: "feat(mcp): mark your notifications read" | Re-trigger Greptile

An agent could post a comment but never read the one it was replying to.
get_issue does not return comments and there was no list tool, so the docs
equivalent list_doc_comments had no issue twin.
list_issue_comments had no coverage for an issue with zero comments or
for a comment whose author row is gone. Add both, including the trigger
disable needed to get past the restrict foreign key and actually orphan
a comment the way the fallback expects.
Mentions already landed in the notification table and nothing exposed them, so
an assistant could be named on an issue and never know. Resolves the issue on
each row, because a mention entity is the comment and the identifier was only
recoverable by parsing the url.
Without a cursor an assistant polling its inbox reprocesses the same mention on
every pass. markRead already scopes to the caller, so one account cannot clear
another inbox.
@imshashank
imshashank requested a review from pulkitxm as a code owner August 8, 2026 16:23
@vercel

vercel Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
orbit Ready Ready Preview Aug 8, 2026 4:23pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@imshashank, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 38 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0983466f-327d-447c-b2ee-0df3f65c1726

📥 Commits

Reviewing files that changed from the base of the PR and between 3f55e0b and ab666bf.

📒 Files selected for processing (6)
  • docs/mcp.md
  • packages/mcp-server/src/tools/inbox.ts
  • packages/mcp-server/src/tools/index.ts
  • packages/mcp-server/src/tools/issues.ts
  • packages/mcp-server/tests/tools/inbox.test.ts
  • packages/mcp-server/tests/tools/issue-comments.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added documentation Docs, the README, or anything that explains Orbit tests Test coverage and test infrastructure area: mcp The MCP server, its tools and its OAuth labels Aug 8, 2026
@imshashank
imshashank merged commit e03496c into main Aug 8, 2026
13 checks passed
@imshashank
imshashank deleted the feat/mcp-inbox-and-issue-comments branch August 8, 2026 19:06

This branch was successfully deployed

1 active deployment
Preview — ab666bfd Deployed Aug 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: mcp The MCP server, its tools and its OAuth documentation Docs, the README, or anything that explains Orbit tests Test coverage and test infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant