Skip to content

Conversation

@JAORMX
Copy link
Collaborator

@JAORMX JAORMX commented Apr 24, 2025

This PR adds a --serve-resources flag to control whether to serve cluster resources as MCP resources. This is useful for large clusters where serving all resources might overwhelm an LLM's context window.

The implementation includes:

  1. A new Config struct in pkg/mcp/server.go to hold configuration options
  2. A ServeResources field in the config that defaults to true for backward compatibility
  3. Modified CreateServer function to accept this config and conditionally add resources
  4. Updated main.go to add the --serve-resources flag and pass the config
  5. Added documentation to the README.md explaining the new flag

All tests are passing and there are no linting issues.

Fixes #8

This adds a --serve-resources flag to control whether to serve cluster resources as MCP resources. This is useful for large clusters where serving all resources might overwhelm an LLM's context window.

Fixes #8
@JAORMX JAORMX requested a review from ChrisJBurns April 24, 2025 13:13
@ChrisJBurns ChrisJBurns merged commit e14417a into main Apr 24, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option to not serve cluster resources

3 participants