Skip to content

GitLab MCP Read-Only Mode Configuration ​

Restrict the server to only expose read-only operations.

Configuration ​

bash
GITLAB_READ_ONLY_MODE=true

Behavior ​

When enabled:

  • Only browse_* and other read-only tools are available
  • All manage_* tools are hidden from the tool list
  • manage_context is the sole exception (session context, no GitLab data modification)
  • Write operations return an error if attempted
  • Useful for production environments or when write access is not needed

Credential Fields ​

Project and group metadata omit runner registration tokens (runners_token) and import URLs (import_url), which can carry credentials. This filtering also applies to nested projects, project search results and metadata returned by write operations, independently of read-only mode.

Use Cases ​

  • Production monitoring — Safely browse projects, MRs, and pipelines
  • Cursor/Windsurf — Stay within the 40-tool limit by hiding write tools
  • Shared access — Give agents read access without risk of modifications
  • Auditing — Browse activity and history without accidental changes

Tool Availability ​

Tool PatternRead-Only ModeFull Mode
browse_*AvailableAvailable
manage_*HiddenAvailable
list_*AvailableAvailable
get_*AvailableAvailable
create_*HiddenAvailable

Released under the Apache 2.0 License.