by run-llama
A MCP server connecting to managed indexes on LlamaCloud, enabling AI-powered search and information retrieval from various data sources.
mcp-server-llamacloud is a TypeScript-based MCP (Model Context Protocol) server that facilitates connecting to managed indexes on LlamaCloud. It allows users to create multiple tools, each linked to a specific LlamaCloud managed index, enabling AI-powered search and information retrieval from diverse data sources.
To use mcp-server-llamacloud, you need to add its configuration to your MCP client (e.g., Claude Desktop, Windsurf, or Cursor). This involves defining the mcpServers
entry in your client's configuration file, specifying the command to run the server and providing arguments to define the LlamaCloud indexes you want to connect to. You'll also need to set your LLAMA_CLOUD_API_KEY
as an environment variable.
{
"mcpServers": {
"llamacloud": {
"command": "npx",
"args": [
"-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>"
}
}
}
}
query
parameter to search its specific index.get_information_index_name
based on the index names.topK
parameter to limit the number of search results.Q: What is LlamaCloud? A: LlamaCloud is a platform that provides managed indexes for storing and querying data, often used in conjunction with AI and language models for information retrieval.
Q: How do I define multiple tools?
A: In the args
array of your MCP config, you can define multiple tools by providing pairs of --index
and --description
arguments. You can also optionally specify --topK
for each tool.
Q: Where can I find the MCP config for Claude Desktop?
A: On MacOS, it's typically at ~/Library/Application Support/Claude/claude_desktop_config.json
. On Windows, it's at %APPDATA%/Claude/claude_desktop_config.json
.
Q: How can I debug the mcp-server-llamacloud?
A: You can use the MCP Inspector by running npm run inspector
after installing the development dependencies. The Inspector provides a URL to access debugging tools in your browser.
A MCP server connecting to multiple managed indexes on LlamaCloud
This is a TypeScript-based MCP server that creates multiple tools, each connected to a specific managed index on LlamaCloud. Each tool is defined through command-line arguments.
query
parameter to search its specific indexget_information_index_name
based on index namesTo use with your MCP Client (e.g. Claude Desktop, Windsurf or Cursor), add the following config to your MCP client config:
The LLAMA_CLOUD_PROJECT_NAME
environment variable is optional and defaults to Default
if not set.
{
"mcpServers": {
"llamacloud": {
"command": "npx",
"args": [
"-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>"
}
}
}
}
For Claude, the MCP config can be found at:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
In the args
array of the MCP config, you can define multiple tools by providing pairs of --index
and --description
arguments. Each pair defines a new tool. You can also optionally specify --topK
to limit the number of results.
For example:
--index "10k-SEC-Tesla" --description "10k SEC documents from 2023 for Tesla" --topK 5
Adds a tool for the 10k-SEC-Tesla
LlamaCloud index to the MCP server. In this example, it's configured to return the top 5 results.
Install dependencies:
npm install
Build the server:
npm run build
For development with auto-rebuild:
npm run watch
To use the development version, replace in your MCP config npx @llamaindex/mcp-server-llamacloud
with node ./build/index.js
.
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.
Reviews feature coming soon
Stay tuned for community discussions and feedback