Provides comprehensive GitLab integration with tools for managing projects, issues, merge requests, branches, tags, files, commits, and repository operations. Supports OAuth authentication and respects per-user GitLab permissions.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kepler MCP GitLab Serverlist open issues in the 'kepler-web' project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Kepler MCP GitLab Server
A production-ready MCP (Model Context Protocol) server providing GitLab integration tools for AI assistants like Claude Desktop and ChatGPT.
How It Works
This MCP server acts as a bridge between AI assistants (ChatGPT, Claude, etc.) and your GitLab instance. Users authenticate via GitLab OAuth - just like connecting any third-party app.
For end users: Simply add the MCP server URL to their AI assistant and authorize with GitLab. No tokens or configuration needed.
For administrators: One-time setup to deploy the server and register the OAuth application with GitLab.
Features
GitLab Integration: Access projects, issues, merge requests, and more through MCP tools
OAuth 2.0 Authentication: Users authorize via GitLab - no tokens to manage
Per-User Permissions: Each user's GitLab permissions are respected
Multiple Transport Modes: stdio for local (Claude Desktop), SSE for HTTP (ChatGPT)
Secure Token Storage: Encrypted session storage using Fernet encryption
Docker Support: Production-ready container images
Available Tools
Once connected, users can ask their AI assistant to:
Tool | Description |
Projects | |
| List accessible GitLab projects |
| Get project details |
| Search for projects |
| Get language breakdown |
Issues | |
| List issues in a project |
| Get issue details |
| Create a new issue |
| Update an issue |
| Change issue state |
| List comments on an issue |
| Add a comment |
Merge Requests | |
| List MRs in a project |
| Get MR details |
| Create a new MR |
| Update an MR |
| Merge an MR |
| Approve an MR |
| Get MR diff |
| List review threads |
Repository | |
| List repository branches |
| Get branch details |
| Create a new branch |
| Delete a branch |
| List repository tags |
| Get tag details |
| Create a new tag |
| Delete a tag |
| Compare two branches/commits |
| List files and directories |
| Get file metadata |
| Get file contents (decoded) |
| Create a new file |
| Update an existing file |
| Delete a file |
| Get file blame/history |
| List repository commits |
| Get commit details |
| Get commit diff |
| Cherry-pick a commit |
| Get refs containing a commit |
Utilities | |
| Get authenticated user info |
| Get server configuration |
Deployment Guide (For Administrators)
This section is for IT administrators deploying the MCP server for their organization.
Prerequisites
Python 3.12+ or Docker
Access to your GitLab instance (admin or ability to create OAuth applications)
A server/host to run the MCP server (can be the same as GitLab or separate)
Understanding OAuth Application Credentials
When you deploy this server, you need to register it as an OAuth application with GitLab. This is similar to how Slack, GitHub, or any third-party integration works.
Why? GitLab needs to know:
Who is asking (Client ID) - Identifies your MCP server
That it's really you (Client Secret) - Proves the request is legitimate
Where to send users back (Redirect URI) - After they authorize
These are application credentials, not user credentials. You set them up once, and then all users in your organization can connect without any additional configuration.
Step 1: Register OAuth Application in GitLab
Log into your GitLab instance as an admin (or any user for user-level apps)
Navigate to:
Instance-wide (recommended): Admin Area → Applications
User-level: User Settings → Applications
Click New Application and fill in:
Field
Value
Name
Kepler MCP GitLab ServerRedirect URI
https://your-mcp-server.com/oauth/callbackConfidential
✅ Yes (checked)
Scopes
✅
api✅read_user✅read_repositoryClick Save application
Copy and securely store:
Application ID (Client ID)
Secret (Client Secret) - shown only once!
Step 2: Configure the Server
Create a configuration file or set environment variables:
Option A: Environment Variables
Option B: .env File
Create a .env file in the project root with the same variables (without export).
GitLab.com vs Self-Hosted
Setting | GitLab.com | Self-Hosted |
|
|
|
|
|
|
|
|
|
|
|
|
Step 3: Deploy the Server
Option A: Direct Python
Option B: Docker
Option C: Docker Compose
Step 4: Verify Deployment
Step 5: Inform Your Users
Once deployed, share these instructions with your users:
Connecting to GitLab from ChatGPT
In ChatGPT, go to Settings → Connections → Add MCP Server
Enter the server URL:
https://your-mcp-server.com/sseClick Connect - you'll be redirected to GitLab
Log in to GitLab and click "Authorize"
Done! You can now ask ChatGPT about your GitLab projects.
Try: "List my GitLab projects" or "Show open issues in project X"
Configuration Reference
All Environment Variables
Variable | Description | Default | Required |
Core | |||
| Application name |
| No |
| Log level |
| No |
| Environment (local/dev/stage/prod) |
| No |
| Transport (stdio/sse) |
| No |
| Server bind host |
| No |
| Server bind port |
| No |
GitLab | |||
| GitLab instance URL |
| Yes |
OAuth (required for SSE mode) | |||
| Enable OAuth |
| Yes* |
| OAuth Client ID | - | Yes* |
| OAuth Client Secret | - | Yes* |
| OAuth authorize endpoint | - | Yes* |
| OAuth token endpoint | - | Yes* |
| OAuth callback URL | - | Yes* |
| OAuth scopes | - | Yes* |
| User info endpoint | - | No |
Token Storage | |||
| Fernet key for encryption | - | No** |
| Path for token persistence | - | No** |
Rate Limiting | |||
| Max requests/min |
| No |
| Burst size |
| No |
* Required when OAUTH_USER_AUTH_ENABLED=true
** Required together if persistent sessions are needed
Development
Setup
Quality Checks
Project Structure
Security
OAuth 2.0 with PKCE: Industry-standard secure authentication
No stored passwords: Users authenticate directly with GitLab
Per-user permissions: Each user's GitLab access rights are respected
Encrypted tokens: Session tokens encrypted at rest with Fernet
Secret redaction: Sensitive values never appear in logs
Non-root containers: Docker images run as unprivileged user
Troubleshooting
OAuth Errors
"Invalid redirect URI"
Ensure the redirect URI in GitLab exactly matches your server's callback URL
Check for trailing slashes, http vs https
"Invalid client"
Verify Client ID is correct
Check if the OAuth application is still active in GitLab
"Invalid state"
State expired (default 10 min) - try the flow again
Server may have restarted during the OAuth flow
Connection Issues
Health check fails
GitLab API errors
License
MIT License - See LICENSE for details.