No need to change a line of code! Convert HSF to MCP Server

Written by
Audrey Miles
Updated on:June-24th-2025
Recommendation

Seamlessly integrate HSF services into the MCP ecosystem, Alibaba internal experience sharing.

Core content:
1. The development of the MCP ecosystem and its impact on resource access and multi-agent interoperability
2. Alibaba uses Higress AI gateway to achieve rapid conversion of HSF services to MCP Server
3. Higress's role in the MCP ecosystem and the advantages of hosting solutions

Yang Fangxian
Founder of 53A/Most Valuable Expert of Tencent Cloud (TVP)

MCP provides the possibility of standardization for resource access and multi-agent interoperability. The open source community is currently very enthusiastic about the ecological construction of MCP. mcp.so has provided nearly 10,000 mcp servers, and various other MCP ecological components are emerging in an endless stream. AI giants are actively embracing MCP and have provided their own MCP servers. For developers, how to quickly enable their business to enter the MCP ecosystem, whether to follow up and how to quickly follow up have become challenges that must be faced.
This article is based on Alibaba's internal MCP practice experience. It achieves MCP protocol offloading through Higress AI Gateway without changing the application code, quickly converts the internal HSF service to MCP Server, and connects the existing microservices to the MCP ecosystem. On the premise of not stepping into the void on both business and technology, the right to choose AI native application infrastructure is retained.
HSF is Alibaba's internal RPC framework with Apache Dubbo as the core. It provides RPC protocols and high-quality framework layer implementation support that support ultra-large-scale high performance, and provides a stable, easy-to-use and efficient microservice ecosystem for Alibaba's internal R&D colleagues and businesses. Currently, Alibaba's internal HSF has millions of production-level instances, and has experienced the test of the tens of billions of peaks during Double 11 for many years. Around HSF, there are also registration centers and configuration centers that have evolved over the years to support ultra-large-scale stable operation. Nacos is an open source product born out of its design philosophy.
Higress is Alibaba's open source AI gateway. In 2020, Higress took on the important task of cross-VPC communication for the group. While ensuring high performance, its rich features significantly reduced the cost of business development and became the de facto gateway standard for internal cross-domain communication. In 2022, after two years of stable operation internally and after experiencing traffic verification of one million QPS in a single cluster, Higress announced open source. Due to its excellent performance and ease of use, it quickly attracted a lot of user attention and became the gateway of choice for many commercial customers. After 2024, Higress, as the most widely used AI gateway, became an officially certified gateway solution in the field of large models and MCP.
For more information about Higress' open source experience, please refer to this article: https://higress.cn/blog/higress/.
In the MCP ecosystem, Higress, as a key infrastructure component, uses its protocol conversion capabilities to connect existing services to the MCP ecosystem without code changes. In the MCP service hosting solution, Higress is responsible for receiving MCP requests and completing protocol unloading, providing unified identity authentication, traffic scheduling, parameter mapping, and security auditing capabilities, allowing developers to quickly expose existing services as MCP Servers without in-depth understanding of the details of the MCP protocol. This hosting mode effectively solves challenges such as rapid iteration of the MCP protocol and unstable SDK, and provides enterprises with flexible choices in the development of AI native applications.
Next, let me answer a question. With so many HSF services within Alibaba, why do you choose to connect to MCP through hosting instead of native SDK?

challenge

  • MCP itself evolves very fast, and it is very difficult for internal users to keep up with its iteration pace. It has only been 4 months since the last release of SPEC  0326. According to the RoadMap of MCP 2025 , there may be more than 3 SPEC releases in the future. These SPECs do not guarantee full forward compatibility at the protocol level. It is easy to encounter the problem of repeated investment and stability cost of upgrading the old version of MCP online to the latest version after connecting to the official open source SDK, which will be very painful for the R&D of core applications within the group.

  • The existing MCP SDK is still relatively basic, with only a simple implementation of SPEC. It is far from production-level in terms of usability and needs a long time to stabilize. For example, there are many changes in the APIs of java-sdk 0.7.0 and 0.8.0, MCP Java SDK Migration Guide: 0.7.0 to 0.8.0 . For application developers, not only do they have to upgrade, but they also have to change the access code, which doubles the cost and risk.

  • Although the MCP ecosystem is in full swing, it lacks systematization and best practices. The time cost of reaching consensus and the personal learning cost cannot be ignored. How to quickly master the MCP protocol and MCP application development? The fastest way is of course to run it in the existing business scenarios first, and then learn while running. So how can you run your own MCP Server without understanding MCP?

