Skip to content

MCP server for interacting with Algolia

License

Notifications You must be signed in to change notification settings

algolia/mcp-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

74 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ” Algolia Node.js MCP

Connect Claude Desktop to your Algolia data using the Model Context Protocol (MCP)

Quick Start โ€ข Features โ€ข Usage Examples โ€ข Installation โ€ข Configuration โ€ข Development โ€ข Troubleshooting โ€ข Contributing โ€ข License

algolia-mcp-demo.mp4

โœจ Quick Start

  1. Download the latest release from our GitHub Releases
  2. Authenticate with your Algolia account
  3. Connect to Claude Desktop
  4. Start asking questions about your Algolia data!

Note

For step-by-step instructions, follow the installation guide and configuration for Claude Desktop.

๐Ÿš€ Features

Algolia Node.js MCP enables natural language interactions with your Algolia data through Claude Desktop. This implementation allows you to:

  • Search and manipulate indices with natural language
  • Analyze search metrics and performance
  • Monitor application status and incidents
  • Visualize your data with AI-generated charts and graphs
  • Integrate seamlessly with Claude Desktop through the Model Context Protocol

๐Ÿ”ฎ Usage Examples

Here are some example prompts to get you started:

Account Management

"What is the email address associated with my Algolia account?"

Applications

"List all my Algolia apps."
"List all the indices are in my 'e-commerce' application and format them into a table sorted by entries."
"Show me the configuration for my 'products' index."

Search & Indexing

"Search my 'products' index for Nike shoes under $100."
"Add the top 10 programming books to my 'library' index using their ISBNs as objectIDs."
"How many records do I have in my 'customers' index?"

Analytics & Insights

"What's the no-results rate for my 'products' index in the DE region? Generate a graph using React and Recharts."
"Show me the top 10 searches with no results in the DE region from last week."

Monitoring & Performance

"Are there any ongoing incidents at Algolia?"
"What's the current latency for my 'e-commerce' index?"
"Show me a visualization of my daily account usage for the past month."

Tip

Try providing your specific application and index in your initial prompt to avoid unnecessary back and forth.

๐Ÿ“ฆ Installation

macOS

  1. Download the latest release from GitHub Releases
  2. Extract the .zip file
  3. From your terminal, remove quarantine flag to allow execution:
    xattr -r -d com.apple.quarantine <path_to_executable>

    Note: This step is necessary as the executable is not signed with an Apple Developer account. If you prefer, you can build from source instead.

  4. Run the authentication command:
    <path_to_executable> authenticate
    This will open your browser to authenticate with the Algolia Dashboard.

Windows & Linux

Coming soon.

โš™๏ธ Configuration

Claude Desktop Setup

  1. Open Claude Desktop settings
  2. Add the following to your configuration:
    {
      "mcpServers": {
        "algolia-mcp": {
          "command": "<path_to_executable>"
        }
      }
    }
  3. Restart Claude Desktop

Tip

You can refer to the official documentation for Claude Desktop.

CLI Options

Available Commands

Usage: algolia-mcp [options] [command]

Options:
  -h, --help              display help for command

Commands:
  start-server [options]  Starts the Algolia MCP server
  authenticate            Authenticate with Algolia
  logout                  Remove all stored credentials
  list-tools              List all available tools
  help [command]          display help for command

Server Options

Usage: algolia-mcp start-server [options]

Starts the Algolia MCP server

Options:
  -o, --allow-tools <tools>  Comma separated list of tool ids (default:
                             ["listIndices","getSettings","searchSingleIndex","getTopSearches","getTopHits","getNoResultsRate"])
  -h, --help                 display help for command

๐Ÿ›  Development

Requirements

  • Node.js 22 or higher
  • npm

Setup Development Environment

  1. Clone the repository:

    git clone https://github.com/algolia/mcp-node
    cd mcp-node
    npm install
  2. Configure Claude Desktop for development:

    {
      "mcpServers": {
        "algolia-mcp": {
          "command": "<PATH_TO_BIN>/node",
          "args": [
            "--experimental-strip-types",
            "--no-warnings=ExperimentalWarning",
            "<PATH_TO_PROJECT>/src/app.ts"
          ]
        }
      }
    }

Note: You'll need to restart Claude Desktop after making code changes.

Build

npm run build -- --outfile dist/algolia-mcp

Testing and Debugging

Use the MCP Inspector for testing and debugging:

  1. Run the debug script:

    cd mcp-node
    npm run debug
  2. Open http://127.0.0.1:6274/ in your browser

  3. Click Connect to start the server

  4. Send test requests through the inspector interface

๐Ÿ”ง Troubleshooting

Common Issues

  • "App not responding" error: Ensure you've removed the quarantine attribute on macOS
  • Authentication failures: Try logging out and authenticating again
  • Claude can't access tools: Verify your MCP configuration in Claude Desktop settings

Logs and Diagnostics

Log files are stored in:

  • macOS: ~/Library/Logs/algolia-mcp/
  • Windows: %APPDATA%\algolia-mcp\logs\
  • Linux: ~/.config/algolia-mcp/logs/

๐Ÿ‘ฅ Contributing

We welcome contributions to Algolia Node.js MCP! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a pull request

License

Algolia Node.js MCP is MIT licensed.


Made with โค๏ธ by Algolia