LlamaIndex MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with LlamaIndex MCP or direct API to upload documents, parse content, build indexes, and search files through natural language.

LlamaIndex MCP logoLlamaIndex MCP
Dcr Oauth

LlamaIndex MCP connects agents to LlamaCloud's document and indexing tools. It provides a managed way to parse, classify, index, and search business files.

27 Tools

Try LlamaIndex MCP now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
LlamaIndex MCP
Try asking
TOOLS

Supported Tools

Every LlamaIndex MCP action and event your agent gets out of the box.

Add files to directory

Add already-uploaded files to a directory, so they can be indexed.

Classify file

Classify a file (based on specific categories) providing its file ID.

Create directory

Create a directory (folder) to hold source documents.

Create extraction config from schema

Create an extraction configuration from a JSON Schema you already have, and return its configuration id for use with `extractFile`.

Create index

Create an index over a directory, making its documents searchable with retrieveFromIndex and the other index tools.

Create project api key

Create a LlamaCloud API key scoped to one project, for handing to an application or a teammate.

Estimate file complexity

Estimate the parsing complexity of a PDF file (providing its file ID) using LiteParse.

Extract file

Extract structured data from a file based on the configuration created with the `generateExtractionConfig` tool.

Extract file turbo

Extract structured data from a file in real time using the Turbo tier: one call, schema supplied inline, structured JSON back in seconds — no saved configuration step.

Find files in index

Search files within an index.

Generate extraction config

Generate the configuration to extract structured data from a specific file using the Extract service from the LlamaParse Platform.

Get index status

Check whether an index has finished building.

Get schema template

Retrieve the full JSON Schema for one starter extraction template, by id, as returned by `searchSchemaTemplates`.

Get upload url

Get a pre-signed URL to upload a file to the LlamaParse S3 storage.

Get user projects

List the projects available to the user, with their names, so you can pass the right projectId to other tools.

Grep file from index

Grep the content of a file from an index, providing its file ID, the pattern to grep for and, optionally, a number of context characters and a maximum number of grep matches to retrieve.

List directories

List the directories in a project.

List directory

List the files inside a directory, along with the directory itself.

List indexes

List all the available indexes on the LlamaParse Platform.

Parse file

Parse a file providing its file ID, retrieving markdown or plain text content of the file.

Parse with lite parse

Parse a PDF file with LiteParse, a fast, in-process parser that does not consume credits from the LlamaParse Platform.

Read file from index

Read the content of a file from an index, providing its file ID and, optionally, an offset and a maximum length (in characters) to read.

Retrieve from index

Perform hybrid search on the index, providing a query and, optionally, the top K documents to retrieve and the top N documents to rerank.

Search schema templates

Search the built-in library of starter extraction schemas (invoice, contract, resume, 10-K, patient intake and more) by keyword or category.

Split file

Split a file into category-based segments providing its file ID.

Sync index

Re-index a directory, picking up files added or changed since the last run.

Upload file by url

Upload a file to LLamaParse S3 storage providing a URL to download the file data.

SETUP GUIDE

Connect LlamaIndex MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["llamaindex_mcp"],
  mcp: true,
});
Create a session scoped to LlamaIndex MCP and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Parse the uploaded product manuals, extract their specifications into structured data, and make the results searchable in LlamaCloud.",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a LlamaIndex MCP request
SETUP GUIDE

Connect LlamaIndex MCP API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["llamaindex_mcp"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to LlamaIndex MCP
3

Run LlamaIndex MCP tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Parse the uploaded product manuals, extract their specifications into structured data, and make the results searchable in LlamaCloud." }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the LlamaIndex MCP tool calls through the session, and print the final answer

Why Use Composio?

AI Native LlamaIndex MCP Integration

  • Supports both LlamaIndex MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable document and index operations
  • Rich coverage for uploading, parsing, classifying, splitting, extracting, and searching files

Managed Auth

  • Supports DCR OAuth flows for connecting LlamaCloud accounts securely
  • Central place to manage, scope, and revoke LlamaIndex MCP access
  • Per user and per environment credentials instead of hard-coded secrets

Agent Optimized Design

  • Tools are tuned for reliable document parsing, indexing, and retrieval workflows
  • Clear schemas help agents choose the right LlamaCloud operation for each request
  • Comprehensive execution logs show what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access LlamaIndex MCP
  • Scoped, least privilege access to LlamaCloud documents and indexes
  • Full audit trail of agent actions to support review and compliance
FRAMEWORKS

Use LlamaIndex MCP with any AI Agent Framework

Choose a Framework you want to connect LlamaIndex MCP with

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with LlamaIndex MCP.It takes 30 seconds.

Managed auth, hosted MCP servers, and every LlamaIndex MCP tool your agent needs.Free to start.

Start building