@infochamp/gitlab-mcp-server
v0.0.3
Published
GitLab MCP Server (Node.js/TypeScript)
Readme
GitLab MCP Server (Node.js)
A Model Context Protocol (MCP) server for GitLab issue management, built with Node.js, TypeScript, and Express.js.
Features
| Tool | Description |
|------|-------------|
| upload_file | Upload image/file to GitLab, returns markdown link |
| create_issue | Create new issue (supports images in description) |
| get_issue | Get issue details by IID |
| update_issue | Update issue title, description, labels, state |
| list_issues | List issues with filters (state, labels, search) |
| add_comment | Add comment to issue (supports images) |
| search_issues | Search issues across all projects |
Requirements
- Node.js 18+
- GitLab Personal Access Token with
apiscope
Installation
npm installBuild
npm run buildConfiguration
Set environment variables:
export GITLAB_URL=https://gitlab.com # or your self-hosted GitLab URL
export GITLAB_TOKEN=your-personal-access-token
export GITLAB_DEFAULT_PROJECT_ID=mygroup/myproject # optionalRun as STDIO Server
npm run start
# or after build:
node dist/index.jsClaude Desktop Configuration
Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json on Linux/Mac or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"gitlab-nodejs": {
"command": "node",
"args": ["/path/to/nodejs/dist/index.js"],
"env": {
"GITLAB_URL": "https://gitlab.com",
"GITLAB_TOKEN": "your-token-here",
"GITLAB_DEFAULT_PROJECT_ID": "mygroup/myproject"
}
}
}
}Testing
./start.shThis will use MCP Inspector to test all tools.
Development
Project Structure
src/
├── index.ts # Main entry point
├── tools/
│ └── gitlab.ts # GitLab API client and tool implementations
└── config/ # Configuration files (future)Adding New Tools
- Add methods in
src/tools/gitlab.ts - Register the tool in
src/index.tsin theListToolsRequestSchemahandler - Add the tool call handling in the
CallToolRequestSchemahandler
Scripts
npm run build- Compile TypeScriptnpm run start- Run compiled JavaScriptnpm run dev- Run with ts-node (development)npm run test- Run the test script
License
MIT
