Hands-On: Building an MCP Advisor on OceanBase
What Are MCP and MCP Advisor
MCP (Model Context Protocol) can be simply understood as the “hands” and “feet” of AI large models. A large language model is essentially a probabilistic model of text, with both input and output being language text. However, to connect this language text to the various tools of the real world (such as turning on an air conditioner or a computer, or directing other tasks), you need a medium—and MCP is exactly that kind of unified medium interface. Think of it as the “USB-C interface” between AI and the world: just as a computer uses that interface to connect to hard drives, network drives, USB sticks, and other devices for auxiliary functions, MCP does the same for AI.

Despite MCP’s important role, the tools in the real world are extremely varied. There are already more than 13,000–15,000 tools on the market, spanning all industries. For example, by combining MCP with large language models, you can draw 3D figures in Minecraft, CAD drawings, and robotic arms, or—in software engineering—deploy code and draw UI files.
However, the multitude of tools also brings many problems, mainly in three areas.
The first is the dynamic planning problem. For example, if you want to find the latest news on Xiaohongshu and analyze it, the Agent needs to come up with the idea, on the fly, of going to Xiaohongshu to look. So how does it quickly find the corresponding tool and MCP on Xiaohongshu to complete the task—that is, how does dynamic planning meet the need?
The second is the service discovery problem. Faced with a multitude of tools, you need to reduce the cognitive burden on the large model; otherwise, once the number of tools exceeds forty or fifty, the large model may not be able to cope, unsure which tool to choose and which tools it needs to discover.
The third is the usage complexity problem. Even after MCP has been selected, how to quickly put it to use and reduce usage complexity is also an urgent issue. This is why MCP Advisor came into being—to solve these problems.
Take the Xiaohongshu trending-topics problem mentioned above as an example. The large model itself has no ability to analyze and process this locally; it needs MCP. So it asks MCP Advisor which tools and MCPs can help it complete the task. MCP Advisor recommends, for example, RedNote MCP and MCP-Hot news-Servers. After recording these MCPs, the large model chooses one of them to continue. During the operation, if it finds that RedNote MCP also requires the playwright environment, it goes on to install playwright’s MCP and asks MCP Advisor how to install it. MCP Advisor tells it the installation method, and the large model can then complete dynamic planning uninterrupted throughout the entire process, continuing to run. This is the basic functionality of MCP Advisor providing both advice and installation capabilities.
How the Architecture Design Serves Both Enterprises and the Community
System Component Architecture
The community may have more than 13,000–15,000 relatively public data sources, while for enterprise users, the data sources may come from internal enterprise document data sources, document MCPs, and some publishing workflows that MCP cannot complete. Facing different scenarios and needs, we designed a multi-layer Provider architecture, divided into three layers—the MCP connection layer, the unified search service layer, and the vector engine and DB layer—that together complete the entire analysis and processing flow.

MCP connection layer: handles query requests and supports three transport methods—STDIO, SSE, and REST—simultaneously; it handles data sources from local, API, and internal enterprise sources, meeting the needs of different integration scenarios.
Unified search service layer: a multi-Provider architecture that fuses the hybrid search results of OceanBase, Meilisearch, API, and in-memory engines to provide the best recommendation results.
Vector engine and DB layer: based on TensorFlow and OceanBase’s HNSW high-dimensional vector index, it achieves distributed scheduled data updates and supports an in-memory fallback.
In the end, it fuses the results from each Provider—whether offline, enterprise, or community data—and reranks them at the final stage to provide users with the best results.
Data Flow
When a user poses a question, there are 4 processing steps in the system.
Step one, intent processing: first, simple NLP (Natural Language Processing) is performed on the question, extracting keywords and intent during the process, which TensorFlow.js then vectorizes. After vectorization, embedding is performed, with a dimensionality consistent with OpenAI’s embedding model, namely 1536 dimensions.
Step two, concurrent recall and fusion: multiple providers perform hybrid search concurrently, including an internally built in-memory vector database, public APIs, OceanBase (which prioritizes scalar filtering and vector filtering), and MeiliSearch; this can continue to be extended, fusing the strengths of each.
Step three, scalar & vector hybrid search: scalar filtering and vector HNSW similarity queries are executed concurrently.
Step four, fusing results: the weights of different sources can be adjusted, and the recommendation results are fused with weighting.

In the MCP Advisor architecture, OceanBase’s core role includes three aspects:
- Continued momentum in the AI ecosystem. OceanBase’s growth over the years has been there for all to see; it works closely with and quickly adapts to popular projects such as FastGPT and Camel AI, providing users and developers with a rich, diverse, and easy-to-use product ecosystem.
- Support for scalar, vector, and full-text search at the same time. It supports a variety of hybrid searches—scalar, vector, full-text, multi-modal, and more—meeting the needs of various industries and business scenarios.
- The preferred choice for internal enterprise data sources. It supports multi-modal data sources, the MySQL interface, distribution, and high availability, making it very attractive for enterprises building their own internal MCP marketplaces.
Achievements and Future Plans
In the month since the MCP Advisor service was officially released, the Glama platform alone has seen 380+ downloads (https://github.com/istarwyh/mcpadvisor). After its release, it reached the front page of mcp.so, the world’s largest marketplace, and is already hosted in the cloud, where users can try it for free or download it locally for simple configuration.
Looking ahead, we have divided MCP Advisor’s development path into the following four stages:
- Stage one, we will continue to refine the basic functionality, resolve bad cases, and meet the Agent’s diverse needs;
- Stage two, we plan to incorporate deep learning capabilities, integrating reranking and tour-related training into a single model to build a reinforcement learning model that consolidates these capabilities;
- Stage three, we will develop a task decomposition engine and a dynamic planning system, achieving adaptive MCP configuration and improving product usability;
- Stage four, we will build a community, provide a developer SDK API, and create custom MCP training tools and enterprise integration frameworks to empower enterprises’ internal Agent marketplaces.

“Lao Ji’s Tech Talk” hopes not only to keep bringing you valuable technical content, but also to contribute to the open source community together with all of you. If you appreciate the OceanBase open source community, give it a little star ✨! Every Star you give is the motivation behind our efforts.