Skip to content

feat: add mcp server foundation and CLI integration - #1917

Open
dolliecoder wants to merge 3 commits into
kmesh-net:mainfrom
dolliecoder:feature/mcp-server-pr1
Open

dolliecoder wants to merge 3 commits into
kmesh-net:mainfrom
dolliecoder:feature/mcp-server-pr1

Conversation

@dolliecoder

Copy link
Copy Markdown

What type of PR is this?

/kind feature

What this PR does / why we need it:
This PR lays the architectural foundation for the Kmesh Model Context Protocol (MCP) Server
Specifically, this PR:

  1. Adds the github.com/mark3labs/mcp-go SDK dependency to go.mod.
  2. Creates the core KmeshMCPServer struct in mcp/server/server.go to handle MCP initialization.
  3. Wires up the new kmeshctl mcp serve subcommand for local AI agents.
  4. Creates a standalone entrypoint in mcp/cmd/mcp-server/main.go for future containerization.

This establishes the baseline infrastructure so that subsequent PRs can focus entirely on migrating the core dump, log, authz, and secret capabilities into callable MCP tools.

Which issue(s) this PR fixes:
Fixes #1916

Special notes for your reviewer:
This is a foundational PR to establish the CLI skeleton and dependencies, so no core Kmesh data is being exposed yet. The mcp-go SDK was chosen because it provides robust, native support for both STDIO (used by Cursor/Claude Desktop) and SSE transport.

Does this PR introduce a user-facing change?:

Added the `kmeshctl mcp serve` command to run the Kmesh Model Context Protocol server.

Signed-off-by: dolliecoder <dollychahar27@gmail.com>
@kmesh-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign yaozengzeng for approval. For more information see the Kubernetes Code Review Process.

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

Details Needs approval from an approver in each of these files:

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

@kmesh-bot

Copy link
Copy Markdown
Collaborator

Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.

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/test-infra repository.

Signed-off-by: dolliecoder <dollychahar27@gmail.com>
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.

Enhancement: Give Kmesh an AI Brain! (Model Context Protocol Server)

2 participants