Alibaba MCP Distributed Landing Practice: Quickly Convert HSF(Dubbo) to MCP Server
Xing Ci
|
May 13, 2025
|
This article is based on the internal MCP practical experience of Alibaba, realizing that applications can integrate without code modifications, achieving MCP protocol offloading through the Higress AI gateway, quickly converting internal HSF services into MCP Servers, and connecting existing microservices to the MCP ecosystem while ensuring that business and technology do not miss a beat, thus retaining the option for AI-native application infrastructure.
HSF is an RPC framework within Alibaba that is based on Apache Dubbo, providing support for extremely large-scale high-performance RPC protocols and high-quality framework-level implementations, serving as a stable, easy-to-use, and efficient microservices ecosystem for Alibaba's internal R&D teams and businesses. Currently, Alibaba's internal HSF has millions of production-level instances and has endured years of dual 11.11 billion-level peak tests. Around HSF, there have been several years of evolved support for large-scale stable operation with a registration center and configuration center, with Nacos being an open-source product born out of its design philosophy.
Higress is Alibaba's open-source AI gateway. In 2020, Higress took on the heavy responsibility of cross-VPC communication for the group, and while ensuring high performance, its rich features significantly reduced the development costs for businesses, becoming the de facto standard for internal cross-domain communication gateways. In 2022, after operating stably for two years and undergoing traffic verification of one million QPS in a single cluster, Higress announced its open-source status. Due to its excellent performance and ease of use, it rapidly gained significant user attention and became the gateway of choice for many commercial clients. After 2024, Higress, as the most widely used AI gateway, became an officially certified gateway solution in the fields of large models and MCP.
For more information on Higress's open-source experience, you can refer to this article, Alibaba's Heavy Open Source Cloud Native Gateway.
In the MCP ecosystem, Higress serves as a key infrastructure component, achieving the integration of existing services with no code modifications into the MCP ecosystem through its protocol conversion capabilities. In the MCP service hosting solution, Higress is responsible for receiving MCP requests and completing protocol offloading, providing capabilities such as unified identity authentication, traffic scheduling, parameter mapping, and security auditing, allowing developers to quickly expose existing services as MCP Servers without needing in-depth understanding of the MCP protocol details. This hosting model effectively addresses challenges such as rapid iteration of the MCP protocol and instability of SDKs, offering flexibility for enterprises in the development of AI-native applications.
Next, let’s answer a question: with so many HSF services within Alibaba, why choose the hosting method to connect to MCP instead of the native SDK method?
01 Challenges
The evolution of MCP itself is very rapid, making it very difficult for internal users to keep up with its iteration pace. The SPEC released on 0326 was only 4 months after the last release. According to the MCP 2025 roadmap, there may be more than 3 additional SPEC releases in the future, and these SPEC do not guarantee full forward compatibility at the protocol level. It is easy to encounter the issue of needing to invest repeatedly to handle how to upgrade the online old versions of MCP after integrating with the officially open-sourced SDK, which can be extremely painful for the R&D of core applications within the group.
The existing MCP SDK is still quite primitive and has only implemented a simple version of the SPEC, falling far short of production-level usability and requiring a long stabilization period. For example, the APIs of the Java SDK versions 0.7.0 and 0.8.0 have many changes, as noted in the MCP Java SDK Migration Guide: 0.7.0 to 0.8.0. For application development personnel, not only do they need to upgrade, but they also need to modify the integration code, doubling the cost and risk.
Although the MCP ecosystem is thriving, it lacks systematic and optimal practices, and the time and personal learning costs to reach a consensus cannot be ignored. The fastest way to master MCP protocols and MCP application development is, of course, to run in existing business scenarios first and learn while running. So how can one get their MCP Server running without understanding MCP?
02 Converting HSF Service -> MCP Server
Components
Higress Gateway: Undertaking MCP traffic, providing aspects such as unified identity authentication, traffic scheduling, parameter mapping, and security auditing.
MCP Console: A platform for AI application R&D personnel to create and maintain MCP server/tools/prompts, providing tool hosting, debugging, and orchestration capabilities.
MCP Registry: The registration center responsible for the registration of all MCP servers in the group and client discovery, handled by the HSF registration center.
MCP Metadata Center: Storing prompts, MCP server metadata, tool metadata, versioning support, etc., handled by the HSF configuration center.
Operating Steps
Step 1: Open the HSFOPS backend for the corresponding environment and select the MCP sidebar.
Step 2: Select the HSF application that needs to be converted to MCP Tool (the application you own/operate), as well as the service name and method name.
Note: Tool descriptions need to be accurate and specific for large models to recognize the purpose of the tool.
Step 3: Fill in the fieldName and description for the parameters of the method marked as //TODO.
The request parameter structure will be generated automatically; you only need to add the name (key) and description.
Step 4: Use the above tools to access the domain via MCP SSE (the tool can be listed about a minute after creation).
http://{MCP endpoint prefix}/{applicationName}/sse
The code configuration is as follows.
03 Thoughts on MCP from the Perspective of AI Infra
MCP is not a silver bullet. From the perspective of distributed fields and AI infrastructure, MCP, as a communication protocol or AI entity protocol, is not mature enough and does not meet the standards for production-level implementation. Therefore, whether for business or infrastructure teams, blindly choosing to go All in MCP is irresponsible behavior. A better choice is to quickly follow up and rapidly iterate to implement AI business scenario prototypes. Therefore, the focus of the AI infra team should be on how to reduce the costs of business innovation, rather than forcing the business to cover the costs of their poor decisions. From a technical decision perspective, opting for Higress gateway to handle MCP protocol offloading and then adapting the existing internal protocols is a globally better choice for Alibaba. Regardless of whether MCP develops to be mature enough or is replaced by other ecosystems, businesses can flexibly choose to follow up or switch without experiencing vendor lock-in for the entire company's infrastructure.
Is the market important? It’s important yet not too important. AI entities solve problems by expanding the boundaries of LLMs, thereby addressing more complex real-world issues. The rational positioning of MCP is to solve the issue of repetitive construction and standardized resource access across MxN. The MCP market is a naturally necessary product. However, thinking that mastering the market means mastering everything is a reversal of priorities. A reasonable approach is to first adapt the infrastructure properly, allowing fellow developers more choices and faster iteration speeds, naturally leading to the existence of a complete and user-friendly market as a portal. If the initial groundwork is not solid, any subsequent structures will only be castles in the air.
It seems that the focus is solely on tool conversion; what about Prompts/Roots and Sampling? Answering this question requires an extended reading of the background of MCP's birth and its usage scenarios, including how Anthropic positions it and the goals of creating MCP. MCP is a milestone at the starting point of AI business engineering, but it is not the endpoint. While investing in MCP, it's necessary to pay attention to the development of A2A and ANP, the AI agent interaction protocols, which is the inevitable choice for the infra team.
04 Conclusion
This article provides a practice for rapidly converting Alibaba’s large-scale HSF services into MCP Servers, aimed at helping business personnel reduce transformation costs and quickly integrate into the MCP ecosystem, keeping pace with the development speed of AI-native applications. Currently, it seems that MCP is just the first step; the road for AI-native applications is still long. I hope this article can inspire those interested in the field of AI Infra.