LlamaIndex Documentation MCP server

Provides a RAG-powered query interface to LlamaIndex documentation, delivering detailed responses with code examples using LlamaCloud's managed index service
Back to servers
Setup instructions
Provider
LlamaIndex
Release date
Mar 28, 2025
Language
Python
Stats
193 stars

The LlamaCloud MCP server provides a seamless way to use LlamaCloud's powerful indexing and data extraction capabilities through the Model Context Protocol (MCP) standard. This tool connects AI models like Claude to your private data for context-aware responses.

Installation

To get started with the LlamaCloud MCP server:

  1. First, install the UV package manager:
# Install UV following instructions at https://docs.astral.sh/uv/getting-started/installation/
  1. Once UV is installed, you can run the LlamaCloud MCP server directly using the uvx command:
uvx llamacloud-mcp@latest --help

Basic Usage

The LlamaCloud MCP server can be configured with various options to connect to your indexes and extraction agents:

uvx llamacloud-mcp@latest \
  --index "your-index-name:Description of your index" \
  --extract-agent "extract-agent-name:Description of your extract agent" \
  --project-id "your-project-id" \
  --org-id "your-organization-id" \
  --transport "stdio" \
  --api-key "your-llamacloud-api-key"

Command Line Options

  • --index: Define an index in the format name:description (can be used multiple times)
  • --extract-agent: Define an extraction agent in the format name:description (can be used multiple times)
  • --project-id: Your LlamaCloud Project ID
  • --org-id: Your LlamaCloud Organization ID
  • --transport: Transport method for the MCP server (options: stdio, sse, streamable-http)
  • --api-key: Your LlamaCloud API key

Setting Up with Claude Desktop

To use the LlamaCloud MCP server with Claude Desktop:

  1. Install Claude Desktop from https://claude.ai/download

  2. Open Claude Desktop settings:

    • Go to the menu bar
    • Choose ClaudeSettingsDeveloperEdit Config
  3. Configure the MCP servers in your config file:

{
    "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>"
            ]
        }
    }
}
  1. Restart Claude Desktop after saving the configuration

  2. You should now see the tool icon with your server listed underneath the query box in Claude Desktop

Creating a LlamaCloud Index

Before using the MCP server, you'll need to set up a LlamaCloud index:

  1. Create a LlamaCloud account at https://cloud.llamaindex.ai/

  2. Create a new index through the LlamaCloud UI by following their documentation at https://docs.cloud.llamaindex.ai/llamacloud/guides/ui

  3. Connect data sources like Google Drive or upload documents directly

  4. Generate an API key from the LlamaCloud UI

Once your index is set up, you can connect it to the MCP server using the configuration options shown above.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "llama_index_docs_server" '{"command":"poetry","args":["--directory","$YOURPATH/llamacloud-mcp","run","python","$YOURPATH/llamacloud-mcp/mcp-server.py"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "llama_index_docs_server": {
            "command": "poetry",
            "args": [
                "--directory",
                "$YOURPATH/llamacloud-mcp",
                "run",
                "python",
                "$YOURPATH/llamacloud-mcp/mcp-server.py"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "llama_index_docs_server": {
            "command": "poetry",
            "args": [
                "--directory",
                "$YOURPATH/llamacloud-mcp",
                "run",
                "python",
                "$YOURPATH/llamacloud-mcp/mcp-server.py"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later