一个完全类型化的 TypeScript 模型上下文协议(MCP) 服务器,用于全面集成 GitLab。
创建一个具有 api、read_user 和 read_repository 范围的 GitLab 个人访问令牌。
添加到你的 Claude Desktop 配置文件中(在 macOS 上路径为 ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@alosies/gitlab-mcp-server"],
"env": {
"NPM_CONFIG_TOKEN": "your-gitlab-token-here"
}
}
}
}
你可以向 Claude 提问如下问题:
对于自托管的 GitLab 实例,请添加您的基础 URL:
{
"mcpServers": {
"gitlab": {
"command": "npx",
"args": ["-y", "@alosies/gitlab-mcp-server"],
"env": {
"NPM_CONFIG_TOKEN": "your-token",
"GITLAB_BASE_URL": "https://gitlab.mycompany.com"
}
}
}
}
MIT 许可证