Llamacloud Mcp 伺服器
概覽
什麼是 MCP Server LlamaCloud?
MCP Server LlamaCloud 是一個強大的伺服器,旨在連接到 LlamaCloud 上的管理索引。它作為各種應用程序與 LlamaCloud 基礎設施之間的橋樑,使數據管理和檢索變得無縫。這個伺服器對於希望利用 LlamaCloud 功能來滿足數據處理需求的開發者和組織特別有利。
MCP Server LlamaCloud 的特點
- 無縫集成:MCP Server 允許與現有應用程序輕鬆集成,成為開發者的多功能選擇。
- 管理索引:它連接到 LlamaCloud 上的管理索引,確保數據組織良好且易於訪問。
- 可擴展性:該伺服器設計用於處理不同的負載,適合小型項目和大型應用程序。
- 開源:作為公共存儲庫,開發者可以參與其開發並根據需求進行自定義。
- 社區支持:隨著用戶和貢獻者社區的增長,支持和資源隨時可用。
如何使用 MCP Server LlamaCloud
- 安裝:首先從 GitHub 克隆存儲庫。您可以使用以下命令:
git clone https://github.com/run-llama/mcp-server-llamacloud.git
- 配置:克隆後,導航到目錄並根據您的需求配置伺服器設置。
- 運行伺服器:使用提供的腳本啟動伺服器。確保所有依賴項已安裝。
- 連接到 LlamaCloud:按照文檔將您的應用程序連接到 LlamaCloud 上的管理索引。
- 監控和維護:定期監控伺服器性能,並根據需要進行更新,以確保最佳運行。
常見問題解答
MCP Server LlamaCloud 支持哪些編程語言?
MCP Server 主要使用在伺服器端開發中常用的語言構建,如 Python 和 JavaScript。
使用 MCP Server LlamaCloud 是否需要費用?
不需要,MCP Server 是開源且免費使用的。然而,用戶可能會產生與他們使用的 LlamaCloud 服務相關的費用。
我如何能為 MCP Server LlamaCloud 項目做出貢獻?
您可以通過分叉存儲庫、進行更改並提交拉取請求來貢獻。社區鼓勵貢獻和合作。
我在哪裡可以找到 MCP Server LlamaCloud 的文檔?
文檔通常在存儲庫本身中提供,通常在 README.md
文件或專門的 docs
文件夾中。
我可以將 MCP Server 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.
伺服器配置
{
"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"
}
}
}
}