605854 - List pipelines MCP Tool

What does this MR do?

For MCP changes, we are removing the list action from manage_pipeline so list_pipelines take precedence

References

#605854

Closes #607881 (closed)

How to test locally (GDK)

  1. Enable the MCP server and AI beta features (required for the /api/v4/mcp route to respond) via rails console:

    ApplicationSetting.current.update!(mcp_server_enabled: true, instance_level_ai_beta_features_enabled: true)
  2. Create an OAuth token with the mcp scope for a user that can read pipelines on a project:

    token = Doorkeeper::AccessToken.create!(
      resource_owner_id: User.find_by(username: 'root').id,
      scopes: 'mcp',
      expires_in: 2.hours,
      organization_id: Organizations::Organization.first.id
    )
    puts token.plaintext_token
  3. Call tools/list and confirm list_pipelines is present (and manage_pipeline's schema no longer has a list/page/per_page property):

    curl -s -X POST "http://gdk.test:3000/api/v4/mcp" \
      -H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"tools/list","id":"1"}' | jq '.result.tools[] | select(.name=="list_pipelines")'
  4. Call tools/call against list_pipelines, with and without filters:

    curl -s -X POST "http://gdk.test:3000/api/v4/mcp" \
      -H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"tools/call","id":"1","params":{"name":"list_pipelines","arguments":{"id":"<namespace/project>","status":"failed"}}}' | jq
  5. (Optional) Confirm the old path is gone — calling manage_pipeline with list: true now returns a validation error (list is invalid) instead of listing pipelines.

Alternatively, follow _index.md to connect a real MCP client (Cursor, Claude Desktop via mcp-remote, or the MCP Inspector) to the GDK MCP server and call list_pipelines interactively.

Edited by Amr Taha

Merge request reports

Loading