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.
To get started with the LlamaCloud MCP server:
# Install UV following instructions at https://docs.astral.sh/uv/getting-started/installation/
uvx
command:uvx llamacloud-mcp@latest --help
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"
--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 keyTo use the LlamaCloud MCP server with Claude Desktop:
Install Claude Desktop from https://claude.ai/download
Open Claude Desktop settings:
Claude
→ Settings
→ Developer
→ Edit Config
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>"
]
}
}
}
Restart Claude Desktop after saving the configuration
You should now see the tool icon with your server listed underneath the query box in Claude Desktop
Before using the MCP server, you'll need to set up a LlamaCloud index:
Create a LlamaCloud account at https://cloud.llamaindex.ai/
Create a new index through the LlamaCloud UI by following their documentation at https://docs.cloud.llamaindex.ai/llamacloud/guides/ui
Connect data sources like Google Drive or upload documents directly
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.
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.
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.
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"
]
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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