Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
e4a28a9a47 | |||
9f1e7b5bca | |||
f37e210ee8 | |||
6f789692be | |||
1bb70dccb9 | |||
676bbcd4dd |
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
FROM node:22.15-alpine AS builder
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
COPY tsconfig.json /tsconfig.json
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=/root/.npm npm install
|
||||||
|
|
||||||
|
RUN --mount=type=cache,target=/root/.npm-production npm ci --ignore-scripts --omit-dev
|
||||||
|
|
||||||
|
FROM node:22.12-alpine AS release
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=builder /app/build /app/build
|
||||||
|
COPY --from=builder /app/package.json /app/package.json
|
||||||
|
COPY --from=builder /app/package-lock.json /app/package-lock.json
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
|
RUN npm ci --ignore-scripts --omit-dev
|
||||||
|
|
||||||
|
ENTRYPOINT ["node", "build/index.js"]
|
38
README.md
38
README.md
@ -14,6 +14,8 @@ GitLab MCP(Model Context Protocol) Server. **Includes bug fixes and improvements
|
|||||||
|
|
||||||
When using with the Claude App, you need to set up your API key and URLs directly.
|
When using with the Claude App, you need to set up your API key and URLs directly.
|
||||||
|
|
||||||
|
#### npx
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
@ -24,7 +26,39 @@ When using with the Claude App, you need to set up your API key and URLs directl
|
|||||||
"GITLAB_PERSONAL_ACCESS_TOKEN": "your_gitlab_token",
|
"GITLAB_PERSONAL_ACCESS_TOKEN": "your_gitlab_token",
|
||||||
"GITLAB_API_URL": "your_gitlab_api_url",
|
"GITLAB_API_URL": "your_gitlab_api_url",
|
||||||
"GITLAB_READ_ONLY_MODE": "false",
|
"GITLAB_READ_ONLY_MODE": "false",
|
||||||
"USE_GITLAB_WIKI":"true"
|
"USE_GITLAB_WIKI": "true"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Docker
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"mcpServers": {
|
||||||
|
"GitLab communication server": {
|
||||||
|
"command": "docker",
|
||||||
|
"args": [
|
||||||
|
"run",
|
||||||
|
"-i",
|
||||||
|
"--rm",
|
||||||
|
"-e",
|
||||||
|
"GITLAB_PERSONAL_ACCESS_TOKEN",
|
||||||
|
"-e",
|
||||||
|
"GITLAB_API_URL",
|
||||||
|
"-e",
|
||||||
|
"GITLAB_READ_ONLY_MODE",
|
||||||
|
"-e",
|
||||||
|
"USE_GITLAB_WIKI",
|
||||||
|
"nkwd/mcp-gitlab"
|
||||||
|
],
|
||||||
|
"env": {
|
||||||
|
"GITLAB_PERSONAL_ACCESS": "your_gitlab_token",
|
||||||
|
"GITLAB_API_URL": "https://gitlab.com/api/v4", // Optional, for self-hosted GitLab
|
||||||
|
"GITLAB_READ_ONLY_MODE": "false",
|
||||||
|
"USE_GITLAB_WIKI": "true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,7 +67,6 @@ When using with the Claude App, you need to set up your API key and URLs directl
|
|||||||
|
|
||||||
### Environment Variables
|
### Environment Variables
|
||||||
|
|
||||||
|
|
||||||
- `GITLAB_PERSONAL_ACCESS_TOKEN`: Your GitLab personal access token.
|
- `GITLAB_PERSONAL_ACCESS_TOKEN`: Your GitLab personal access token.
|
||||||
- `GITLAB_API_URL`: Your GitLab API URL. (Default: `https://gitlab.com/api/v4`)
|
- `GITLAB_API_URL`: Your GitLab API URL. (Default: `https://gitlab.com/api/v4`)
|
||||||
- `GITLAB_READ_ONLY_MODE`: When set to 'true', restricts the server to only expose read-only operations. Useful for enhanced security or when write access is not needed. Also useful for using with Cursor and it's 40 tool limit.
|
- `GITLAB_READ_ONLY_MODE`: When set to 'true', restricts the server to only expose read-only operations. Useful for enhanced security or when write access is not needed. Also useful for using with Cursor and it's 40 tool limit.
|
||||||
@ -42,6 +75,7 @@ When using with the Claude App, you need to set up your API key and URLs directl
|
|||||||
## Tools 🛠️
|
## Tools 🛠️
|
||||||
|
|
||||||
+<!-- TOOLS-START -->
|
+<!-- TOOLS-START -->
|
||||||
|
|
||||||
1. `create_or_update_file` - Create or update a single file in a GitLab project
|
1. `create_or_update_file` - Create or update a single file in a GitLab project
|
||||||
2. `search_repositories` - Search for GitLab projects
|
2. `search_repositories` - Search for GitLab projects
|
||||||
3. `create_repository` - Create a new GitLab project
|
3. `create_repository` - Create a new GitLab project
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@zereight/mcp-gitlab",
|
"name": "@zereight/mcp-gitlab",
|
||||||
"version": "1.0.36",
|
"version": "1.0.38",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@zereight/mcp-gitlab",
|
"name": "@zereight/mcp-gitlab",
|
||||||
"version": "1.0.36",
|
"version": "1.0.38",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@modelcontextprotocol/sdk": "1.8.0",
|
"@modelcontextprotocol/sdk": "1.8.0",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@zereight/mcp-gitlab",
|
"name": "@zereight/mcp-gitlab",
|
||||||
"version": "1.0.38",
|
"version": "1.0.39",
|
||||||
"description": "MCP server for using the GitLab API",
|
"description": "MCP server for using the GitLab API",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "zereight",
|
"author": "zereight",
|
||||||
|
6
release-notes.md
Normal file
6
release-notes.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Added `expanded` property to `start` and `end` in `GitLabDiscussionNoteSchema`
|
||||||
|
Now you can expand or collapse more information at the start and end of discussion notes.
|
||||||
|
Example: In code review, you can choose to show or hide specific parts of the discussion.
|
||||||
|
(See: [PR #40](https://github.com/zereight/gitlab-mcp/pull/40))
|
@ -107,7 +107,7 @@ export const GitLabRepositorySchema = z.object({
|
|||||||
jobs_enabled: z.boolean().optional(),
|
jobs_enabled: z.boolean().optional(),
|
||||||
snippets_enabled: z.boolean().optional(),
|
snippets_enabled: z.boolean().optional(),
|
||||||
can_create_merge_request_in: z.boolean().optional(),
|
can_create_merge_request_in: z.boolean().optional(),
|
||||||
resolve_outdated_diff_discussions: z.boolean().optional(),
|
resolve_outdated_diff_discussions: z.boolean().nullable().optional(),
|
||||||
shared_runners_enabled: z.boolean().optional(),
|
shared_runners_enabled: z.boolean().optional(),
|
||||||
shared_with_groups: z
|
shared_with_groups: z
|
||||||
.array(
|
.array(
|
||||||
|
Reference in New Issue
Block a user