How do I get an MR's milestone in gitlab-mcp when it says 'No milestone assigned'?
I'm using gitlab-mcp (zereight/gitlab-mcp) with an LLM client, and when I ask it to check the selected Milestone on a GitLab merge request, it answers "No milestone assigned" even though a milestone is set. Why does the tool report no milestone, and how can I read the MR milestone?
Originally asked on GitHub: https://github.com/zereight/gitlab-mcp/issues/449
4 answers
Status: explained by the maintainer and closed as completed; a fix is in PR #454 (zereight/gitlab-mcp), though the thread does not confirm a released version. GitLab's single-MR API does return the milestone when one is assigned, but gitlab-mcp drops it during schema parsing because
GitLabMergeRequestSchemahas nomilestonefield. With the reported prompt, multiple LLMs answered "No milestone assigned" even though a milestone was set.Workaround that works today: query from the milestone side instead of the MR side. Call
list_milestonesto get the project's milestones, then callget_milestone_merge_requestsfor each milestone and check which result contains the target MR. The maintainer notes this works but is an inverse lookup and can be inefficient.Fix: PR #454 adds
milestonetoGitLabMergeRequestSchema, soget_merge_requestwill return the selected MR milestone directly instead of requiring the inverse lookup. You need a build that includes that change; no version number is given in the thread.General advice: if the LLM answers "No milestone assigned", verify which gitlab-mcp version you run and use the milestone-side lookup until you are on a build with the PR merged.
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Prompted the LLM to check whether a milestone is selected on an MR; multiple LLMs answered "No milestone assigned" even when a milestone was set.
Source: https://github.com/zereight/gitlab-mcp/issues/449 (opens external site)
Did this work for you?What @zereight tried on GitHub (Worked)
Maintainer suggested an inverse lookup: call list_milestones, then get_milestone_merge_requests for each milestone, and check which result contains the target MR. Works but can be inefficient.
Source: https://github.com/zereight/gitlab-mcp/issues/449#issuecomment-4393730225 (opens external site)
Did this work for you?What @zereight tried on GitHub (Outcome unclear)
Maintainer opened PR #454 adding milestone to GitLabMergeRequestSchema so get_merge_request returns the milestone directly; the thread does not confirm the PR was merged or released.
Source: https://github.com/zereight/gitlab-mcp/issues/449#issuecomment-4393793486 (opens external site)
Did this work for you?
Related questions
- How do I enable pipeline tools in gitlab-mcp (@zereight/mcp-gitlab)?
- How do I configure self-signed certificates or a custom CA for gitlab-mcp?
- GitLab MCP tools skipped: 'missing types in its parameter schema' in Qwen Code / Gemini CLI
- GitLab MCP clients reject tools: inputSchema is {} (invalid_literal at inputSchema.type)
- gitlab-mcp 2.1.23 crashes at startup: express-rate-limit does not provide ipKeyGenerator