Skip to content

SREP-2024 feat: Add backplane login/console/cloud-console/read-only resource MCP endpoints#801

Merged
openshift-merge-bot[bot] merged 6 commits intoopenshift:mainfrom
samanthajayasinghe:bp-mcp-login
Oct 19, 2025
Merged

SREP-2024 feat: Add backplane login/console/cloud-console/read-only resource MCP endpoints#801
openshift-merge-bot[bot] merged 6 commits intoopenshift:mainfrom
samanthajayasinghe:bp-mcp-login

Conversation

@samanthajayasinghe
Copy link
Contributor

@samanthajayasinghe samanthajayasinghe commented Oct 13, 2025

SREP-2024 feat: Add backplane login MCP endpoint

What type of PR is this?

Extend #798 PR and add most MCP endpoints

    Tools:
    - cloud-console:
        Get cloud provider console access for a cluster with temporary credentials
    - cluster-resource:
        Execute read-only Kubernetes resource operations (get, describe, logs, top, explain) on cluster resources
    - console:
        Access cluster console via backplane CLI, optionally opening in browser
    - info:
        Get information about the current backplane CLI installation, configuration
    - login:
        Login to cluster via backplane
  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

Which Jira/Github issue(s) does this PR fix?

  • Related Issue #
  • Closes #

Special notes for your reviewer

You can test the backplane MCP server, configuring backpane MCP server to Gemini or Claude

    "backplane": {
      "command": "{backplane-binary-path}/backplane-cli/ocm-backplane",
      "args": ["mcp"],
      "cwd": "{backplane-binary-path}/backplane-cli",
      "trust": true
    } 

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

/label tide/merge-method-squash

@openshift-ci openshift-ci bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Oct 13, 2025
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 13, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 47.19101% with 188 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.85%. Comparing base (7d18838) to head (cda22be).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/ai/mcp/backplane_cluster_resource.go 42.10% 69 Missing and 19 partials ⚠️
cmd/ocm-backplane/mcp/mcp.go 6.52% 43 Missing ⚠️
pkg/ai/mcp/backplane_cloud_console.go 48.21% 26 Missing and 3 partials ⚠️
pkg/ai/mcp/backplane_console.go 22.22% 28 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #801      +/-   ##
==========================================
+ Coverage   52.79%   52.85%   +0.06%     
==========================================
  Files          80       86       +6     
  Lines        6065     6421     +356     
==========================================
+ Hits         3202     3394     +192     
- Misses       2435     2575     +140     
- Partials      428      452      +24     
Files with missing lines Coverage Δ
cmd/ocm-backplane/root.go 83.33% <100.00%> (+0.72%) ⬆️
pkg/ai/mcp/backplane_info.go 100.00% <100.00%> (ø)
pkg/ai/mcp/backplane_login.go 100.00% <100.00%> (ø)
pkg/ai/mcp/backplane_console.go 22.22% <22.22%> (ø)
pkg/ai/mcp/backplane_cloud_console.go 48.21% <48.21%> (ø)
cmd/ocm-backplane/mcp/mcp.go 6.52% <6.52%> (ø)
pkg/ai/mcp/backplane_cluster_resource.go 42.10% <42.10%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samanthajayasinghe samanthajayasinghe changed the title SREP-2024 feat: Add backplane login MCP endpoint SREP-2024 feat: Add backplane login/console/cloud-console/read-only resource MCP endpoints Oct 15, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 15, 2025

@samanthajayasinghe: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@xiaoyu74
Copy link
Contributor

xiaoyu74 commented Oct 16, 2025

@samanthajayasinghe - We can merge this PR first, however, follow-up PR could be created to fix the console MCP endpoint stuck issue due to console handler was calling consoleCmd.RunE() which internally waits indefinitely for SIGINT signal.

Although it's not a hard-blocker, as we've added MCP transport mode for HTTP, it's better to add comments regarding how it could be used and tested properly for programmatic access from application if it's expected. (btw, I manually post http requests with curl with MCP server running in HTTP mode, but looks not working as expected.)

More discussion: https://redhat-internal.slack.com/archives/C016S65RNG5/p1760647949399909?thread_ts=1760496139.024819&cid=C016S65RNG5

@xiaoyu74
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 19, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: samanthajayasinghe, xiaoyu74

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [samanthajayasinghe,xiaoyu74]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 7a1be40 into openshift:main Oct 19, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants