Llamacloud Mcp 服务器
概览
什么是 MCP 服务器 LlamaCloud?
MCP 服务器 LlamaCloud 是一款强大的服务器,旨在连接到 LlamaCloud 上的托管索引。它充当各种应用程序与 LlamaCloud 基础设施之间的桥梁,实现无缝的数据管理和检索。对于希望利用 LlamaCloud 能力进行数据处理的开发者和组织来说,这款服务器特别有益。
MCP 服务器 LlamaCloud 的特点
- 无缝集成:MCP 服务器允许与现有应用程序轻松集成,使其成为开发者的多功能选择。
- 托管索引:它连接到 LlamaCloud 上的托管索引,确保数据有序且易于访问。
- 可扩展性:该服务器设计用于处理不同负载,适合小型项目和大规模应用程序。
- 开源:作为一个公共代码库,开发者可以参与其开发并根据需求进行定制。
- 社区支持:随着用户和贡献者社区的不断壮大,支持和资源随时可用。
如何使用 MCP 服务器 LlamaCloud
- 安装:首先从 GitHub 克隆代码库。您可以使用以下命令:
git clone https://github.com/run-llama/mcp-server-llamacloud.git
- 配置:克隆后,导航到目录并根据您的需求配置服务器设置。
- 运行服务器:使用提供的脚本启动服务器。确保所有依赖项已安装。
- 连接到 LlamaCloud:按照文档将您的应用程序连接到 LlamaCloud 上的托管索引。
- 监控和维护:定期监控服务器性能,并根据需要进行更新,以确保最佳运行状态。
常见问题解答
MCP 服务器 LlamaCloud 支持哪些编程语言?
MCP 服务器主要使用在服务器端开发中常用的语言构建,如 Python 和 JavaScript。
使用 MCP 服务器 LlamaCloud 是否需要费用?
不需要,MCP 服务器是开源的,免费使用。然而,用户可能会产生与他们使用的 LlamaCloud 服务相关的费用。
我如何为 MCP 服务器 LlamaCloud 项目做贡献?
您可以通过分叉代码库、进行更改并提交拉取请求来贡献。社区鼓励贡献和协作。
我在哪里可以找到 MCP 服务器 LlamaCloud 的文档?
文档通常在代码库本身中提供,通常在 README.md
文件或专门的 docs
文件夹中。
我可以将 MCP 服务器 LlamaCloud 用于商业目的吗?
可以,因为它是根据 MIT 许可证开源的,您可以将其用于个人和商业项目。
详情
LlamaCloud MCP Server
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.
<a href="https://glama.ai/mcp/servers/o4fcj7x2cg"><img width="380" height="200" src="https://glama.ai/mcp/servers/o4fcj7x2cg/badge" alt="LlamaCloud Server MCP server" /></a>
Features
Tools
- Creates a separate tool for each index you define
- Each tool provides a
query
parameter to search its specific index - Auto-generates tool names like
get_information_index_name
based on index names
Installation
To 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:
- On MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- On Windows:
%APPDATA%/Claude/claude_desktop_config.json
Tool Definition Format
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.
Development
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
.
Debugging
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.
Server配置
{
"mcpServers": {
"mcp-server-llamacloud": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--run-llama--mcp-server-llamacloud--mcp-server-llamacloud",
"node ./build/index.js"
],
"env": {
"LLAMA_CLOUD_PROJECT_NAME": "llama-cloud-project-name",
"LLAMA_CLOUD_API_KEY": "llama-cloud-api-key"
}
}
}
}