CloudIndex MCP Server

January 20, 2025 ยท View on GitHub

A RAG (Retrieval Augmented Generation) platform that provides semantic search capabilities through the CloudIndex API.

Prerequisites

  1. Node.js (v16 or higher)
  2. A CloudIndex API key (obtain from cloudindex.ai)

Setup Instructions

1. Install and Build the Server

# Clone the repository
git clone [repository-url]
cd cloudindex-server

# Install dependencies
npm install

# Build the server
npm run build

2. Configure API Key

The server requires a CloudIndex API key to function. You'll configure this in the Claude Desktop settings.

3. Configure Claude Desktop

  1. Locate the Claude Desktop configuration file:

    • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
  2. Add or update the CloudIndex server configuration:

{
  "mcpServers": {
    "cloudindex": {
      "command": "node",
      "args": ["/full/path/to/cloudindex-server/build/index.js"],
      "env": {
        "CLOUDINDEX_API_KEY": "your-api-key-here"
      }
    }
  }
}

Replace:

  • /full/path/to/cloudindex-server with the actual path where you cloned the repository
  • your-api-key-here with your CloudIndex API key

4. Start Using with Claude

  1. Restart the Claude Desktop application to load the new configuration
  2. The CloudIndex server will automatically start when you open Claude
  3. You can now use semantic search capabilities by asking Claude questions about your documents

Available Tools

cloudindex

Query documents using hybrid search with semantic and keyword capabilities.

Parameters:

  • query: The search query text (required)
  • filters: Optional filters for document types, IDs, and date ranges
  • options: Optional parameters for controlling search behavior (similarity, reranking, etc.)

Example usage through Claude:

"Search my documents for information about machine learning"
"Find recent PDF documents about climate change"

Development

For development with auto-rebuild:

npm run watch

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector:

npm run inspector

The Inspector will provide a URL to access debugging tools in your browser.

Troubleshooting

  1. If Claude can't connect to the server:

    • Verify the path in claude_desktop_config.json is correct
    • Ensure the API key is properly set
    • Check Claude's error logs
  2. If searches return no results:

    • Verify your API key is valid
    • Ensure you have documents indexed in CloudIndex
    • Check the query syntax and filters