Document MCP search: empty merge_requests search returns HTTP 500 (use "*" workaround)
Summary
The GitLab MCP search tool returns HTTP 500 Internal Server Error when scope is merge_requests and search is empty ("") or whitespace-only (" "). The same call with scope: issues and empty search succeeds (returns []).
This affects Cursor users and agents that try to "list all merge requests" via search without a keyword (e.g. /pipeline-status-style listing, backlog commands, or agents omitting the required term).
Environment
- Client: Cursor IDE + GitLab plugin (MCP over
https://gitlab.com/api/v4/mcp) - MCP server version:
19.1.0-pre(viaget_mcp_server_version) - Repro project:
investing-for-charity/broker-pdf-processor(any project likely reproduces)
Steps to reproduce
- Authenticate to GitLab MCP.
- Call
searchwith:scope:merge_requestsproject_id:investing-for-charity/broker-pdf-processor(or any accessible project)search:""(empty string)- Optional:
state:openedorall
Actual behavior
500 Internal Server Error
Expected behavior
One of:
- 400 Bad Request with a clear message that
searchis required (docs already mark it required), or - Same behavior as issues scope with empty search (e.g. return
[]or list/filter bystateonly), or - MCP server coerces empty search to a safe default (e.g.
*) before calling the Search API.
Workaround (works today)
Use a non-empty search term, e.g. search: "*" or a project keyword. Example that succeeds:
{
"scope": "merge_requests",
"project_id": "investing-for-charity/broker-pdf-processor",
"search": "*",
"state": "all",
"per_page": 10
}Returns [] when no MRs exist (not 500).
Suggested plugin/docs fix
- Update plugin commands/skills that imply "list all MRs" to document
search: "*". - Add a note in README or
review-merge-request/ agent prompts: never call MR search with emptysearch.
Upstream
If the root cause is in the GitLab MCP server or Search API (not Cursor plugin templates), please forward to gitlab-org/gitlab with the same repro.
Reporter
Observed while integrating GitLab MCP in Cursor (May 2026).