LlamaCloud RAG MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@LlamaCloud RAG MCP ServerSummarize the main points from the quarterly report."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
๐ฆ LlamaCloud RAG MCP Server
Professional Model Context Protocol (MCP) server for Retrieval-Augmented Generation using LlamaCloud API. Built with TypeScript following industry best practices from the Cursor MCP Integration Guide 2025.
Transform your Cursor IDE into an AI powerhouse! Connect any LlamaCloud document index and get intelligent answers with sources directly in your development workflow.
โจ Features
๐ Professional TypeScript Implementation: Type-safe, compiled, production-ready
๐ฆ LlamaCloud Integration: Direct API connection to cloud-hosted document indices
๐ ๏ธ Three Powerful Tools: Query, search, and inspect your knowledge base
๐ MCP Protocol Compliant: Full compatibility with Cursor IDE
โก Performance Optimized: Efficient API calls and response handling
๐ Secure: Environment-based API key management
๐ฆ Easy Installation: Automated setup script included
Related MCP server: LlamaIndex Documentation MCP Server
๐ฏ Quick Start
Option 1: Automated Installation (Recommended)
# Clone the repository
git clone https://github.com/uiqkos/llamacloud-rag-mcp.git
cd llamacloud-rag-mcp
# Run the interactive installer
chmod +x install.sh
./install.shThe installer will:
โ Check Node.js version
๐ฆ Install dependencies
๐ง Build the project
๐ Setup your API key + Organization ID + Pipeline ID
๐ Configure Cursor MCP
๐งช Test the connection
Option 2: Manual Installation
# 1. Clone and setup
git clone https://github.com/uiqkos/llamacloud-rag-mcp.git
cd llamacloud-rag-mcp
npm install
npm run build
# 2. Get your LlamaCloud API key
# Visit: https://cloud.llamaindex.ai/
# 3. Configure Cursor
# Add to ~/.cursor/mcp.json or .cursor/mcp.json:
{
"mcpServers": {
"llamacloud-rag": {
"command": "node",
"args": ["/absolute/path/to/llamacloud-rag-mcp/dist/index.js"],
"env": {
"LLAMA_CLOUD_API_KEY": "your-api-key-here",
"LLAMA_CLOUD_ORGANIZATION_ID": "your-organization-id",
"LLAMA_CLOUD_PIPELINE_ID": "your-pipeline-id"
}
}
}
}
# 4. Restart Cursor IDE๐ง Prerequisites
Node.js 18.0+ and npm
LlamaCloud API Key (get it here)
LlamaCloud Organization ID
LlamaCloud Pipeline ID (or a full Pipeline URL)
Cursor IDE with MCP support
๐ Available Tools
๐ query_rag
Ask questions about your documents and get comprehensive answers with sources.
Input:
question(string, 1-1000 chars): Your question about the documents
Output:
๐ Detailed answer based on retrieved content
๐ List of source documents with relevance scores
๐ Preview text from each source
Example:
Question: "What is database normalization?"
Answer: Based on the found documents, database normalization is...
Sources:
1. Database Design Principles (relevance: 0.95)
2. SQL Fundamentals (relevance: 0.87)๐ search_documents
Search for relevant documents without generating an answer.
Input:
query(string, 1-500 chars): Search querytop_k(number, 1-10, default 5): Number of results
Output:
๐ List of matching documents
๐ Content previews and metadata
๐ Relevance scores
โน๏ธ get_index_info
Get detailed information about your LlamaCloud index.
Input: None
Output:
๐ Index name, project, organization details
โ Current status and configuration
๐ Pipeline URL and last update time
๐งช Testing Your Setup
# Test with npm scripts
npm run test
# Manual testing
npm run test:init # Test initialization
npm run test:tools # Test tool listing
# Test with your API key
LLAMA_CLOUD_API_KEY="your-key" LLAMA_CLOUD_ORGANIZATION_ID="your-org-id" LLAMA_CLOUD_PIPELINE_ID="your-pipeline-id" npm run test๐ Project Structure
llamacloud-rag-mcp/
โโโ ๐ src/
โ โโโ ๐ index.ts # Main MCP server implementation
โโโ ๐ dist/ # Compiled JavaScript (auto-generated)
โโโ ๐ package.json # Node.js configuration
โโโ ๐ tsconfig.json # TypeScript configuration
โโโ ๐ install.sh # Automated installer
โโโ ๐ cursor-mcp-config.example.json # Configuration example
โโโ ๐ config.example # LlamaCloud config template
โโโ ๐ LICENSE # MIT license
โโโ ๐ README.md # This file๐ Security & Best Practices
โ API Key Protection: Never commit keys to version control
โ Environment Variables: Secure configuration management
โ Type Safety: Full TypeScript implementation
โ Error Handling: Comprehensive error catching and reporting
โ Input Validation: Secure parameter validation
โ No Data Logging: Your queries stay private
๐จ Customization
Using Your Own LlamaCloud Index
Create your index in LlamaCloud
Set the required environment variables in your Cursor MCP config:
LLAMA_CLOUD_API_KEY=...
LLAMA_CLOUD_ORGANIZATION_ID=...
LLAMA_CLOUD_PIPELINE_ID=...
# or set LLAMA_CLOUD_PIPELINE_URL=... instead of PIPELINE_IDRebuild:
npm run build
Custom Tools
Extend the server by adding new tools in src/index.ts. Follow the existing patterns for type safety and error handling.
๐ Troubleshooting
Tools not showing in Cursor?
โ Check env vars: Ensure
LLAMA_CLOUD_API_KEY,LLAMA_CLOUD_ORGANIZATION_ID, andLLAMA_CLOUD_PIPELINE_ID(orLLAMA_CLOUD_PIPELINE_URL) are set correctly๐ Restart Cursor: Fully quit and restart Cursor IDE
๐ Check paths: Ensure absolute paths in MCP configuration
๐ Check logs: Look at Cursor developer console for errors
๐งช Test manually: Run
npm run testto verify server works
Common Issues
"Module not found": Run npm run build first
"Missing required environment variables": Set LLAMA_CLOUD_API_KEY, LLAMA_CLOUD_ORGANIZATION_ID, and LLAMA_CLOUD_PIPELINE_ID (or LLAMA_CLOUD_PIPELINE_URL)
"Connection failed": Check your LlamaCloud API key and internet connection
"Tools not listed": Verify Cursor MCP configuration syntax
Getting Help
๐ Check the MCP Documentation
๐ฌ Open an issue
๐ Review Cursor logs in developer console
๐ค Contributing
Contributions are welcome! Please read our contributing guidelines and open an issue or pull request.
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureCommit your changes:
git commit -m 'Add amazing feature'Push to the branch:
git push origin feature/amazing-featureOpen a pull request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
LlamaIndex for the amazing RAG platform
Cursor IDE for MCP integration
Cursor MCP Integration Guide 2025 for best practices
Made with โค๏ธ for the developer community
Star โญ this repository if it helped you!
Available Tools
3 toolsget_index_infoA
Get detailed information about the LlamaCloud index and its current status
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It does not explicitly state that the operation is read-only, mention any authentication requirements, or describe what happens during the call. This lack of transparency is a significant gap for a tool that provides detailed information.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise at one sentence with the verb and resource front-loaded. It is efficient but could add more value without being overly verbose, such as mentioning the purpose or output format.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of two siblings, the simple description may not provide enough context for an agent to distinguish when to use this tool. It does not describe the return values (no output schema) or any prerequisites, which is insufficient for a tool with no parameters and no annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the baseline for this dimension is 4. The description does not need to add parameter information since there are none, and the schema coverage is 100% by definition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get', the resource 'LlamaCloud index', and specifies the scope 'detailed information and its current status'. It effectively distinguishes from siblings 'query_rag' and 'search_documents' which focus on different operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for retrieving index information and status but does not provide explicit guidance on when to use it versus siblings, nor does it mention when not to use it. Alternatives are not named, leaving the agent to infer based on tool names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_ragB
Query the database documents in LlamaCloud and get comprehensive answers with sources
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | Question about database concepts, management systems, or related topics |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It states that the tool returns answers with sources, but does not disclose whether it is read-only, required permissions, or any rate limits. The behavioral information is minimal.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the key action and result. No extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and no output schema, the description provides the core purpose but lacks details on output format, error handling, or pagination. It is adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already describes the 'question' parameter. The tool description adds no additional semantic context for parameters, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool queries database documents in LlamaCloud to get comprehensive answers with sources, differentiating it from sibling tools like search_documents which likely return raw search results.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like get_index_info or search_documents. It does not state when not to use it or any prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_documentsA
Search for relevant documents in the knowledge base without generating an answer
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query for semantic document retrieval | |
| top_k | No | Number of documents to return (1-10) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully carries the transparency burden. It accurately describes the core behavior (search, no answer) but omits details like return format, pagination, or any side effects. This is adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single efficient sentence that front-loads the key verbs and resource, with zero extraneous words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, no output schema), the description is adequate but lacks any mention of return structure or error behavior, which would be helpful for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the schema already documents both parameters. The description adds no new semantic detail for the parameters themselves, meeting the baseline for full schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'search' and the resource 'documents in the knowledge base', and explicitly distinguishes this tool from answer generation, making its purpose unmistakable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly notes that the tool does not generate an answer, implying it should be used when only document retrieval is needed. Sibling tools (query_rag for answers, get_index_info for index info) provide clear alternatives, though no explicit 'when not to use' statement is given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
get_index_info - First observed
query_rag - First observed
search_documents
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: get_index_info retrieves index metadata, query_rag answers with sources, and search_documents finds documents without generating an answer. No overlap in functionality.
All tool names follow a consistent verb_noun snake_case pattern (get_index_info, query_rag, search_documents). The naming is predictable and intuitive.
With 3 tools, the surface is well-scoped for a RAG server: one for index status, one for querying, and one for searching. Neither too few nor too many.
The tools cover the core RAG workflow (index info, query, search). A minor gap is absence of document management or index modification, but that may be out of scope for a read-only RAG server.
Maintenance
Related MCP Connectors
Connect Claude, Cursor, or ChatGPT to your business data. Ask questions, get answers.
Ingest, manage, and retrieve documents for RAG-powered AI applications
Parse, extract, split, and ask over digital PDFs (text layer, no OCR) from Cursor and Claude.
Search and reason over your Obsidian-style Markdown vault, right from ChatGPT.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceImplements a RAG workflow that integrates with any custom knowledge base and can be triggered directly from the Cursor IDE.-
- FlicenseNot gradedqualityDmaintenanceEnables searching and fetching LlamaIndex documentation for integration with VS Code Copilot and other MCP clients.1-
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to index and semantically search through PDFs, code, and documents with exact citations and zero hallucinations.MIT
- FlicenseNot gradedqualityCmaintenanceProvides web search and local document RAG using Ollama, enabling privacy-preserving AI assistance in Cursor IDE.-