Skip to main content
DevEx MCP is a remote MCP server for coding agents. It returns Algolia API client snippets that match the client version installed in your project, so the agent uses methods and parameters that exist in that release. You connect it once, then ask the agent to add Algolia to your app. The agent fetches the snippet for each operation it needs, such as setting up the client, saving records, or searching an index, and adapts it to your code, your index name, and your credentials. Each snippet arrives with the matching import and client initialization, so the agent has everything it needs to write a working call. Under the hood, DevEx MCP exposes two tools. The agent calls algolia_snippets_list_operations to find the operation for a task, then calls algolia_snippets_get_snippet with the language and client version to fetch the code. Snippets cover all Algolia APIs, including Search, Analytics, Recommend, Insights, and Ingestion, in every API client language. DevEx MCP doesn’t require you to sign in, and it doesn’t access data in your Algolia applications. To search or analyze your indices from an AI assistant, pick a server in the MCP overview. The examples on this page use JavaScript API client v5, Python API client v4, and Go API client v4. If your project pins another version, name it in the prompt so the agent fetches the matching snippet.

Before you begin

To use DevEx MCP, make sure you have:
  • An Algolia account with an Application ID and API keys.
  • A coding agent that supports remote MCP, such as Claude Code, Cursor, VS Code, Gemini CLI, ChatGPT, or Claude.
  • A project where you want to add search, indexing, or both.

Connect from your MCP client

Add DevEx MCP as a remote HTTP server. You don’t sign in, and you don’t need an OAuth client ID or secret.
For more about connecting AI assistants to Algolia, see Build with AI agents.

Add Algolia to your app

Connect DevEx MCP, then tell the agent the language, the client version, and where credentials live. If you skip the version, agents often use initIndex, which the JavaScript API client removed in v5.
Prompt
Once connected, you can also ask for a single operation. Name the language and the client version:
  • “Show how to save records with the JavaScript API client v5.”
  • “Get a Python v4 snippet for searching an index with filters.”
  • “Return a Go v4 snippet for setSettings with searchable attributes and custom ranking.”
  • “Create a search-only API key with the C# API client.”
Replace placeholder values such as indexName with your index name, and swap demo records for your schema.

Store credentials

Create an environment file for local development. Use a Write API key for indexing and settings. Use a Search API key in the browser or any other client you don’t control.
.env.local
Don’t commit .env.local, paste API keys into the prompt, or ship a Write API key or Admin API key in frontend code.

Initialize the API client

For example: “Initialize the Algolia API client in this language, matching the installed version.”
For Python, SearchClientSync is the synchronous client. In an asynchronous context, use SearchClient instead. It exposes the same methods, awaited. For a search-only JavaScript bundle, import liteClient from algoliasearch/lite and alias it as algoliasearch. The lite client can search, but it can’t index records or change settings.
JavaScript

Update index settings

For example: “Set searchable attributes, facets, and custom ranking on INDEX_NAME with setSettings.” Update settings before the first saveObjects call. Changing searchable attributes later reindexes existing records.
For the full settings object, see Update index settings.

Save records

For example: “Save these product records to INDEX_NAME with saveObjects and wait for the task.” saveObjects batches writes for you. Pass waitForTasks: true so you don’t search before indexing finishes.
Every record needs an objectID. Reuse the same objectID to update a record in place. For bulk imports, keep saveObjects instead of writing your own batch loop, unless you need a custom batch size. See Save records.

Search an index

For example: “Search INDEX_NAME for trail shoes that are in stock, using searchSingleIndex.” Use a client initialized with ALGOLIA_SEARCH_API_KEY for this call.
filters only works on attributes listed in attributesForFaceting. If a filter doesn’t return any hits, check that setting first. For one request across several indices, use search instead of searchSingleIndex.

Restrict API keys

For example: “Create a search-only API key restricted to INDEX_NAME.” Creating keys requires an Admin API key. Run this on a server.
To scope a key per user without another Algolia API call, generate a secured API key on your server from a Search API key. For example: “Generate a secured API key that can only query INDEX_NAME and expires in one hour.”
JavaScript
Don’t use an Admin API key as the parent.

Other Algolia tools

DevEx MCP writes API client calls. It doesn’t generate InstantSearch widgets, and it doesn’t query analytics on your account.

Guidelines

  • Name the version. Point the agent at package.json, pyproject.toml, go.mod, or the lock file.
  • Treat snippets as starting code. OpenAPI samples often use placeholder names and demo records. Replace them with yours.
  • Keep write operations on the server. Search API keys belong in the frontend. Write and Admin API keys don’t.
  • Wait for indexing tasks. Don’t search records you just saved until the task finishes.
  • Read the diff. If a method doesn’t exist on the installed client, reject it and ask the agent to fetch the snippet again.

See also

Last modified on September 18, 2026