Skip to content

Add MCP support for Redpanda Cloud #25802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 22, 2025
Merged

Add MCP support for Redpanda Cloud #25802

merged 1 commit into from
Apr 22, 2025

Conversation

birdayz
Copy link
Contributor

@birdayz birdayz commented Apr 14, 2025

I would like to avoid introducing a plugin for this for now, we'll be fine with the release cycle of core. We're not expecting this to change very often (and want to spare all the time required to do a plugin).

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.1.x
  • v24.3.x
  • v24.2.x
  • v24.1.x

Release Notes

  • none

@CLAassistant
Copy link

CLAassistant commented Apr 14, 2025

CLA assistant check
All committers have signed the CLA.

@birdayz birdayz changed the title wip WIP - MCP support Apr 16, 2025
@birdayz birdayz force-pushed the jb/wip-mcp branch 3 times, most recently from a2aa6a8 to b3f3616 Compare April 17, 2025 12:00
@birdayz birdayz marked this pull request as ready for review April 17, 2025 12:00
@birdayz birdayz requested review from r-vasquez, kbatuigas and a team as code owners April 17, 2025 12:00
@@ -41,6 +42,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.62.0
github.com/redpanda-data/common-go/proto v0.0.0-20250416183016-0cd4089182bd
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to pull *pb.mcp.go files

this is currently on a branch, i will update before merging

Organization iamv1connect.OrganizationServiceClient
ResourceGroup controlplanev1connect.ResourceGroupServiceClient
Serverless controlplanev1connect.ServerlessClusterServiceClient
Region controlplanev1connect.RegionServiceClient
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added missing clients

@@ -33,6 +33,15 @@ func newAuthInterceptor(token string) connect.UnaryInterceptorFunc {
}
}

func newReloadingAuthInterceptor(f func() string) connect.UnaryInterceptorFunc {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is a specialized interceptor, that does not use a static token. instead, it can call a function that provides the token (which can be refreshed in the background)

@birdayz birdayz changed the title WIP - MCP support Add MCP support for Redpanda Cloud Apr 17, 2025
@birdayz birdayz force-pushed the jb/wip-mcp branch 3 times, most recently from 8022cf2 to 875fa5d Compare April 17, 2025 14:52
@r-vasquez
Copy link
Contributor

There seem to be missing files for the bazel build, @birdayz please run make bazel to autogenerate the files.

(It's worth rebasing if you are using a Mac as we fixed a bug for the autogeneration in #25368)

@rockwotj rockwotj self-requested a review April 17, 2025 16:37
@birdayz birdayz force-pushed the jb/wip-mcp branch 6 times, most recently from ef2c072 to ce7a537 Compare April 22, 2025 11:02
@birdayz
Copy link
Contributor Author

birdayz commented Apr 22, 2025

i addressed the comments, could you have a look once more @r-vasquez ? thanks!

@vbotbuildovich
Copy link
Collaborator

vbotbuildovich commented Apr 22, 2025

CI test results

test results on build#64852
test_id test_kind job_url test_status passed
gtest_raft_rpunit.gtest_raft_rpunit unit https://buildkite.com/redpanda/redpanda/builds/64852#01965d2b-3106-448c-ad5a-4ca68873945d FLAKY 1/2
rptest.tests.scaling_up_test.ScalingUpTest.test_scaling_up_with_recovered_topic ducktape https://buildkite.com/redpanda/redpanda/builds/64852#01965d86-13c8-4c77-80cb-cf5592ef0ba2 FLAKY 16/21
test results on build#64873
test_id test_kind job_url test_status passed
gtest_raft_rpunit.gtest_raft_rpunit unit https://buildkite.com/redpanda/redpanda/builds/64873#01965e88-6938-4f33-85a6-53db284ce0de FLAKY 1/2
rptest.tests.upgrade_test.UpgradeBackToBackTest.test_upgrade_with_all_workloads.single_upgrade=False ducktape https://buildkite.com/redpanda/redpanda/builds/64873#01965ee1-2e69-4dca-b664-e7c29d01e36a FLAKY 16/21

r-vasquez
r-vasquez previously approved these changes Apr 22, 2025
Copy link
Contributor

@r-vasquez r-vasquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

https://github.com/redpanda-data/redpanda/pull/25802/files#r2048801329 <- Let me know when you update this and I'll approve right away.

- Add command to install the MCP server. Currently, only claude desktop
  is supported.
- Add command to serve the stdio server. MCP clients launch it as a
  subprocess, and interact over stdin/stdout with it.
- Authentication to cloud is completely re-used from rpk.
@birdayz birdayz enabled auto-merge April 22, 2025 17:29
@birdayz birdayz merged commit ff8bd49 into dev Apr 22, 2025
25 checks passed
@birdayz birdayz deleted the jb/wip-mcp branch April 22, 2025 21:48
@vbotbuildovich
Copy link
Collaborator

/backport v25.1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants