I think we should take inspiration from the kubernetes-mcp-server https://github.com/containers/kubernetes-mcp-server/tree/main in practice it discovers dynamically the available resources, and it builds the MCP tools accordingly.
There are configuration options to skip some resources or actions if needed, we can add something similar as well as second step.
But I like the idea to remove all the code that currently makes the MCP a bit more static.
Most likely this will break some of the definitions we have today because those are manually written, the one we will have are derived from the resource description and things like that.
But it looks a lot easier to maintain long term. I am expecting less code, and it adapts based on server capabilities.
I would also like to reuse the auth client package in datumctl, so the authentication behaves in the same way (not 100% sure how it looks like, but that's the idea). The current auth package in datumctl has some limitations (it does not support token override I think), but the idea is to make those to get better together so we can offer the same experience. If you like the approach I can try and see where we end up (edited). In the end we want to embed the MCP as part of the CTL so it makes sense for authentication to be the same.
/cc @scotwells @zachsmith1
I think we should take inspiration from the kubernetes-mcp-server https://github.com/containers/kubernetes-mcp-server/tree/main in practice it discovers dynamically the available resources, and it builds the MCP tools accordingly.
There are configuration options to skip some resources or actions if needed, we can add something similar as well as second step.
But I like the idea to remove all the code that currently makes the MCP a bit more static.
Most likely this will break some of the definitions we have today because those are manually written, the one we will have are derived from the resource description and things like that.
But it looks a lot easier to maintain long term. I am expecting less code, and it adapts based on server capabilities.
I would also like to reuse the auth client package in datumctl, so the authentication behaves in the same way (not 100% sure how it looks like, but that's the idea). The current auth package in datumctl has some limitations (it does not support token override I think), but the idea is to make those to get better together so we can offer the same experience. If you like the approach I can try and see where we end up (edited). In the end we want to embed the MCP as part of the CTL so it makes sense for authentication to be the same.
/cc @scotwells @zachsmith1