如何将 GitLab 远程 MCP 连接到 ChatGPT

约 1 分钟即可把 GitLab 的远程 MCP 服务端接入 ChatGPT。如需排查 OAuth / 401 问题,可先用 OAuth 2.1 调试器体检端点。

🛡️ Official✓ VerifiedStreamable HTTPOAuth 2.1🛡️ A+~659 tok22 tools
Streamable HTTPhttps://gitlab.com/api/v4/mcp
  1. Open Settings → Connectors (Integrations) → Add Custom Connector.
  2. Paste the endpoint URL: https://gitlab.com/api/v4/mcp
  3. Complete the browser OAuth 2.1 login flow when prompted.

接入步骤

  1. 启用开发者模式 — ChatGPT → Settings → Connectors → Advanced 开启 Developer Mode。
  2. 添加连接器 — 新建 Custom Connector,将 https://gitlab.com/api/v4/mcp 填入 MCP Server URL。
  3. 完成认证 — 首次调用时客户端会打开 GitLab 的 OAuth 授权页面——点击允许后工具即可用。
  4. 验证 — 在 在线 Inspector 中粘贴 https://gitlab.com/api/v4/mcp 并运行 initialize + tools/list 验证连通性。

🧰 工具预览(22)

ToolSafetyDescriptionParameters
mcp_search
~34 tok
🟢 ReadSearch GitLab projects, issues and merge requests.—
get_project
~30 tok
🟢 ReadGet details of a GitLab project.—
list_projects
~28 tok
🟢 ReadList GitLab projects.—
get_file_contents
~31 tok
🟢 ReadRead a file from a repository.—
get_issue
~26 tok
🟢 ReadGet a GitLab issue.—
list_issues
~28 tok
🟢 ReadList issues of a project.—
create_issue
~28 tok
🟠 WriteCreate a GitLab issue.—
create_issue_note
~29 tok
🟠 WriteAdd a note to an issue.—
get_merge_request
~29 tok
🟢 ReadGet a merge request.—
list_merge_requests
~32 tok
🟢 ReadList merge requests of a project.—
create_merge_request
~30 tok
🟠 WriteCreate a merge request.—
create_merge_request_note
~33 tok
🟠 WriteAdd a note to a merge request.—
get_pipeline
~28 tok
🟢 ReadGet a CI/CD pipeline.—
list_pipelines
~30 tok
🟢 ReadList pipelines of a project.—
get_job
~26 tok
🟢 ReadGet a pipeline job.—
get_milestone
~29 tok
🟢 ReadGet a project milestone.—
list_milestones
~29 tok
🟢 ReadList project milestones.—
get_commit
~25 tok
🟢 ReadGet a commit.—
list_branches
~29 tok
🟢 ReadList repository branches.—
create_branch
~29 tok
🟠 WriteCreate a repository branch.—
list_tags
~27 tok
🟢 ReadList repository tags.—
run_pipeline
~29 tok
🟠 WriteTrigger a CI/CD pipeline.—

更多连接指南