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, projectConfigPath: string | 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.
  • If projectBoard came back null and you expected board config to be picked up automatically, check projectConfigPath first: null there means the MCP server never found .config/gdlc/config.yml searching upward from its own cwd — most often because the server was launched from a directory above your repo (a multi-repo workspace root), which upward search cannot resolve (issue #106 / ADR-0005). Configure the global layer ($XDG_CONFIG_HOME/gdlc/config.yml) instead, or launch from the repo itself.

See also: tool reference.