Bug: get_latest_pipeline function returns 403 Forbidden error
Bug Report: get_latest_pipeline function returns 403 Forbidden
Summary
The get_latest_pipeline
function in the GitLab MCP server returns a 403 Forbidden error when it should return pipeline data. Other pipeline-related functions work correctly.
What I was doing
I was using Claude Code to monitor CI pipeline status after creating a merge request on john/mcp-servers-graphile-migrate
repository.
What I expected to happen
The get_latest_pipeline
function should return the latest pipeline data for the specified project and branch, similar to how get_pipelines
works.
What actually happened
The function returned:
MCP error -32603: GitLab API error: 403 Forbidden
Reproduction Steps
- Use the MCP server function:
get_latest_pipeline
- Pass parameters:
-
project_id
:"john/mcp-servers-graphile-migrate"
-
ref
:"fix/issue-6-core-infrastructure"
-
- Observe the 403 Forbidden error
Additional Context
Working Functions
The following pipeline-related functions work correctly with the same project:
-
✅ get_pipelines
- Returns pipeline list successfully -
✅ get_merge_request
- Shows pipeline data in MR details -
✅ create_merge_request
- Works fine
Evidence
When calling get_pipelines
with the same project, it returns:
[
{
"id": 1061,
"status": "success",
"ref": "refs/merge-requests/1/head",
"sha": "c2432d7a10435804dfdb6789691ed6b2c724318c"
}
]
But get_latest_pipeline
with the same project fails with 403.
Environment
- MCP Server:
@haleyio/mcp-server-gitlab
(exact version unknown - please add version info to responses) - Client: Claude Code
- Target: git.haley.io GitLab instance
- Project:
john/mcp-servers-graphile-migrate
- User:
john
(project owner with full permissions)
Expected Behavior
The get_latest_pipeline
function should:
- Accept the same parameters as
get_pipelines
- Return the most recent pipeline for the specified project/branch
- Use the same authentication/permissions as other working functions
Additional Notes
This appears to be a permissions or API endpoint issue specific to the get_latest_pipeline
function implementation. The user has full access to the project and other GitLab API functions work correctly.
Possible Investigation Areas
- Check if
get_latest_pipeline
uses a different GitLab API endpoint thanget_pipelines
- Verify the authentication headers are identical between working and failing functions
- Confirm the API path construction for the latest pipeline endpoint