Gitlab Integration for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Gitlab MCP or direct API to create issues, review merge requests, trigger pipelines, and fetch project activity through natural language.
Gitlab Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Supported Tools

Tools
Archive ProjectTool to archive a project.
Create GitLab GroupTool to create a new group in gitlab.
Create ProjectTool to create a new project in gitlab.
Create Project IssueTool to create a new issue in a gitlab project.
Create Repository BranchTool to create a new branch in a project.
Delete ProjectTool to delete a gitlab project by its id.
Download Project AvatarTool to download a project’s avatar image.
Erase JobTool to erase the content of a specified job within a project.
Get Commit ReferencesTool to get all references (branches or tags) a commit is pushed to.
Get Commit SequenceTool to get the sequence number of a commit in a project by following parent links from the given commit.
Get Group DetailsTool to retrieve information about a specific group by its id.
Get Group MemberTool to retrieve details for a specific group member.
Get GroupsGet groups
Get Job DetailsTool to retrieve details of a single job by its id within a specified project.
Get Merge Request NotesTool to fetch comments on a merge request.
Get ProjectTool to get a single project by id or url-encoded path.
Get Project LanguagesTool to list programming languages used in a project with percentages.
Get Project MemberTool to retrieve details for a specific project member.
Get Project Member AllTool to retrieve details for a specific project member (including inherited and invited members).
Get Merge Request CommitsTool to get commits of a merge request.
Get Project Merge RequestsTool to retrieve a list of merge requests for a specific project.
Get ProjectsTool to list all projects accessible to the authenticated user.
List Merge Request DiffsTool to list all diff versions of a merge request.
Get Repository BranchTool to retrieve information about a specific branch in a project.
Get Repository BranchesRetrieves a list of repository branches for a project.
Get Single CommitTool to get a specific commit identified by the commit hash or name of a branch or tag.
Get Single PipelineTool to retrieve details of a single pipeline by its id within a specified project.
Get UserTool to retrieve information about a specific user by their id.
Get User PreferencesTool to get the current user's preferences.
Get UsersTool to retrieve a list of users from gitlab.
Get User StatusTool to get a user's status by id.
Get User StatusTool to get the current user's status.
Get User Support PINTool to get details of the current user's support pin.
Import project membersTool to import members from one project to another.
List All Group MembersTool to list all members of a group including direct, inherited, and invited members.
List All Project MembersTool to list all members of a project (direct, inherited, invited).
List Billable Group MembersTool to list billable members of a top-level group (including its subgroups and projects).
List Group MembersTool to list direct members of a group.
List Pending Group MembersTool to list pending members of a group and its subgroups and projects.
List Pipeline JobsTool to retrieve a list of jobs for a specified pipeline within a project.
List Project GroupsTool to list ancestor groups of a project.
List Project Invited GroupsTool to list groups invited to a project.
List Project PipelinesTool to retrieve a list of pipelines for a specified project.
List Project Shareable GroupsTool to list groups that can be shared with a project.
List Project Repository TagsTool to retrieve a list of repository tags for a specified project.
List Project Transfer LocationsTool to list namespaces available for project transfer.
List project usersTool to list users of a project.
List Repository CommitsTool to get a list of repository commits in a project.
List User ProjectsTool to list projects owned by a specific user.
Create Support PINTool to create a support pin for your authenticated user.
Update User PreferencesTool to update the current user's preferences.
Set User StatusTool to set the current user's status.
Share Project With GroupTool to share a project with a group.
Start Housekeeping TaskTool to start the housekeeping task for a project.

Why Use Composio?

AI Native Gitlab Integration

  • Supports both Gitlab MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Gitlab data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Gitlab access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Gitlab
  • Scoped, least privilege access to Gitlab resources
  • Full audit trail of agent actions to support review and compliance

Connect Gitlab MCP Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Gitlab tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Create a new issue in my Gitlab project about a deployment bug')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Connect Gitlab API Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio_openai
Install the Composio SDK

Initialize Composio and Create Tool Router Session

python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
Import and initialize Composio client, then create a Tool Router session

Execute Gitlab Tools via Tool Router with Your Agent

python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Create a new issue in my project for a bug report.'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
Get tools from Tool Router session and execute Gitlab actions with your Agent

Use Gitlab with any AI Agent Framework

Choose a Framework you want to connect Gitlab with

OpenAI Agents SDK

OpenAI Agents SDK

Use Gitlab MCP with OpenAI Agents SDK

Claude Agents SDK

Claude Agents SDK

Use Gitlab MCP with Claude Agents SDK

Google ADK

Google ADK

Use Gitlab MCP with Google ADK

Langchain

Langchain

Use Gitlab MCP with Langchain

AI SDK

AI SDK

Use Gitlab MCP with AI SDK

Mastra AI

Mastra AI

Use Gitlab MCP with Mastra AI

LlamaIndex

LlamaIndex

Use Gitlab MCP with LlamaIndex

CrewAI

CrewAI

Use Gitlab MCP with CrewAI

Pydantic AI

Pydantic AI

Use Gitlab MCP with Pydantic AI

Autogen

Autogen

Use Gitlab MCP with Autogen

Frequently Asked Questions

Do I need my own developer credentials to use Gitlab with Composio?

No, you can get started immediately using Composio's built-in Gitlab app. For production, we recommend configuring your own OAuth credentials.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.