How to Use the Afosto MCP in LlamaIndex
Ground your LlamaIndex RAG pipelines with live Afosto catalog, order, and inventory data.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Afosto MCP to LlamaIndex
Create your Vinkius account to connect Afosto to LlamaIndex and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Build search indexes from real-time store catalogs
The `list_products` tool extracts your live product catalog, complete with active variants and pricing. LlamaIndex takes this raw data and indexes it directly into your vector store. Your agent then answers user queries using actual, current store listings instead of outdated static files. This method prevents hallucinations about product availability or pricing. Your RAG setup queries the vector index first to find matching items. If the user asks for specifics, the agent pulls fresh details live from the server.
Ground customer support queries in real-time order data
The `list_orders` tool retrieves recent multi-channel orders to provide instant context for user queries. LlamaIndex indexes these order records so your support bot can search past transactions semantically. When a customer asks about a delivery, the agent finds the exact order in seconds. You configure this by wrapping the client in `McpToolSpec` and passing it to a `FunctionAgent`. The agent decides when to query the live API and when to search the vector index. This keeps your support responses grounded in factual transaction records.
Run RAG-driven stock checks using this MCP Server
The `list_inventory` tool provides real-time stock levels aggregated across all your warehouse locations. LlamaIndex uses this data to update its knowledge base dynamically during customer conversations. Your agent will never recommend an out-of-stock item because it checks the indexed warehouse numbers first. To set this up, install `llama-index-tools-mcp` and initialize the basic client. You can filter the tools using the `allowed_tools` list to only expose inventory checks to specific agents. This keeps your pipeline fast and secure.
Set up Afosto MCP in LlamaIndex
Prerequisites
- Python 3.10+ installed
-
llama-index-tools-mcppackage - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
pip install llama-index-tools-mcp llama-index-llms-openai. The MCP tools package providesBasicMCPClientandMcpToolSpec. - 2
Connect with BasicMCPClient
Point
BasicMCPClientto your Vinkius endpoint URL. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. Supports SSE and Streamable HTTP transports. - 3
Convert to LlamaIndex tools
Call
mcp_tool_spec.to_tool_list_async()to convert all Afosto MCP tools into nativeFunctionToolobjects that any LlamaIndex agent can use. - 4
Run with any LLM
Create a
FunctionAgentwith the tools and your preferred LLM. SwapOpenAIforAnthropic,Gemini, or any LlamaIndex-supported provider.
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI
# Connect to the MCP
mcp_client = BasicMCPClient(
"https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
)
mcp_tool_spec = McpToolSpec(client=mcp_client)
# Convert MCP tools to LlamaIndex tools
tools = await mcp_tool_spec.to_tool_list_async()
# Create and run the agent
agent = FunctionAgent(
tools=tools,
llm=OpenAI(model="gpt-4o"),
system_prompt="You have access to Afosto tools.",
)
response = await agent.run("List recent Afosto data") Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Afosto. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Afosto MCP in LlamaIndex
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Afosto MCP today
We host it, we monitor it, we maintain it. You just paste one token.