Algolia

Lightweight, dependency-free, in-memory fake of the Algolia Search & Indexing API for testing search integrations. Implements a real substring/token search over indexed objects so queries return genuine matching hits. Zero runtime dependencies (Node builtins only); state is in-memory and ephemeral.

Default port: 4884

Quick start

import { AlgoliaServer } from "./services/algolia/src/server.js";

const server = new AlgoliaServer(4884);
await server.start();
// ... run your app/tests ...
await server.stop();

Authenticate with the Algolia headers (any non-empty key + app id accepted):

curl -H "X-Algolia-API-Key: parlel" -H "X-Algolia-Application-Id: PARLELAPP" \
     -H "Content-Type: application/json" \
     -d '{"query":"shoes"}' \
     http://127.0.0.1:4884/1/indexes/products/query

Access via MCP / preview URL

The service is registered in the parlel pool and reachable through the parlel MCP server and its generated preview URL. Set ALGOLIA_APP_ID=parlel, ALGOLIA_API_KEY=parlel, ALGOLIA_BASE_URL=http://127.0.0.1:4884, then index objects and run queries. The MCP server proxies the endpoints below so an agent can build and search an index without a real Algolia account.

Implemented operations

All /1/* routes require X-Algolia-API-Key and X-Algolia-Application-Id headers (any non-empty values accepted; 403 otherwise).

Service & inspection operations (parlel extensions)

Surface coverage

This emulator faithfully replicates the API surface most application code and agents exercise. Anything below the supported lines is either an intentional design choice for a fast, zero-cost local emulator (✓ By design) or a candidate for a future release (⟳ Roadmap) — never a silent inaccuracy.

Legend: ✅ fully supported · ◐ accepted (stored, not strictly enforced) · ✓ by design · ⟳ on the roadmap.

FeatureStatus
Add / get / put / delete object✅ Supported
Delete index (DELETE /1/indexes/:indexName)✅ Supported
Batch operations (addObject, updateObject, partialUpdateObject, partialUpdateObjectNoCreate, deleteObject, delete, clear)✅ Supported
Real substring/token search with AND semantics + pagination✅ Supported
Search envelope (hits, nbHits, page, nbPages, hitsPerPage, query, params, processingTimeMS, exhaustiveNbHits)✅ Supported
_highlightResult on search hits✅ Supported
Error envelope ({ message }) matching Algolia format✅ Supported
Typo tolerance / synonyms / stemming / prefix ranking◐ Substring/token match only
Faceting / filters / numeric filters / geo search⟳ Roadmap
Custom ranking / searchable attributes config / settings⟳ Roadmap
multipleQueries / browse / clear endpoints⟳ Roadmap
API key / app id validity & ACL enforcement✓ By design — Intentional for a local, zero-cost test emulator

Error codes & shapes

All error responses match the real Algolia error envelope: { message: string }. No status field is included in the error body (matching the real API's ErrorBase schema).

StatusWhen
400Invalid JSON body, body/URL objectID mismatch
403Missing or invalid X-Algolia-API-Key / X-Algolia-Application-Id
404Unknown route, non-existent object, non-existent index

Manifest

See services/algolia/manifest.json:

<!-- parlel:testenv:start -->

Configuration — test.env

Copy these into your test.env (used by the bridge sidecar flow). Tokens are Parlel's seeded test credentials — any non-empty value is accepted by the emulator, so you rarely need to change them. Swap in real credentials only when pointing at the live service in prod.env.

ALGOLIA_APP_ID=parlel
ALGOLIA_API_KEY=parlel
ALGOLIA_BASE_URL=http://parlel-bridge:4884
<!-- parlel:testenv:end -->