Skip to content

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.

  • Read access to the target repository and (if requesting board state) the target project.
  1. For milestones only:

    { "owner": "your-org", "repo": "your-repo" }
  2. For milestones plus board state, add the project fields:

    {
    "owner": "your-org",
    "repo": "your-repo",
    "projectOwnerLogin": "your-org",
    "projectNumber": 1
    }

    projectOwnerType defaults to organization; pass "user" for a user-owned project.

  3. Read the response: { openMilestones: [...], projectBoard: {...} | null }.

  • openMilestones matches list_milestones called with state: "open".
  • projectBoard is null unless you supplied both projectOwnerLogin and projectNumber — supplying only one still returns null for projectBoard, it does not error.
  • When non-null, projectBoard has the same shape as get_project_items’s result.

See also: tool reference.