mcp-server-llamacloud
by: run-llama
A MCP server connecting to managed indexes on LlamaCloud
📌Overview
Purpose: To provide a TypeScript-based MCP server for connecting multiple tools to managed indexes on LlamaCloud.
Overview: The LlamaCloud MCP Server serves as a gateway to various managed indexes, allowing users to interact with specific data through defined tools. Each tool represents a unique index, facilitating targeted queries and data retrieval.
Key Features:
-
Tool Creation: Generates a dedicated tool for each defined index, enabling focused querying of that index's data.
-
Query Support: Each tool includes a
query
parameter for executing searches within its specific index. -
Auto-naming Convention: Automatically generates intuitive tool names based on the corresponding index names for easier identification and usage.
LlamaCloud MCP Server
Overview
LlamaCloud MCP Server connects to multiple managed indexes on LlamaCloud. It is a TypeScript-based server that allows you to create tools for each index, defined via command-line arguments.
Features
- Creates a tool for each defined index.
- Each tool includes a
query
parameter for searching specific indexes. - Auto-generates tool names based on index names.
Installation
To configure your MCP Client (e.g., Claude Desktop, Windsurf, or Cursor), add the following configuration:
{
"mcpServers": {
"llamacloud": {
"command": "npx",
"args": [
"-y",
"@llamaindex/mcp-server-llamacloud",
"--index",
"10k-SEC-Tesla",
"--description",
"10k SEC documents from 2023 for Tesla",
"--index",
"10k-SEC-Apple",
"--description",
"10k SEC documents from 2023 for Apple"
],
"env": {
"LLAMA_CLOUD_PROJECT_NAME": "<YOUR_PROJECT_NAME>",
"LLAMA_CLOUD_API_KEY": "<YOUR_API_KEY>"
}
}
}
}
Tool Definition Format
In the args
array of the MCP config, define multiple tools using pairs of --index
and --description
arguments. For example:
--index "10k-SEC-Tesla" --description "10k SEC documents from 2023 for Tesla"
Development
Install Dependencies
npm install
Build the Server
npm run build
Auto-Rebuild for Development
npm run watch
To use the development version, update your MCP config from npx @llamaindex/mcp-server-llamacloud
to node ./build/index.js
.
Debugging
Debugging can be challenging since MCP servers communicate over stdio. We recommend using the MCP Inspector:
npm run inspector
The Inspector will provide a URL to access debugging tools in your browser.