-
Notifications
You must be signed in to change notification settings - Fork 26
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
Questions about getting started #37
Comments
Hi @DePasqualeOrg. Remote MCP servers are a new development. So far, this SDK has prioritized the stdio interface, which connects to a running local process. We're looking to add support for remote servers this week, and will be sure to provide documentation for all of that. |
@DePasqualeOrg its possible currently by writing your own Transport protocol implementations. We did this for both the client and server. Since the spec around networking has just recently been updated I'd wait just a tiny bit and let that settle or let @mattt get the formal support in. Speaking of... @mattt Pretty interested in seeing how you go about the network updates. We are running ours via Hummingbird so the Transport implementation for the server part ended up being pretty simple/small. May be cool to add a Hummingbird/Vapor examples as part of the network updates. |
Great, thanks! I'll keep an eye out for the upcoming changes. |
@mattt , When you built the iMPC app, why did you opt to use a NetworkTransport vs the stdio transport implementation? I'm not exactly sure when to use which. Also I'll put this in a new issue or on that repo if necessary, but figured it falls in line with "questions getting started" |
I also would love to see an example involving a Transport on Hummingbird. |
Yeah, that's probably what I'll end up doing here, too. I'm wary of how many dependencies we'll need to pull in to support HTTP transport, but that seems like the least bad option. (If it does prove onerous, maybe we could conditionalize with package traits). Hummingbird seems like a reasonable choice, so I'll likely just go with that. For Vapor and other frameworks, we can provide documentation for implementing a custom transport. /cc @sebsto
Yeah, iMCP is an interesting case that's hard to generalize from. Claude Desktop and other MCP clients need a command to run. For iMCP, that's the Once HTTP transport is more widely supported, we could simplify things by having iMCP run its own local MCP server over HTTP and have clients connect directly to that. |
I would love to investigate an AWS Lambda transport. Is there interest for that ? |
@sebsto It looks like Hummingbird has an extension for Lambda, so that should be straightforward implementation. For this library, we'll probably stick to the official transports. |
@mattt if it would be helpful to see my terrible Hummingbird implementation I'm happy to send it your way. The transport for it is really just an AsyncStream for bridging between the SSE handler i have in Hummingbird and your Server class. Honestly in these sort of environments i'm not really sure the Transport should have any networking responsibility in it at all. Thats so dependent on the deployment details. |
@mattt I understand that and I am in close touch with Adam and Joannis that developed that extension. While this extension is great to host unmodified Hummingbird apps on Lambda, it might be more efficient in terms of performance and costs. This extension requires an APIGateway as an HTTPS endpoint and convert all APIGateway HTTP Parameters to their hummingbird equivalent and back. I'm one of the core maintainer of the Swift Runtime AWS Lambda. I am considering writing a native Lambda Transport to work with this implementation. |
@mattt Hi, is it possible to use this SDK for MCP implementation within an iOS App? Assuming an object_1 of class_1 in the App acts as a MCP client, and an object_2 of class_2 acts as a MCP server, an object_3 of class_3 interact with LLM and MCP client. If possible, I'm having trouble with getting start, like connect a client to a server |
Looking at the code examples provided in the readme, it's not clear to me how the client connects to servers. Is it assumed that the server is running on localhost, and the client automatically discovers the server?
If I understand correctly, remote servers are now (or will soon be) supported with MCP. Could you provide examples of connecting multiple remote servers to the client, if this is possible?
The text was updated successfully, but these errors were encountered: