Step 2 Add the server to your AI assistant and paste your token.
Have your AI assistant set everything up automatically. Copy the prompt below, replace YOUR_PAT_HERE with your GitLab token, and paste it into your AI assistant's chat.
This auto-setup is for convenience. For production use, the Manual Setup path below is recommended — it stores your token in a local config file rather than chat history.
Configure an MCP server in my AI assistant. This is a self-hosted GitLab MCP
server connected to our internal GitLab instance.
Server URL: https://gitlab-mcp.pyja.in/mcp
Transport: HTTP
Authentication: Bearer token
My GitLab PAT: YOUR_PAT_HERE
For detailed setup steps, see: https://gitlab-mcp.pyja.in/install
Make sure to replace YOUR_PAT_HERE in the prompt with your actual GitLab Personal Access Token before sending.
Your PAT is sent in plaintext in the chat message and may be stored in chat history. For long-term use, prefer the Manual Setup path which writes the token to a local config file instead of pasting it into chat.
This is a self-hosted internal service connected to your GitLab instance at https://gitlab.com. No third-party SaaS or external services are involved.
Follow the steps below for your AI assistant.
gitlab)https://gitlab-mcp.pyja.in/openapi
After saving, you should see the GitLab tools listed on the Tools page. Start a new chat and try asking about a project — if the AI can answer with real data, you're all set!
Add this to your opencode.json configuration file:
{
"mcp": {
"gitlab": {
"type": "remote",
"url": "https://gitlab-mcp.pyja.in/mcp",
"enabled": true,
"oauth": false,
"headers": {
"Authorization": "Bearer YOUR_PAT_HERE"
}
}
}
}
Replace YOUR_PAT_HERE with the token you created in the previous step.
Run opencode mcp list after saving to check that the connection works.
Recommended — add to .mcp.json (project) or ~/.claude.json (user):
{
"mcpServers": {
"gitlab": {
"type": "http",
"url": "https://gitlab-mcp.pyja.in/mcp",
"headers": {
"Authorization": "Bearer YOUR_PAT_HERE"
}
}
}
}
Alternative — use the CLI:
claude mcp add --transport http gitlab https://gitlab-mcp.pyja.in/mcp \
--header "Authorization: Bearer YOUR_PAT_HERE"
The CLI --header flag has known issues in some Claude Code versions and may not persist the auth header. If the CLI method doesn't work, use the .mcp.json approach above.
Replace YOUR_PAT_HERE with your GitLab PAT.
Add to your Cursor settings (Cmd/Ctrl + , → MCP):
{
"mcpServers": {
"gitlab": {
"type": "streamable-http",
"url": "https://gitlab-mcp.pyja.in/mcp",
"headers": {
"Authorization": "Bearer YOUR_PAT_HERE"
}
}
}
}
Replace YOUR_PAT_HERE with your GitLab PAT.
Add to your Cline MCP settings. The type field is required — without it, Cline defaults to SSE transport which will fail with a 405 error.
{
"mcpServers": {
"gitlab": {
"type": "streamableHttp",
"url": "https://gitlab-mcp.pyja.in/mcp",
"headers": {
"Authorization": "Bearer YOUR_PAT_HERE"
}
}
}
}
Replace YOUR_PAT_HERE with your GitLab PAT.
Optional skills enhance your AI assistant's ability to work with GitLab. Click a skill to view details, or install them using npx skills.
List available skills:
npx skills add https://gitlab-mcp.pyja.in/skills.git --list
Install all skills:
npx skills add https://gitlab-mcp.pyja.in/skills.git --all -g
npx skills add https://gitlab-mcp.pyja.in/skills.git --all
Install a specific skill:
npx skills add https://gitlab-mcp.pyja.in/skills.git --skill gitlab-researcher -g
npx skills add https://gitlab-mcp.pyja.in/skills.git --skill gitlab-solver -g
npx skills add https://gitlab-mcp.pyja.in/skills.git --skill gitlab-reviewer -g
After installing skills, restart your AI assistant so the new skills are loaded. Skills are loaded on-demand by the agent when the context calls for them.
/openapi endpoint (e.g., https://gitlab-mcp.pyja.in/openapi), not the base URL or /mcpapi scope (not just read_api if you're trying to write)PAT_FALLBACK=disabled). Set PAT_FALLBACK=enabled to fall back to using your PAT directly.group/project-name