LlamaIndex Documentation

by run-llama

82 stars
Not rated
GitHub Website

About

Provides a RAG-powered query interface to LlamaIndex documentation, delivering detailed responses with code examples using LlamaCloud's managed index service

Details

Author
run-llama
Repository
run-llama/llamacloud-mcp
GitHub stars
82
License
MIT License
Categories
Cloud Service, AI, Knowledge Base, Infrastructure, Productivity, Developer Tools, Design, Workplace, File Management, Search, Frontend

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name LlamaIndex Documentation
    Command (node, npx, python, etc.) uvx
    Arguments
    • Argument 1 llamacloud-mcp@latest
    • Argument 2 --index
    • Argument 3 your-index-name:Description of your index
    • Argument 4 --index
    • Argument 5 your-other-index-name:Description of your other index
    • Argument 6 --extract-agent
    • Argument 7 extract-agent-name:Description of your extract agent
    • Argument 8 --project-name
    • Argument 9 <Your LlamaCloud Project Name>
    • Argument 10 --org-id
    • Argument 11 <Your LlamaCloud Org ID>
    • Argument 12 --api-key
    • Argument 13 <Your LlamaCloud API Key>

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

```bash
% uvx llamacloud-mcp@latest --help

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "llamaindex documentation": {
            "cwd": null,
            "env": {},
            "args": [
                "llamacloud-mcp@latest",
                "--index",
                "your-index-name:Description of your index",
                "--index",
                "your-other-index-name:Description of your other index",
                "--extract-agent",
                "extract-agent-name:Description of your extract agent",
                "--project-name",
                "<Your LlamaCloud Project Name>",
                "--org-id",
                "<Your LlamaCloud Org ID>",
                "--api-key",
                "<Your LlamaCloud API Key>"
            ],
            "shell": false,
            "command": "uvx"
        }
    }
}

Linux

{
    "cwd": null,
    "env": [],
    "args": [
        "llamacloud-mcp@latest",
        "--index",
        "your-index-name:Description of your index",
        "--index",
        "your-other-index-name:Description of your other index",
        "--extract-agent",
        "extract-agent-name:Description of your extract agent",
        "--project-name",
        "<Your LlamaCloud Project Name>",
        "--org-id",
        "<Your LlamaCloud Org ID>",
        "--api-key",
        "<Your LlamaCloud API Key>"
    ],
    "shell": false,
    "command": "uvx"
}

Macos

{
    "cwd": null,
    "env": [],
    "args": [
        "llamacloud-mcp@latest",
        "--index",
        "your-index-name:Description of your index",
        "--index",
        "your-other-index-name:Description of your other index",
        "--extract-agent",
        "extract-agent-name:Description of your extract agent",
        "--project-name",
        "<Your LlamaCloud Project Name>",
        "--org-id",
        "<Your LlamaCloud Org ID>",
        "--api-key",
        "<Your LlamaCloud API Key>"
    ],
    "shell": false,
    "command": "uvx"
}

Windows

{
    "cwd": null,
    "env": [],
    "args": [
        "/c",
        "uvx",
        "llamacloud-mcp@latest",
        "--index",
        "your-index-name:Description of your index",
        "--index",
        "your-other-index-name:Description of your other index",
        "--extract-agent",
        "extract-agent-name:Description of your extract agent",
        "--project-name",
        "<Your LlamaCloud Project Name>",
        "--org-id",
        "<Your LlamaCloud Org ID>",
        "--api-key",
        "<Your LlamaCloud API Key>"
    ],
    "shell": false,
    "command": "cmd"
}

Expose LlamaCloud services as MCP tools for building and managing LLM applications.

[!CAUTION] This repo has been archived and is no longer supported. Please seeour docsfor the latest on connecting your agents to LlamaParse Platform APIs.

llamacloud-mcpis a tool that allows you to use LlamaCloud as an MCP server. It can be used to query LlamaCloud indexes and extract data from files.

- specifying one or more indexes to use for context retrieval.
- specifying one or more extract agents to use for data extraction
- configuring project and organization ids
- configuring the transport to use for the MCP server (stdio, sse, streamable-http)
- Install
uv
- Runuvx llamacloud-mcp@latest --helpto see the available options.
- Configure your MCP client to use thellamacloud-mcpserver. You can either launch the server directly withuvx llamacloud-mcp@latestor use aclaude_desktop_config.jsonfile to connect with claude desktop.

% uvx llamacloud-mcp@latest --help Usage: llamacloud-mcp [OPTIONS] Options: --index TEXT Index definition in the format name:description. Can be used multiple times. --extract-agent TEXT Extract agent definition in the format name:description. Can be used multiple times. --project-id TEXT Project ID for LlamaCloud --org-id TEXT Organization ID for LlamaCloud --transport [stdio|sse|streamable-http] Transport to run the MCP server on. One of "stdio", "sse", "streamable-http". --api-key TEXT API key for LlamaCloud --help Show this message and exit.

- InstallClaude Desktop
- In the menu bar chooseClaude->Settings->Developer->Edit Config. This will show up a config file that you can edit in your preferred text editor.
- Create a add the following "mcpServers" to the config file, where each--indexis a new index tool that you define, and each--extract-agentis an extraction agent tool.
- You'll want your config to look something like this (make sure to replace$YOURPATHwith the path to the repository):

{ "mcpServers": { "llama_index_docs_server": { "command": "uvx", "args": [ "llamacloud-mcp@latest", "--index", "your-index-name:Description of your index", "--index", "your-other-index-name:Description of your other index", "--extract-agent", "extract-agent-name:Description of your extract agent", "--project-name", "<Your LlamaCloud Project Name>", "--org-id", "<Your LlamaCloud Org ID>", "--api-key", "<Your LlamaCloud API Key>" ] }, "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "<your directory you want filesystem tool to have access to>" ] } } }

Make sure torestart Claude Desktopafter configuring the file.

Now you're ready to query! You should see a tool icon with your server listed underneath the query box in Claude Desktop, like this:

LlamaCloud as an MCP server From Scratch

To provide a local MCP server that can be used by a client like Claude Desktop, you can usemcp-server.py. You can use this to provide a tool that will use RAG to provide Claude with up-to-the-second private information that it can use to answer questions. You can provide as many of these tools as you want.
- Get aLlamaCloudaccount
-
Create a new indexwith any data source you want. In our case we usedGoogle Driveand provided a subset of the LlamaIndex documentation as a source. You could also upload documents directly to the index if you just want to test it out.
- Get an API key from the
LlamaCloud UI
- Clone this repository
- Create a.envfile and add two environment variables:

- LLAMA_CLOUD_API_KEY- The API key you got in the previous step
- OPENAI_API_KEY- An OpenAI API key. This is used to power the RAG query. You can use
any other LLMif you don't want to use OpenAI.

Now let's look at the code. First you instantiate an MCP server:

mcp = FastMCP('llama-index-server')

Then you define your tool using the@mcp.tool()decorator:

@mcp.tool() def llama_index_documentation(query: str) -> str: """Search the llama-index documentation for the given query.""" index = LlamaCloudIndex( name="mcp-demo-2", project_name="Rando project", organization_id="e793a802-cb91-4e6a-bd49-61d0ba2ac5f9", api_key=os.getenv("LLAMA_CLOUD_API_KEY"), ) response = index.as_query_engine().query(query + " Be verbose and include code examples.") return str(response)

Here our tool is calledllama_index_documentation; it instantiates a LlamaCloud index calledmcp-demo-2and then uses it as a query engine to answer the query, including some extra instructions in the prompt. You'll get instructions on how to set up your LlamaCloud index in the next section.

if __name__ == "__main__": mcp.run(transport="stdio")

Note thestdiotransport, used for communicating to Claude Desktop.

LlamaIndex also has an MCP client integration, meaning you can turn any MCP server into a set of tools that can be used by an agent. You can see this inmcp-client.py, where we use theBasicMCPClientto connect to our local MCP server.

For simplicity of demo, we are using the same MCP server we just set up above. Ordinarily, you would not use MCP to connect LlamaCloud to a LlamaIndex agent, you would useQueryEngineTooland pass it directly to the agent.

To provide a local MCP server that can be used by an HTTP client, we need to slightly modifymcp-server.pyto use therun_sse_asyncmethod instead ofrun. You can find this inmcp-http-server.py.

mcp = FastMCP('llama-index-server',port=8000) asyncio.run(mcp.run_sse_async())
mcp_client = BasicMCPClient("http://localhost:8000/sse") mcp_tool_spec = McpToolSpec( client=mcp_client, # Optional: Filter the tools by name # allowed_tools=["tool1", "tool2"], ) tools = mcp_tool_spec.to_tool_list()
llm = OpenAI(model="gpt-4o-mini") agent = FunctionAgent( tools=tools, llm=llm, system_prompt="You are an agent that knows how to build agents in LlamaIndex.", ) async def run_agent(): response = await agent.run("How do I instantiate an agent in LlamaIndex?") print(response) if __name__ == "__main__": asyncio.run(run_agent())

You're all set! You can now use the agent to answer questions from your LlamaCloud index.

A persistent memory server for Large Language Models, designed to integrate with the Claude desktop application. It supports tiered memory, semantic search, and automatic memory management.

MCP (Model Context Protocol) server that exposes 70 tools spanning cognitive memory, working memory, sessions, agents, the L0–L3 knowledge hierarchy, orchestration tasks, and training pipelines. The server speaks stdio and is consumed by Claude Desktop, Claude Code, OpenCodex, and any MCP-aware client.

A document question-and-answer server powered by Langflow.

A server that provides a memory system for LLMs, enabling persistent conversations with various providers like OpenAI, Anthropic, and OpenRouter.

Hosted MCP memory across Claude Code, Cursor, ChatGPT and any MCP client. Community-hosted instance of the MIT-licensed MemPalace engine. EU-hosted, GDPR-compliant. Free tier with 200 memories.

User-owned memory for AI agents over remote MCP. Save, search, recall, update, and manage scoped memories across Copilot, Claude, ChatGPT, IDEs, and CLIs.

Persistent cognitive memory for Claude Code. Cloud-based semantic search, Ai-powered extraction, project scoping, and compaction recovery.

RAG Search over your content powered by Inkeep

Production-ready RAG out of the box to search and retrieve data from your own documents.

Persistent memory for AI assistants and coding agents across ChatGPT, Claude, Cursor, and other MCP-compatible tools.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.