Bootstrap session context with get_session_context
Goal: fetch a repository’s open milestones and, optionally, a Projects v2
board’s state in one call — the equivalent of what Claude Code’s
session-start.mjs hook injects automatically, for any MCP host that has no
such hook.
Prerequisites
Section titled “Prerequisites”- Read access to the target repository and (if requesting board state) the target project.
-
For milestones only:
{ "owner": "your-org", "repo": "your-repo" } -
For milestones plus board state, add the project fields:
{"owner": "your-org","repo": "your-repo","projectOwnerLogin": "your-org","projectNumber": 1}projectOwnerTypedefaults toorganization; pass"user"for a user-owned project. -
Read the response:
{ openMilestones: [...], projectBoard: {...} | null }.
Verify it worked
Section titled “Verify it worked”openMilestonesmatcheslist_milestonescalled withstate: "open".projectBoardisnullunless you supplied bothprojectOwnerLoginandprojectNumber— supplying only one still returnsnullforprojectBoard, it does not error.- When non-null,
projectBoardhas the same shape asget_project_items’s result.
See also: tool reference.