home / mcp / algolia mcp server

Algolia MCP Server

MCP servers for interacting with Algolia

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "algolia-mcp": {
      "command": "/path/to/the/repo/cmd/mcp/mcp",
      "args": [],
      "env": {
        "MCP_SSE_PORT": "8080",
        "ALGOLIA_APP_ID": "<APP_ID>",
        "ALGOLIA_API_KEY": "<API_KEY>",
        "MCP_SERVER_TYPE": "stdio",
        "ALGOLIA_INDEX_NAME": "<INDEX_NAME>",
        "ALGOLIA_WRITE_API_KEY": "<ADMIN_API_KEY>"
      }
    }
  }
}

You can run an MCP server that exposes Algolia-like capabilities to local clients. This server runs a small process locally and communicates with your tooling through predefined MCP endpoints, enabling you to test, debug, and experiment with Algolia interactions in a controlled environment.

How to use

Use the Algolia MCP server by starting the local process and pointing your MCP client at it. You configure the client to run the MCP server binary with the appropriate environment variables that identify your Algolia account, index, and API keys. Once the server is running, you can enable or disable specific tool capabilities (such as search, analytics, or collections) to control what actions your client can perform.

To begin, ensure your environment supplies the necessary credentials and options. Start the server as a stdio MCP process, then reconnect your MCP client to the running instance. Restart or reload your client configuration so that the new server appears as an available tool provider. You can selectively enable tools by listing their names, or leave them all enabled for full functionality.

How to install

# Prerequisites
# - Go is installed on your system
# - A working shell/terminal

# Clone the repository that contains the MCP server
$ git clone [email protected]:algolia/mcp.git
$ cd mcp/cmd/mcp

# Build the MCP server binary
$ go build

# Determine the full path to the built binary
$ pwd
/path/to/the/repo/cmd/mcp

# The command to run the MCP server from a client configuration
# when you reference the built binary, use the full path
/path/to/the/repo/cmd/mcp/mcp

Configuration and usage notes

Create a configuration that defines the MCP server connected to Algolia. Place the setup in your client’s settings or a config file that your MCP host reads. The configuration below shows the required structure, including environment variables for authentication and optional tool control.

{
  "mcpServers": {
    "algolia": {
      "command": "/path/to/the/repo/cmd/mcp/mcp",
      "env": {
        "ALGOLIA_APP_ID": "<APP_ID>",
        "ALGOLIA_INDEX_NAME": "<INDEX_NAME>",
        "ALGOLIA_API_KEY": "<API_KEY>",
        "ALGOLIA_WRITE_API_KEY": "<ADMIN_API_KEY>",  /* if you want to allow write operations, use your ADMIN key here */
        "MCP_ENABLED_TOOLS": "",  /* optional: specify which tools to enable (e.g., \"search,collections\") */
        "MCP_SERVER_TYPE": "stdio",  /* optional: server type, either \"stdio\" (default) or \"sse\". If not set, defaults to \"stdio\" */
        "MCP_SSE_PORT": "8080"  /* optional: port for SSE server, default is 8080 (only used when MCP_SERVER_TYPE is \"sse\") */
      }
    }
  }
}

By default, all available tools are enabled when MCP_ENABLED_TOOLS is empty or not set. If you want to enable only specific tools, set this variable to a comma-separated list of tool names. Available tools are: abtesting, analytics, collections, monitoring, querysuggestions, recommend, search, search_read, search_write, usage. After configuring, restart your client so the Algolia server appears as an available tool provider.

Debugging and testing

You can run the Inspector to verify MCP features and exercise commands manually. Set up the environment variables, navigate to the server directory, rebuild if needed, and run the inspector against the MCP binary. This helps validate that the MCP endpoints are reachable and behaving as expected.

Using with Ollama

You can run a local MCP host that orchestrates MCP servers, then use them with local models via Ollama. Copy the configuration for your setup and save it to a sensible location, such as ~/mcp.json, so you can reference it from the command line. The configuration follows the same structure as above, pointing to the same MCP server binary and environment variables.

{
  "mcpServers": {
    "algolia": {
      "command": "/path/to/the/repo/cmd/mcp/mcp",
      "env": {
        "ALGOLIA_APP_ID": "<APP_ID>",
        "ALGOLIA_INDEX_NAME": "<INDEX_NAME>",
        "ALGOLIA_API_KEY": "<API_KEY>",
        "MCP_ENABLED_TOOLS": "",  /* optional: specify which tools to enable (e.g., \"search,collections\") */
        "MCP_SERVER_TYPE": "stdio",  /* optional: server type, either \"stdio\" (default) or \"sse\". If not set, defaults to \"stdio\" */
        "MCP_SSE_PORT": "8080"  /* optional: port for SSE server, default is 8080 (only used when MCP_SERVER_TYPE is \"sse\") */
      }
    }
  }
}

You can run the local MCP host with a command that references your config and then direct your model interactions through Ollama to exercise the MCP endpoints locally.

Available tools

abtesting

A/B testing capabilities for evaluating different configurations or prompts.

analytics

Tracking usage and performance metrics for insights and optimization.

collections

Management and grouping of related objects or data collections.

monitoring

Observability features to monitor MCP activity and health.

querysuggestions

Suggests queries or prompts based on context to assist users.

recommend

Recommendation-style endpoints to propose items or actions.

search

Perform full range of search operations including read and write.

search_read

Read-only operations for listing, getting, and querying.

search_write

Write operations for modifying indices and objects.

usage

Usage tracking and quota related endpoints.