Convert HSF Service -> MCP Server

Components

  • Higress Gateway: Accepts MCP traffic and provides unified identity authentication, traffic scheduling, parameter mapping, security auditing and other capabilities.
  • MCP console: A platform for AI application developers to create and maintain MCP server/tools/prompts, providing tool hosting, debugging, and orchestration capabilities.
  • MCP Registry: Registration center, responsible for the registration and client discovery of all MCP servers within the group, undertaken by the HSF Registration Center.
  • MCP Metadata Center: Stores prompt words, MCP server metadata, tool metadata, versioning support, etc., which are undertaken by the HSF Configuration Center.

Procedure

Step 1: Open the HSFOPS  backend of the corresponding environment and select the MCP sidebar

Step 2: Select the hsf application (the application where you are the owner/ops), service name and method name that needs to be transferred to MCP Tool.

Note: The tool description needs to be accurate and specific to identify the purpose of the tool for the large model.

Step 3: Add the fieldName and description of the method input parameter in the //TODO part

The request parameter structure is automatically generated, just add the name (key) and description (description).

Step 4: Use the above tool to access the domain name in mcp sse mode (it will be listed about one minute after the tool is created)

http://{MCP endpoint prefix}/{applicationName}/sse

The cursor is configured as follows

{ "mcpServers": { "{applicationName}": { "url": "http://{MCP endpoint prefix}/{applicationName}/sse" } }}

Actual Results

cursor


Thinking about MCP from the perspective of AI Infra

  • MCP is not a silver bullet. From the perspective of the distributed field and AI infrastructure, MCP as a communication protocol or AI agent protocol is not mature enough and is far from meeting the standards for production-level implementation. Therefore, whether it is a business or infrastructure team, blindly choosing All in MCP is irresponsible. It is a better choice to implement the prototype of AI business scenarios through rapid follow-up and rapid trial and error. Therefore, the focus of the AI ​​infra team should be on how to reduce the cost of business innovation, rather than dragging the business to pay for their own wrong decisions. Implementing this in technical decisions, choosing Higress gateway to undertake MCP protocol unloading and then adapting to the existing internal protocols is the best choice for Alibaba internally. Whether MCP develops to be mature enough or is replaced by other ecosystems, the business can flexibly choose to follow up or switch, and the entire company's infrastructure will not experience vendor lock-in.
  • Is Market important? Both important and unimportant. AI agents solve the problem of how to expand the boundaries of LLMs, thereby solving more complex practical problems. The reasonable positioning of MCP is to solve the problems of duplicate construction and standardized resource access of MxN. MCP Market is a natural product and its existence is necessary. However, it is putting the cart before the horse to think that mastering the Market means mastering everything. The reasonable path is to adapt the infrastructure first, so that business R&D students can have more choices and faster iteration speed, and naturally there will be a perfect and easy-to-use Market as a portal. If the previous accumulation is not solid, the latter can only be a castle in the air.
  • It seems that only the conversion of tools is focused on, but what about prompts/roots and sampling? To answer this question, you need to read more about the background and usage scenarios of MCP, including Anthropic's positioning of it and the goal of creating MCP. MCP is the starting milestone of AI business engineering, but not the end. While investing in MCP, paying attention to the development of AI agent interaction protocols such as A2A and ANP is an inevitable choice for teams working on Infra.

Summarize

This article provides Alibaba's internal large-scale HSF service rapid conversion to MCP Server practice, to help business colleagues reduce transformation costs, quickly integrate into the MCP ecosystem, and keep up with the development speed of AI native applications. At present, MCP is only the first step, and there is still a long way to go for AI native applications. I hope this article can inspire students and teams interested in the AI ​​Infra field.

Accelerate application performance based on cache


As business develops, the applications that carry the business will face greater traffic pressure. How to reduce the system response time and improve system performance has become a problem that every developer needs to face. Using cache is the preferred solution. This solution introduces how to use the cloud database Redis version to build a cache to speed up the application.