CARVIEW |
Navigation Menu
One Rust Core, Many SDKs — A Proposal to Unify MCP’s Language Ecosystem #354
Replies: 14 comments · 36 replies
-
Beta Was this translation helpful? Give feedback.
All reactions
-
The developer workflows in both the languages (and future languages that are supported becomes consistent)
|
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Thank you for your work. Can I confirm if this proposal is to use Rust as the core and other languages as the outer API encapsulation? So, does Rust SDK need to separate its core from external APIs? |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 3
-
Yes, the proposal is to use Rust as the core and other languages as the outer API encapsulation. No Rust SDK doesnt need to change - only minimal changes are needed. For reference, I was able to build Python SDK on top of your core Rust SDK without a single change in the Rust sdk. Cant say that for all the other languages no change will be needed but I would say its possible. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I think this proposal is great, but Rust SDK is not yet fully mature and we are trying to release its first version. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I will be submitting the Python bindings to the core rust sdk shortly. Kindly review it and you will see for yourself how it fits into the system. Would be curious to know how we can help and make the Rust SDK mature as well whilst we build bindings. |
Beta Was this translation helpful? Give feedback.
All reactions
-
The cross system validation of Rust SDK, such as Windows and macOS, has not yet been confirmed, and the revised features of the new version are still being improved. There is still work to be done on the integration testing framework. |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
Do you mean Windows and MacOS desktop ? I have been running the rust sdk on Macos for last 3 weeks without any issues. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I would like to incorporate the interaction between the service and client in the example into the integration testing first. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I agree this is an important part. We can take this forward once I submit the typescript binding PR. |
Beta Was this translation helpful? Give feedback.
All reactions
-
How to create mcp web server in other programming language? I am curious about how to make a customized a mcp web server in other programing language by using rust SDK as a core? What if user want to add other service to web service router? |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
-
The concept remains the same whether you are on the client or server, my upcoming PR is for the client but once you merge it I will do the same for the server as well. I really liked how you build the "Service" with generics. A few areas are confusing like ServiceExt and Client_Info both using serve but nothing major. Can you explain this "What if user want to add other service to web service router?" You mean expose another tool or resource or prompt? |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Beta Was this translation helpful? Give feedback.
All reactions
-
I have submitted PR 172 for your review @jokemanfire @4t145 Kindly share your feedback. |
Beta Was this translation helpful? Give feedback.
All reactions
-
That's a lot of work, I mean, there already are fine maintained python and JavaScript sdk, is it really worth to rebuild those upon rust sdk, which hasn't been widely use yet? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Its a good question and the basic reason is to not reinvent the wheel. Currently each team of dozens of contributors is essentially building the same sdk in different languages. As opposed to one core sdk around which we could do just incremental work to build a language specific offering. There are other benefits also about security, performance, audit, speed to market etc that I have outlined in my original proposal. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I quite agree with this proposal because it is indeed wasteful to spend a lot of time implementing the same SDK in different languages, but what I am concerned about is
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello there,
|
Beta Was this translation helpful? Give feedback.
All reactions
-
You can initiate an ISSUS discussion in the Rust SDK repository to support more people to participate. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks, I just finished the Typescript bindings and will start an issue discussion in the Rust SDK repository |
Beta Was this translation helpful? Give feedback.
All reactions
-
I just submitted the PR 183 for Typescript bindings with example and README.md |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @jokemanfire @4t145 for your feedback - to summarize
|
Beta Was this translation helpful? Give feedback.
All reactions
-
We are just maintainer, we actually don't have any permission except merging code. You should contact some one in modelcontextprotocol organization: https://github.com/orgs/modelcontextprotocol/people |
Beta Was this translation helpful? Give feedback.
All reactions
-
Re: (4), the |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello @olaservo Yes I am aware that org is for official repos. The idea as I mentioned below to @LucaButBoring is to first gain feedback using some popular languages and then get sdks out for languages that are not yet supported. Finally we would like to make these sdks the official sdks by reaching out to the org. |
Beta Was this translation helpful? Give feedback.
All reactions
-
This is a cool proposal, and it's great to see examples in both Python and TS already. Regarding adoption and the long-term plans for this, I have a few questions (I don't expect any of these to have perfect answers, I'm just interested in discussing these):
Unrelated to the above, I found some libraries that may wind up being useful for this later on for other languages (was researching to do something exactly like this myself, actually):
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks for your detailed response @LucaButBoring
|
Beta Was this translation helpful? Give feedback.
All reactions
-
One benefit that people may not realize now but becomes a big challenge is the "integration tax" - you have M clients x N servers |
Beta Was this translation helpful? Give feedback.
All reactions
-
I think this is sensible, but it also makes it harder over time to get the existing SDKs to migrate to it - "paying down" that integration tax will get harder as all of the SDKs continue to grow in isolation from each other.
The reason I bring up callbacks is because of features that involve receiving data without being the request initiator, like sampling, (soon) elicitations, or even just server-side tool declarations. All of those are things that don't lend themselves very well to simple future/promise APIs, which is why they're typically exposed with callback interfaces. Taking a look at your TS example, you only have client code generation for tool listing and tool calls, which fit an async API very well. I expect sampling to be more complicated.
I wasn't aware of WASIp2 (only tried WASIp1) - that'd solve a lot of problems once it's more widely-adopted. Not sure how far out that'll be, but it does look extremely promising. wazero (and WASM in general) is a good idea worth exploring, but until WASIp2 is adopted, you'll be stuck with the problem of needing to implement language-specific code to polyfill a potentially very large number of syscalls.
Same here, I hadn't started any implementation yet, just planning to do similar, though. I'm paying attention to this effort to see where it goes, first. |
Beta Was this translation helpful? Give feedback.
All reactions
-
You are right, it will be harder over time as the SDKs mature. Worst case we would like to support the next level and long tail of languages. I am planning to look at callbacks today and see what challenges they present. Its a good point and definitely should be addressed at an early stage like this. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Have you taken a look at https://github.com/Azure/azure-sdk-for-rust? This is our official Azure SDK for Rust and @ronniegeraghty is working with partners to prioritize services. We do separate out those concepts of serialization, transport, etc. - as we do in all our languages' Azure SDKs - and even support arbitrary async runtimes, defaulting to We don't have SSE support yet but it's on the backlog and just lower priority right now. My thinking was basically a BTW, there's also an official Azure SDK for Go: https://github.com/Azure/azure-sdk-for-go. Same underlying design: all our SDKs are designed to be idiomatic to the language, but consistent in the feature set and, to some degree, overall shape of clients. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks for the pointer - I took a brief look at it and I like the concept of pluggable transport engines. Some other parts I am sure as the MCP spec evolves can be useful. As I said earlier cross-pollination of ideas is good for the community. Would you be willing to consider language bindings to accelerate the azure sdk adoption? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you clarify?
We have Azure SDKs in many other languages already; see https://azure.github.io/azure-sdk/releases/latest/. |
Beta Was this translation helpful? Give feedback.
All reactions
-
This is an interesting proposal as a standalone project, but I feel it's best to keep MCP as a protocol rather than a single unified platform. In the case of my SDK for PHP a major priority was allowing the creation of MCP clients and servers in shared hosting environments, where the web developer may not necessarily have root access or privileges to the underlying server. This meant using pure PHP code and avoiding dependencies that aren't already provided by most hosting providers. I'm sure there are other platforms where MCP would be useful, but may have specific requirements that would be overlooked in a unified project that tries to accommodate all platforms. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I think this ties into my previous comment on browser clients and Go with cgo disabled - I think there are answers to this (either WASM or simply don't leverage this in a few specific languages with more unique use cases), but that starts to get into some complicated trade-offs around integration patterns. |
Beta Was this translation helpful? Give feedback.
All reactions
-
@logiscapedev @LucaButBoring A thin layer in browser that works with the server side clients could be a starting point. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Its still separate - the only question is how do you want to implement it.
We should also do the same - this implementation approach doesnt prevent as it will generate PHP code just like any other PHP app.
|
Beta Was this translation helpful? Give feedback.
All reactions
-
@logiscape thanks for your feedback. As the author of the most popular community led PHP SDK your views are welcome. For e.g. as you mention that PHP client and server, but its not necessary that all servers be written in PHP or vice versa, in such a case we end up in testing all such combinations each with its own slight variations etc and as the protocol involves the complexity increases. I believe we can keep the PHP idiomatic and ergonomic and still work with a language binding of rust. |
Beta Was this translation helpful? Give feedback.
All reactions
-
I am thinking of starting with the following languages for an official SDK that are not yet supported
|
Beta Was this translation helpful? Give feedback.
All reactions
-
Flutter/Dart would be a great bet IMO - it has a fantastic language toolchain, and there's a Rust bindings package that is very well supported (see: https://github.com/fzyzcjy/flutter_rust_bridge). |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @pattobrien - Took a quick look and it appears it has got a lot of stars for such a niche area and is well received. Do share any other feedback items. I am planning to put together a strawman before starting the work. |
Beta Was this translation helpful? Give feedback.
All reactions
-
@tarunanand-dev amazing, glad the info could be of use! I'm experienced in both Dart and building SDK generators as well (not so much the FFI/Rust bindings part); I'd be more than happy helping you get up to speed with "idiomatic" Dart and can help review the strawman and help with prototyping. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello, There were several action items from this discussion thread. I am attempting the first one here. Kindly give feedback. As mentioned earlier - integration tests and compatibility tests would be very important because
There are 2 structures in mind
compatibility-tests/
compatibility-tests/ Test Categories based on the SDK's test structure for e.g: Protocol and Schema: Tool and Notification: Language-specific: Thoughts and feedback? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hello All, Following up on my previous post - I have released a Milestone 0 of the MCP Bench at https://github.com/unimcp/mcpbench MCPBench is the open standard for compatibility testing of various Model Context Protocol (MCP https://github.com/modelcontextprotocol) client and server SDK implementations. As the MCP ecosystem grows, not every server or client will be written in the same language, creating an N×N compatibility matrix where N represents the number of language SDKs available. Our goal is to ensure seamless interoperability between different MCP implementations, regardless of the programming language used. Initial SDK Support: Python SDK (Official) Future Expansion: Additional language SDKs will be added as the MCP ecosystem grows. The rest of the details are in the README. @jokemanfire @4t145 and everyone else - please share your thought specific to Rust or others as well. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Added more examples for rust, typescript and python. |
Beta Was this translation helpful? Give feedback.
All reactions
-
You can create a pr to introduce your work in the readme of rust-sdk repository. |
Beta Was this translation helpful? Give feedback.
All reactions
-
If it can be develop as a integrated testing tool? If ok , that will be very nice. |
Beta Was this translation helpful? Give feedback.
All reactions
-
That was the idea - if we can do it as part of the nightly build/pre-release package. Currently the system picks the latest 2 release and does a 2xNxN matrix test and for rust it just uses the current main as there is no release package yet. |
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 1
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Your Idea
Folks, as MCP’s language ecosystem expands, we’re spending more time re‑implementing the same deterministic‑state logic than shipping new ideas. I’d like us to flip that ratio by standardizing on a single, battle‑hardened Rust core (rust‑sdk) that owns the heavy workflow engine— sessions, peering, transport, serialization—while each language surface (Python, JS/TS, Go, etc.) stays 100 % idiomatic and lightweight.
Rust gives us memory‑safe, no‑GC performance overhead, a stable FFI, and a proven path. The payoff is immediate: one quality, security and performance audit instead of five, feature parity across languages on day 1, and p99 latencies that drop from milliseconds to microseconds—without asking Python or JavaScript developers to learn Rust.
In short, one deterministic engine, many friendly faces. We have built a V 0.1 Python SDK based on this architecture so that we write less boilerplate and innovate faster on the parts that matter.
Scope
Beta Was this translation helpful? Give feedback.
All reactions