I search through your content to help you find answers to your questions, fast.
Building agentic AI
This white paper explores how agentic AI will transform how enterprises use automation and data. Discover how Algolia’s MCP (Model Context Protocol) is unlocking a new generation of AI agents that don’t just respond, but get things done by securely connecting with real tools, APIs, and data sources.
Whether you’re a developer, data leader, or digital innovator, this guide will help you understand:
AI is no longer just about chatting, it’s about acting. We’ve all seen how tools like ChatGPT or Claude can hold conversations and answer questions. But in a business setting, especially in retail, we often need AI to do things: look up information, update data, connect with other software, and make decisions. This is where AI agents come in. An AI agent is more than a chatbot; it’s an AI system that can determine and carry out actions by itself, usually by calling on external tools or data sources to fulfill a task. In practical terms, most agentic AI systems today are built on large language models (LLMs) that have the ability to use functions or APIs, essentially letting the AI reach out and interact with other applications beyond its own model memory.
What does “agentic” really mean? It means an AI has a degree of agency. It can plan steps, use tools, and carry out tasks without needing a person to spell out every detail. According to IBM, agentic AI typically has three key traits: it can remember context (short-term and long-term memory), it can plan and make decisions step-by-step, and it can use tools via APIs when needed. In other words, an agentic AI can take your request, figure out what steps or data are needed, and then execute those steps by calling the right tools. In fact, one popular agent design pattern known as the ReAct framework (short for Reasoning and Acting) explicitly embraces this idea of interleaving thinking with doing. Introduced in 2023 by researchers like Yao et al., ReAct lets an LLM break down a problem using a chain-of-thought and then take actions (like API calls) as needed at each step. This approach blurs the line between “reasoning” and “execution,” enabling agents to handle more complex tasks autonomously than a plain chatbot could.
For example, imagine asking an AI assistant: “Find the top 10 products in our catalog that people view a lot but purchase rarely, and draft an action plan to improve conversions.” A regular chatbot might be stumped, it doesn’t have that data on hand. An AI agent, however, could actually perform this request: it might query a database or search index to get analytics, analyze the results, and then generate suggestions. All of this happens because the agent can act, not just chat. The assistant can decide, “I need to get data, then analyze it, then write a plan,” and it will carry out those steps. This shift from pure conversation to taking action marks the rise of agentic AI.
Building a robust AI agent, one that can reliably handle multi-step tasks and integrate with various systems is hard. If you’ve ever tried to hack together a chatbot that also calls your APIs, you’ve probably hit a few stumbling blocks. Some of the key challenges include:
Coordinating these steps in a coherent way is tricky. Traditionally, developers had to hand-code a lot of this logic — manage the state between steps, pass results from one tool to the next, handle errors, etc. It’s easy to end up with brittle “spaghetti” code where if one piece changes, the whole chain breaks. Moreover, ensuring a well-defined goal for the agent is crucial. If the goal is too broad or combines multiple objectives, the agent can get sidetracked or even fall into an endless loop trying to satisfy conflicting aims. Early experiments with autonomous agents like AutoGPT often saw them loop or contradict themselves when given open-ended tasks. Breaking big problems into smaller sub-tasks and giving the agent clear, concise objectives helps mitigate this.
These challenges meant that only companies with significant AI engineering expertise (and time to experiment) could build complex agent systems. Many early “agents” were brittle or limited in scope because of these hurdles.
However, the AI community has been actively addressing these issues. Various frameworks have sprung up to simplify agent development. For example, OpenAI’s function calling allows structured tool use, LangChain provides abstractions for chaining steps, LlamaIndex introduced “agent workflows” to manage multi-agent orchestration, and IBM’s Agentic RAG toolkit explores adding planning on top of retrieval systems. Each of these tackles parts of the problem like maintaining state or coordinating subtasks. Yet, one piece remained somewhat unsolved: a standardized, plug-and-play way to connect any AI to any tool.
This is where Model Context Protocol (MCP) enters the scene. Think of MCP as a kind of universal adapter for AI, a standard protocol that tells an AI how to use an external service or data source. Instead of custom code for every integration, MCP aims to provide a shared language and interface. In the next section, we’ll break down what MCP is and how it makes building agentic AI easier.
The MCP is a new standard that addresses the tool integration challenge head-on. The simplest way to understand MCP is through an analogy: “Think of MCP like a USB-C port for AI applications.” Just as USB-C gives you a standard way to connect all sorts of devices (keyboard, camera, storage) to your computer, MCP provides a standard way for AI models to connect to different data sources and tools. Instead of every AI tool needing its own custom cable, MCP defines a universal interface.
At its core, MCP is not a single piece of software, but a protocol, a set of rules and definitions for how an AI (the model) can communicate with an external resource. In practice, it usually involves two sides:
According to developers familiar with MCP, you can think of it as a universal translator between AI assistants and your everyday apps. The AI speaks a standardized format, the MCP server for a tool translates that to actual API calls, and the AI can fetch info or trigger actions in that app. Another way to understand the concept is that without MCP, an AI assistant is limited to what it saw in training (like it’s stuck with an old encyclopedia); with MCP, the AI can access live information and perform actions in your apps. It’s the difference between a static, closed-book AI and a dynamic AI that can reach out and affect the world.
How does this actually work? MCP introduces a bit of structure that both sides adhere to:
To illustrate, consider a real-world example given by an MCP proponent: You ask your AI assistant, “Summarize the emails about Project X and schedule a team meeting next week.” This seemingly simple request actually involves multiple steps and tools, reading emails and creating a calendar event. With MCP in play, here’s what happens:
All of this happens because the AI and the tools had a common protocol to work through. The AI didn’t need to know the gritty details of Gmail’s API or Outlook’s format; the MCP servers handled it. From a developer’s standpoint, you didn’t have to custom-code those integrations for the AI assistant. You just plugged in standard MCP adapters.
| Benefit | What it does | Why it matters |
|---|---|---|
| API decoupling | AI models use standardized MCP servers instead of custom code for each service | Like a device driver, once installed, any AI with an MCP client can use the tool. |
| Streamlined development | Standardizes connections across environments | No more glue code for each integration. Supports enhanced interoperability across tools. |
| Empowers end-users | Turns natural language into real actions | Shifts AI from “informational” to “actionable” gets things done, provides more than answers |
| Security and control | MCP servers act as controlled gateways, enforcing permissions and limits | Easier and safer than direct AI access. Helps create a plug-and-play ecosystem |
| Standard for interoperability | Creates a universal connector between AI and tools | Just like HTTP or USB unlocked innovation. MCP could do the same for agentic AI. |
In summary, MCP is a powerful idea: a standard connector between AI and the digital world. It’s also similar to how HTTP is a standard that allows web browsers to talk to any website, or how USB became the standard port for devices. Those standards unleashed innovation because suddenly everything could interoperate. MCP as a standard could do the same for AI agents and tools.
Now, how does this abstract concept benefit you as a developer or tech leader? Let’s ground this in a concrete example focused on a real-world use case: bringing a search and analytics platform into the agentic AI era using an MCP server.
Modern hosted search and discovery engines power search and recommendations for thousands of websites and apps. Their fast APIs and robust indexing, querying, and analytics features have long been developer favorites. With the rise of agentic AI, an easy way for AI agents to tap into those capabilities is now available: the MCP Server. It acts as an adapter that lets an AI search, retrieve analytics, and even modify search indices using natural language.
In plain terms, the MCP Server “teaches” an AI assistant how to perform various operations on your search account, as if the AI were a developer using the platform’s API.
The AI doesn’t need to know the API; it simply follows the MCP interface, a special toolbelt built for search that translates natural language into structured operations.
This isn’t happening in isolation. Algolia’s approach here aligns with a broader industry trend toward standardized tool use. Amazon Web Services, for instance, introduced Bedrock Agents to let LLMs perform multi-step tasks with external data, and they explicitly use MCP to integrate with enterprise systems. Salesforce’s new Agentforce platform similarly enables AI agents to take actions across business apps, supporting plugins via MCP with a growing library of third-party connectors. In short, many big players see the value of a universal adapter for AI. MCP is emerging as that common interface.
The AI (via MCP) can handle at least three broad categories of actions:
Normally these tasks are handled through a dashboard or by calling the API via an SDK. The MCP approach, however, is designed to let search plug into agentic workflows and AI-centric environments easily. If an LLM is orchestrating tasks, perhaps a local AI assistant or an automation, MCP brings search to wherever you are working without any custom code.
Algolia’s MCP Server is currently shared for developers to explore. It runs as a lightweight Node.js service that you can host yourself (typically locally, though you could run it on a server you control). A fully managed cloud version isn’t publicly available yet. The team is working on a hosted offering in the future but for now, developers can download it and run it. After authenticating with your credentials, you are able to connect to an AI client. Anthropic’s Claude Desktop app, for example, lets you add an MCP server as a “plugin” and immediately start asking Claude about your data. No special coding required!
Anything possible through the search API can now be done by simply telling the AI. It’s like having an assistant who has memorized the entire documentation.
Today, each MCP action typically corresponds to a single API call or operation. But what if fulfilling a user request requires a sequence of calls? This is an active area of exploration. One idea is to introduce batched or composite operations: for example, a single “setup_new_index” action that under the hood performs multiple API calls, creating an index, setting its configuration, and adding initial records. The goal would be to simplify complex sequences for the agent. The Algolia team is watching how developers use the server to see which multi-call patterns are common, and are considering offering combined actions to streamline those. An experimental concept called MCP BatchIt suggests it’s possible to bundle tasks for efficiency, essentially treating multiple agent requests as a single, optimized batch. As these ideas mature, an agent’s job could get even simpler: one high-level command might trigger a cascade of API calls handled safely by the MCP server behind the scenes.
To illustrate the benefit of MCP Server, imagine this scenario: a retail merchandiser interacting with a virtual assistant that can surface search analytics, highlight content gaps, and recommend instant fixes, all through conversation. This is the sort of workflow MCP-powered agents make possible.
Consider Emma, a merchandising lead at a retail ecommerce company. Part of Emma’s job is to watch what shoppers are searching for on their website and make sure the search results and site content meet customer needs (a combination of analytics and optimization). Today, Emma is using a new AI assistant integrated into their analytics workflow. This assistant has access to the company’s Algolia search index (via the MCP server) and other relevant tools. Here’s a possible interaction:
Emma: “Find the top 10 search queries on our site in the past month, and show me their click-through rate (CTR), conversion rate (CVR), and revenue generated.”
AI Assistant: Using Algolia’s MCP, the AI retrieves the analytics for the top 10 queries. Essentially it does what an analyst might do: fetch query frequencies and associated CTR/ CVR from Algolia’s analytics API. It then responds with a neatly formatted table:
| Query | Click-Through Rate (CTR) | Conversion Rate (CVR) | Revenue |
|---|---|---|---|
| Query A | 45% | 2% | $5,000 |
| Query B | 38% | 0.5% | $500 |
| Query C | 30% | 10% | $20,000 |
| ... | ... | ... | ... |
Emma sees one query (Query B) has a decent CTR of 38% (people click results) but a very low CVR of 0.5% (few purchases) and only $500 in revenue. This looks like an opportunity to improve. People are interested in something but not finding what they want to buy.
Emma: “Among these top queries, which ones have high CTR but low CVR? And why might that be happening?”
AI Assistant: The AI quickly filters the list (maybe “high CTR” >30% and “low CVR” <1% as criteria). It finds Query B (and maybe another). It then accesses context, possibly product data from other sources, to hypothesize reasons. It replies: “Queries ‘B’ and ‘X’ show high user interest (many clicks) but very low conversions. This could indicate mismatch in results, such as the products shown being too expensive (sticker shock), or not what users really want (relevance issues). It could also be an availability problem, maybe items are out of stock, or a poor landing experience, for example, the page is slow or confusing.”
The AI has essentially done an analyst’s job of identifying pain points. Now Emma wants to take action.
Emma: “What should we do to boost conversions for those queries?”
AI Assistant: Tapping into its general knowledge and the specific context of those queries, the AI comes up with a list of suggestions. For example:
It might even suggest using features like dynamic re-ranking or A/B testing changes to see what works
Emma likes these ideas, and now asks for something she can present to her team:
Emma: “Can you compile these findings and recommendations into a brief report I can share with the team? Make it look nice and highlight the potential impact.”
AI Assistant: The AI goes into a report-writing mode. It might use a template or just its own formatting skills. It produces a mini-report as an output (this could be a PDF, or HTML, or even a slide deck if integrated with a tool). The report is titled “Action Plan: Converting High-Intent Searches into Sales.” It includes:
For context, in similar real-world scenarios, teams have seen measurable gains from making these adjustments. For example, boosting CTR from 38% to 45% and CVR from 0.5% to 2% could translate into an additional $4,500 in monthly revenue for a high-traffic query like B. Session duration might also rise, in one case by 15–20 seconds, as shoppers engaged more with relevant products. These kinds of improvements not only drive immediate sales but also indicate healthier on-site engagement over time.
Emma now has, within 5-10 minutes of dialogue, insights and a plan that could have taken her days of analysis and meetings to produce. The AI agent, using Algolia via MCP along with its own reasoning and presentation skills, served as an analyst, consultant, and assistant all in one.
This example isn’t science fiction. It’s based on actual demos that teams have run internally. The AI quickly addressed the problem from end-to-end, gathering data, suggesting actions, and packaging a report. Importantly, the AI isn’t acting completely alone. It serves as a partner to Emma, amplifying her capabilities. Emma still applies her judgment to the AI’s suggestions. After all, AI is a helper, not a replacement for strategy.
For developers, enabling this scenario didn’t mean writing thousands of lines of integration code. They simply had to run the Algolia MCP server and hook it up to an AI that understands MCP. That’s the power of the standard protocol. Once connected, the AI “knew” how to use Algolia, including even advanced stuff like retrieving analytics or generating a graph, because those capabilities were exposed through MCP.
While the analytics and optimization use case is compelling, agentic AI can benefit many parts of a retail business and indeed, any business that uses search and data. . Here are a few other ideas where AI agents, using Algolia can shine:
In all these cases, the common theme is that the AI agent needs access to reliable data and the ability to perform specific actions in real time. A search and indexing system often holds business-critical information (such as product details, user behavior analytics, and content) and also serves as a control point for things like merchandising rules and recommendation settings. With an MCP interface, these capabilities become far more accessible to AI agents. Developers don’t need to custom code a search tool. The functionality is already exposed through the MCP server. This shortens development time and encourages experimentation, allowing teams to focus on AI logic and user experience instead of low-level API integrations
If you’re a developer excited by these possibilities, you’re probably wondering how to actually implement an agentic AI that uses Algolia. Let’s outline a basic path to get started and even dive into a bit of code.
First, you need access to an Algolia account — even a free tier account is fine. Algolia’s Build tier is free with generous limits. Get your Application ID and API Key ready. Then, get the Algolia MCP Server running. It’s available as an experimental release on GitHub. For example, you can download the latest release of the Algolia MCP Node.js server. Once downloaded:
The easiest starting point is Claude Desktop, since Anthropic built it with MCP support. In Claude Desktop’s settings, you can add the Algolia MCP server config, pointing it to the executable you just set up. After a restart, Claude will “see” the Algolia tools. From there, interacting is as simple as chatting with Claude about Algolia. If Claude is not available, don’t worry, other setups are emerging. Some agent frameworks like PydanticAI are adding MCP support, and you can always integrate manually using Python. For instance, you could run the MCP server as a subprocess and pipe data to it from an OpenAI or other LLM call. The community is rapidly building connectors. You can check the official MCP documentation for updates on supported clients.
Now that the pieces are connected, test it out with simple prompts to the AI. For example:
These direct questions help verify everything is working. You’ll notice you did not write any code to handle Algolia’s API. The AI + MCP took care of it.
If you want to incorporate this into a Python application (say you’re building a backend service or a more custom agent flow) you can still use MCP. One approach is to interface with the MCP server via standard I/O. Another is to simply replicate what the MCP does by calling Algolia’s API through an AI function. For learning purposes, let’s do a quick comparison of traditional API use vs. AI+MCP use for a task.
Traditional approach (Python SDK example): Suppose we want to find all Nike shoes under $100 in the “products” index and print their names. With Algolia’s Python API, you’d do:
from algoliasearch.search_client import SearchClient
# Initialize Algolia client and index
client = SearchClient.create('YourAppID', 'YourAdminAPIKey')
index = client.init_index('products')
# Perform a filtered search
results = index.search('', {"filters": "brand:Nike AND price<100"})
hits = results.get('hits', [])
for hit in hits[:3]:
print(hit.get('name'), "-", hit.get('price'))
This code will give you the answer, but you have to know the API and write these lines.
Agentic approach (AI with MCP): You simply instruct the AI in natural language, and under the hood it performs the equivalent calls:
User: Search my "products" index for Nike shoes under $100 and give me the first three results with name and price.
AI (thinking): Need to use Algolia search on 'products' with filter brand=Nike and price<100.
AI --- > MCP (query): { action: search, index: "products", filters: "brand:Nike AND price<100", attributesToRetrieve: ["name","price"] ... }
AI < --- MCP (response): [ {name: "Air Zoom Runner", price: 75}, {name: "Nike Flex", price: 60}, ... ]
AI (to user): "1) Air Zoom Runner - $75 2) Nike Flex - $60 3) ... "
You don’t see this JSON back-and-forth as a user, however—the agent handles it. But it’s effectively doing what the Python code did, just mediated by the AI’s reasoning. The benefit is you can now ask follow-ups or incorporate this result into larger AI-driven logic easily.
If you were coding an agent, you could still implement a function that calls Algolia and have the AI call that function. MCP’s advantage is that it’s a ready-made integration. You don’t need to write that function; it’s standardized and works for any AI that speaks MCP.
Once your first integration is working well, you can expand your agent. Maybe connect a vector database MCP server for semantic search, or add an email MCP so the agent can send you a report. The beauty is in modularity. For example, the MCP GitHub repository includes reference servers for Slack, Google Drive, GitHub, and more. Adding one is often as simple as running it and informing your agent client about it.
As you build an agentic workflow, always test it thoroughly. Check the outputs and see if the AI is making reasonable tool calls. Be sure to also view the logs, as many MCP implementations allow you to see the queries being executed, so you can debug if the AI does something unintended.
For now, these systems are new, so consider them in beta, and don't put an agent with MCP directly in charge of something critical without oversight. But do experiment in a safe environment. You’ll gain insight into how the AI thinks when using tools. For example, you might find it asks for too much data or misinterprets a field. You can then adjust the prompt or schema or even fine-tune the AI’s instructions to guide it.
Because MCP is still emerging, it's helpful to join developer communities or forums where others are experimenting with it. These spaces are great for sharing experiences, asking questions, and learning from real-world use cases. Since many implementations are still experimental, maintainers are often open to feedback and eager to hear how developers are using the framework and what improvements might be valuable. This is a unique opportunity to contribute to the evolution of how AI systems interact with tools and data.
To summarize, integrating a tool via MCP in Python or any environment is mostly about running the provided server and connecting an AI client to it. You don’t write much tool-specific code; instead, you focus on crafting good prompts and handling the AI’s output. It’s a higher-level way of programming, and it can feel strange at first - “I’m asking the computer to do the thing that I could call via API directly.” But it opens the door to a new class of applications where the AI can dynamically decide when and how to use tools based on user input, making your application more adaptive and responsive.
Building with AI agents and MCP is exciting, but it also comes with new considerations. Below is a cycle of best practices that can guide safe and thoughtful implementation. Each step reinforces the next, creating a loop of continuous learning and improvement.
By following best practices, you can make the most of agentic AI while avoiding unnecessary risks. It is still a new paradigm, so being cautious and thoughtful in design is important. Many companies are in the experimental phase with agents, and that is perfectly fine. This is the time to explore, test, and understand what works and what does not.
Agentic AI is that next step from AI just talking to actually doing, and MCP is a key enabler making it feasible at scale. If HTTP standardized how information is retrieved on the web, MCP is standardizing how AI systems perform actions and retrieve data across software. It gives AI agents a common dialect to interact with any tool or service, much like USB gave computers a common way to work with any device.
For developers and tech leaders, this means building AI-driven workflows just got easier and more powerful. Instead of reinventing the wheel for every integration, you can use MCP adapters like the Algolia MCP server to plug your AI into established platforms. Algolia’s case shows the benefit clearly:
With minimal setup, an AI agent can suddenly leverage a decade’s worth of search technology, performing complex queries and tuning search configurations, all through natural language prompts.
Why does this matter for retail (and beyond)? Because it can fundamentally improve how quickly and smartly businesses react to data. AI agents won’t replace humans, but they will augment teams: taking over tedious data-crunching, surfacing insights, and even executing routine decisions. This frees up human talent to focus on strategy, creativity, and the nuanced decisions that AI isn’t ready to make alone. Companies that embrace this augmentation can deliver better customer experiences (through personalization, faster support, more relevant offerings) and operate more efficiently internally (through automation and smarter analytics).
It’s worth noting that we are still in the early days. Experimentation is key. Some workflows will prove immensely valuable; others might turn out to be gimmicky. By trying things out like setting up an AI agent to watch your search analytics, you’ll discover where the real ROI lies for your organization. The technology is improving month by month, and what feels experimental now could be standard practice a year from now.
Algolia’s move to support agentic AI via MCP signals a clear vision for the future: search evolving from a static query-response box into an active, embedded intelligence within broader AI systems. The focus has always been on speed and relevance in search, now joined by flexibility and interconnectivity. If the possibilities outlined here spark your interest, this is a great time to get hands-on. Connect an AI agent to your Algolia index and see what emerges. Brainstorm with your team where an AI copilot could save time or unlock new capabilities. The barrier to entry is lower than ever with MCP. There’s no need to build from scratch when so many pieces are already in place.
In closing, agentic AI has the potential to redefine digital experiences much like the rise of the web did decades ago. A standard like MCP is a big step towards that future by removing friction between AI and the vast landscape of digital tools. What HTTP did for the internet, MCP could do for the AI ecosystem, creating a universal, open layer that anyone can build on. We’re excited to see what develops next.
Ready to explore further? We’re offering demos of our AI Search and MCP capabilities. It’s a chance to see it live on your data. Request a demo if you’d like to witness how an AI agent can plug into Algolia and elevate your search and discovery, or try out the Algolia MCP server yourself and start building the future of AI-driven experiences.
Request a demo of Algolia's AI Search solution.
Find out more about agentic AI, MCP server, and AI search.
Powered by Algolia AI Recommendations