Kepler MCP GitLab Server

Provides GitLab integration tools for AI assistants through OAuth-backed access to projects, issues, and merges.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ryan-rbw-kepler-mcp-gitlab-server": {
      "command": "python",
      "args": [
        "-m",
        "kepler_mcp_gitlab.cli",
        "serve",
        "--transport",
        "sse"
      ],
      "env": {
        "KEPLER_MCP_HOST": "0.0.0.0",
        "KEPLER_MCP_PORT": "8000",
        "KEPLER_MCP_GITLAB_URL": "https://gitlab.example.com",
        "KEPLER_MCP_OAUTH_SCOPE": "api read_user read_repository",
        "KEPLER_MCP_TRANSPORT_MODE": "sse",
        "KEPLER_MCP_OAUTH_CLIENT_ID": "your_client_id",
        "KEPLER_MCP_OAUTH_TOKEN_URL": "https://gitlab.example.com/oauth/token",
        "KEPLER_MCP_TOKEN_STORE_PATH": "/var/lib/kepler-mcp/tokens.json",
        "KEPLER_MCP_OAUTH_REDIRECT_URI": "https://your-mcp-server.com/oauth/callback",
        "KEPLER_MCP_OAUTH_CLIENT_SECRET": "your_client_secret",
        "KEPLER_MCP_TOKEN_ENCRYPTION_KEY": "generated_key_if_used",
        "KEPLER_MCP_OAUTH_AUTHORIZATION_URL": "https://gitlab.example.com/oauth/authorize",
        "KEPLER_MCP_OAUTH_USER_AUTH_ENABLED": "true"
      }
    }
  }
}

Kepler MCP GitLab Server is an MCP server that bridges your GitLab instance with AI assistants like ChatGPT and Claude Desktop. It handles user authentication via GitLab OAuth, enforces per-user permissions, and exposes GitLab data and actions through MCP tools in a secure, scalable way.

How to use

You connect your AI assistant to the MCP server once, then authorize with GitLab. After setup, you can ask your assistant to manage your GitLab projects, issues, merge requests, and repository content as if you were interacting directly with GitLab, but with the convenience of natural language prompts.

Key usage patterns include listing projects, viewing issues, creating issues, managing merge requests, and inspecting repository contents. The server respects each user’s GitLab permissions, so access is limited to what each user can do in GitLab.

How to install

Prerequisites: Python 3.12 or Docker, and access to your GitLab instance to register an OAuth application.

Step 1. Prepare the OAuth credentials in GitLab. Create a new application and note the Client ID, Client Secret, and Redirect URI. Ensure the application has scopes for api, read_user, and read_repository.

Step 2. Run the MCP server using Python. This example uses the stdio transport for local development and testing.

python -m kepler_mcp_gitlab.cli serve --transport sse

Additional configuration and deployment notes

OAuth flow is used to connect users. The server redirects users to GitLab for authorization and exchanges the authorization code for access tokens. Tokens are stored securely and per-user permissions are enforced.

Environment variables you may set to customize the deployment include GitLab URL, OAuth client credentials, redirect URI, transport mode, host, and port. You can also enable encrypted token storage for production.

If you prefer containerized deployment, you can build and run a Docker image, or use Docker Compose to manage configuration. The Docker approach is suitable for production environments with proper secret management.

Security considerations

OAuth 2.0 with PKCE is used for secure authentication. No user passwords are stored by the MCP server. Each user’s access to GitLab is enforced. Session tokens are encrypted at rest, and logs redact sensitive values. Containers run as non-root users for better isolation.

Troubleshooting

If you encounter an invalid redirect URI, verify that the Redirect URI in GitLab exactly matches the server callback URL, including scheme (http vs https) and trailing slashes.

If you see invalid client errors, confirm the Client ID and that the OAuth application is active in GitLab.

For health checks, request the health endpoint to confirm the server is up, and inspect logs for any OAuth or GitLab API issues.

Available tools

list_projects

List accessible GitLab projects for the authenticated user.

get_project

Retrieve details for a specific GitLab project.

search_projects

Search projects by query terms.

get_project_languages

Get language breakdown for a project.

list_issues

List issues in a project.

get_issue

Get details for a specific issue.

create_issue

Create a new issue in a project.

update_issue

Update an existing issue.

close_issue

Close an issue or reopen it.

reopen_issue

Reopen a closed issue.

list_issue_comments

List comments on an issue.

add_issue_comment

Add a comment to an issue.

list_merge_requests

List merge requests in a project.

get_merge_request

Get details for a merge request.

create_merge_request

Create a new merge request.

update_merge_request

Update an existing merge request.

merge_merge_request

Merge a merge request.

approve_merge_request

Approve a merge request.

get_merge_request_changes

Get diff of a merge request.

list_merge_request_discussions

List review discussions on a merge request.

list_branches

List repository branches.

get_branch

Get details for a branch.

create_branch

Create a new branch.

delete_branch

Delete a branch.

list_tags

List repository tags.

get_tag

Get details for a tag.

create_tag

Create a new tag.

delete_tag

Delete a tag.

compare_branches

Compare two branches or commits.

list_repository_tree

List files and directories in the repository.

get_file

Get file metadata.

get_file_content

Get file contents (decoded).

create_file

Create a new file in the repository.

update_file

Update an existing file.

delete_file

Delete a file from the repository.

get_file_blame

Get file blame/history.

list_commits

List repository commits.

get_commit

Get commit details.

get_commit_diff

Get commit diff.

cherry_pick_commit

Cherry-pick a commit.

get_commit_refs

Get refs containing a commit.

get_current_user

Get information about the authenticated user.

get_gitlab_config

Get server configuration.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational