4,500+ servers built on MCP Fusion
Vinkius
Directus logo
Vinkius
LlamaIndex logo

How to Use the Directus MCP in LlamaIndex

Feed your LlamaIndex vector store with live database records and metadata directly from your Directus collections.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Directus MCP on Cursor AI Code Editor MCP Client Directus MCP on Claude Desktop App MCP Integration Directus MCP on OpenAI Agents SDK MCP Compatible Directus MCP on Visual Studio Code MCP Extension Client Directus MCP on GitHub Copilot AI Agent MCP Integration Directus MCP on Google Gemini AI MCP Integration Directus MCP on Lovable AI Development MCP Client Directus MCP on Mistral AI Agents MCP Compatible Directus MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
LlamaIndex

Connect Directus MCP to LlamaIndex

Create your Vinkius account to connect Directus 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.

GDPR Free for Subscribers

Index database records into LlamaIndex

Your pipeline calls `list_items` and `get_item` to pull fresh SQL data directly into your document indexing pipeline. This lets you build a dynamic knowledge base where your agent references actual database entries instead of relying on stale static files. The engine parses the JSON output and converts it into indexable nodes automatically. By using this MCP Server, your retrieval-augmented generation stays grounded in real-time inventory or content tables. You don't have to manage complex ETL pipelines just to keep your vectors fresh.

Search files and assets in LlamaIndex

The indexer uses `list_files` and `get_file` over the MCP Server to locate and extract metadata from your uploaded assets. This means your agent can match user queries against file descriptions and storage paths stored in your CMS. If a user asks for a specific document, the tool resolves the exact URL using the file record. This bridges the gap between structured database content and physical assets in your storage buckets.

Map collection structures for semantic routing

Your agent uses this MCP connection to run `list_collections` and `list_fields` to understand what tables are available before running a query. This prevents your RAG pipeline from searching nonexistent fields or collections when trying to resolve user intent. The model reads these schemas to decide which collection contains the answers it needs. This dynamic routing makes your search indices much smarter than static keyword matching.

Setup guide

Set up Directus MCP in LlamaIndex

Prerequisites

  • Python 3.10+ installed
  • llama-index-tools-mcp package
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run pip install llama-index-tools-mcp llama-index-llms-openai. The MCP tools package provides BasicMCPClient and McpToolSpec.

  2. 2

    Connect with BasicMCPClient

    Point BasicMCPClient to your Vinkius endpoint URL. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com. Supports SSE and Streamable HTTP transports.

  3. 3

    Convert to LlamaIndex tools

    Call mcp_tool_spec.to_tool_list_async() to convert all Directus MCP tools into native FunctionTool objects that any LlamaIndex agent can use.

  4. 4

    Run with any LLM

    Create a FunctionAgent with the tools and your preferred LLM. Swap OpenAI for Anthropic, Gemini, or any LlamaIndex-supported provider.

agent.py
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 Directus tools.",
)
response = await agent.run("List recent Directus data")

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Directus. 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 Directus MCP in LlamaIndex

You load the MCP tools into your agent and call `list_items` to fetch the raw records. The framework then converts these records into document nodes for your vector store. This keeps your search index updated with your actual database content.
Yes, your agent can write back to your database using `update_item` or `create_item`. This is useful for saving session logs or marking items as processed. The model handles these writes natively during query execution.
The agent queries `list_fields` at the start of a session to discover any new database columns. This means your index pipelines adapt automatically when you add fields in the CMS. You don't need to redeploy your code for basic schema updates.
You should use pagination parameters to limit the payload size. The tool supports standard filtering so you only fetch records modified since your last index run. This keeps your vector database syncs fast and cheap.
All database items, user profiles, and file metadata are fetched directly over a secured local connection. The MCP Server never caches your credentials or exposes your raw database ports to the public internet. Your data moves directly from your instance to your local pipeline.

Start using the Directus MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 16 tools

We've already built the connector for Directus. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 16 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.