Get the FREE Ultimate OpenClaw Setup Guide →

mcp -llamacloud

A MCP server connecting to managed indexes on LlamaCloud

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio run-llama-mcp-server-llamacloud npx -y @llamaindex/mcp-server-llamacloud --index 10k-SEC-Tesla --description 10k SEC documents from 2023 for Tesla --topK 5 --index 10k-SEC-Apple --description 10k SEC documents from 2023 for Apple \
  --env LLAMA_CLOUD_API_KEY="<YOUR_API_KEY>"

How to use

This MCP server spins up multiple tools, each connected to a specific managed index on LlamaCloud. In this configuration, the server creates two tools, one for the 10k-SEC-Tesla index and one for the 10k-SEC-Apple index. Each tool exposes a query parameter that lets you search within its corresponding LlamaCloud index. Tools are auto-named based on the index names (e.g., get_information_10k_SEC_Tesla and get_information_10k_SEC_Apple in practice), making it easy to choose the right tool for your data. To use the server, point your MCP client at the server process, and select the tool that matches the index you want to query. The server handles querying the specific index and returning relevant results as part of the MCP response.

How to install

Prerequisites:

  • Node.js (recommended LTS) and npm installed on your machine
  • Access to install npm packages from the public registry

Step 1: Install dependencies

  • npm install

Step 2: Build the server (production-ready bundle)

  • npm run build

Step 3: Run the server (development mode)

  • npm run watch

Step 4: Run the server with MCP (alternative development approach)

  • npx @llamaindex/mcp-server-llamacloud --help

Step 5: If you want to run directly without a build step, you can use the development command shown in the README, replacing in your MCP config as needed:

  • Replace in your MCP config: npx @llamaindex/mcp-server-llamacloud

Notes:

  • Ensure your environment variable LLAMA_CLOUD_API_KEY is set with a valid API key for LlamaCloud.
  • The LLAMA_CLOUD_PROJECT_NAME environment variable is optional and defaults to Default if not set.
  • See the Debugging section in the README for using the MCP Inspector during development.

Additional notes

Tips and considerations:

  • The server creates a separate tool for each index you define via repeated --index and --description pairs. You can add more tools by adding more --index/--description pairs in the MCP config and adjusting --topK as needed.
  • If you encounter issues with debugging, use the MCP Inspector (npm run inspector) to obtain a debugging URL.
  • The environment variable LLAMA_CLOUD_API_KEY is required for accessing LlamaCloud indexes; keep it secure and do not commit it to public config files.
  • If you rely on a specific project context, you can set LLAMA_CLOUD_PROJECT_NAME to reflect that context; otherwise, it defaults to Default.

Related MCP Servers

Sponsor this space

Reach thousands of developers