# GitLab (Legacy)

**Type:** Official

**Source Type:** Repository

**Source:** [GitHub](https://github.com/modelcontextprotocol/servers/tree/main/src/gitlab)

**Description:** GitLab (Legacy) MCP server enables AI assistants to interact with GitLab repositories using a personal access token. This is the original GitLab MCP server — for new connections, prefer **GitLab** which uses OAuth.

**Configuration Parameters:**

* **GitLab Personal Access Token** \* (sensitive) - Generated in GitLab under **User Settings → Access Tokens**.
* **GitLab API URL** (optional) - Base URL for self-hosted instances. Default: `https://gitlab.com/api/v4`.

**Setup Steps:**

1. Log in to GitLab and navigate to **User Settings → Access Tokens**.
2. Click **Add new token**, name it, and select scopes — typically `api`, `read_repository`, and (if needed) `write_repository`.
3. Click **Create personal access token** and copy the value — GitLab will not show it again.
4. When creating the connection in Natoma, paste the token (and the API URL if self-hosted) and save.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.natoma.ai/apps/gitlab-legacy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
