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

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
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.