doc/user/model_context_protocol/mcp_server_troubleshooting.md
{{< details >}}
{{< /details >}}
When working with the GitLab MCP server, you might encounter the following issues.
404 Not FoundYou might get this error when you start the GitLab MCP server, or when
POST /api/v4/mcp returns 404 Not Found after the OAuth flow completes.
This issue occurs when you have not met the prerequisites for the GitLab MCP server.
To find the cause, check the mcp.log file
for the denial_reason field:
instance_setting_disabled: On GitLab Self-Managed, the MCP server is
turned off
for the instance.no_enabled_namespace: On GitLab.com, no top-level group you belong to has the MCP server
turned on.[!note]
404errors returned in a tool call, for example404 Project Not Found, are not logged inmcp.log. Instead, these errors appear in the JSON-RPC response body withisError: true.
Server's protocol version is not supported: 2025-06-18In GitLab 18.6 and earlier, you might get this error when the MCP client library does not support the GitLab MCP server protocol specification.
To resolve this issue, ask the AI tool provider to update their client implementation.
GitLab results in MCP: user-GitLab.Install Node.js version 20 or later.
To test the exact same command as the IDEs and desktop clients:
npx command string into one line.rm -rf ~/.mcp-auth/mcp-remote*
npx -y mcp-remote@latest https://gitlab.example.com/api/v4/mcp --static-oauth-client-metadata '{"scope": "mcp"}'
Add the --debug parameter to log more verbose output:
rm -rf ~/.mcp-auth/mcp-remote*
npx -y mcp-remote@latest https://gitlab.example.com/api/v4/mcp --static-oauth-client-metadata '{"scope": "mcp"}' --debug
Optional. Run the mcp-remote-client executable directly.
rm -rf ~/.mcp-auth/mcp-remote*
npx -p mcp-remote@latest mcp-remote-client https://gitlab.example.com/api/v4/mcp --static-oauth-client-metadata '{"scope": "mcp"}'
Optional. If you encounter version-specific bugs, pin the version of the mcp-remote module to a specific version. For example, use [email protected] to pin the version to 0.1.26.
[!note] For security reasons, you should not pin versions if possible.
Verify the installed Node.js versions. Claude Desktop requires Node.js version 20 or later.
for n in $(which -a node); do echo "$n" && $n -v; done
The MCP authentication is heavily cached locally. While troubleshooting, you might encounter false positives. To prevent these, delete the cache directory during troubleshooting:
rm -rf ~/.mcp-auth/mcp-remote*
MCP Inspector is an interactive developer tool for testing and debugging MCP servers. To run this tool, use the command line and access the web interface to inspect the GitLab MCP Server.
npx -y @modelcontextprotocol/inspector npx