Conversation
e3c543a to
d170790
Compare
f41be0c to
d9df5a6
Compare
| def __init__(self, directory: Path | str | None, cache_tools: bool = True): | ||
| super().__init__( | ||
| params=StdioServerParameters( | ||
| command="redpanda-connect", |
There was a problem hiding this comment.
Is this supposed to be redpanda-connect or rather something like rpk connect? If not, what is the redpanda-connect command?
There was a problem hiding this comment.
Yeah, redpanda-connect is the raw binary from the connect repo that rpk connect invokes as a plugin. This code is certainly going to change as this all evolves
| from .tools import Tool, ToolResponse, ToolResponseImageContent, ToolResponseTextContent | ||
|
|
||
|
|
||
| class MCPServer: |
There was a problem hiding this comment.
The naming is a bit confusing. It seems these are all MCP clients and not mcp servers. I assume done for users of this sdk because they think of defining MCP servers as their targets and not necessarily about configuring clients?
How abbout Connection instead of Server?
There was a problem hiding this comment.
Good points. I strugged with the naming here. I used Endpoint because this isn't a live connection just how to connect to a server.
| """ | ||
|
|
||
| # TODO(rockwood): support list change notifications | ||
| _cache_tools: bool |
There was a problem hiding this comment.
Given that MCP differentiates between tools, resources etc I wonder whether we should rename to _cache_initialization to make it more generic and cache the entire init response.
There was a problem hiding this comment.
Just changed to cache_enabled
|
|
||
| class SSEMCPServer(MCPServer): | ||
| """ | ||
| A MCP server that communicates with an MCP server over Server-Sent Events. |
There was a problem hiding this comment.
That description seems weird. Maybe something like: A MCP server that communicates with clients over SSE?
There was a problem hiding this comment.
This is clearer now using SSEMCPEndpoint
|
|
||
| class WebsocketMCPServer(MCPServer): | ||
| """ | ||
| A MCP server that communicates with an MCP server over a WebSocket. |
There was a problem hiding this comment.
Double mention of mcp server
There was a problem hiding this comment.
Fixed with Endpoint rename
38fe3f1 to
36b84de
Compare
This is the code from my demo in slack
https://redpandadata.slack.com/archives/C08F89CE5D0/p1743107307998179