← All integrations

Data & Storage · Integration

Embed an Elasticsearch integration in your product

Add Elasticsearch to your product for your customers, and give your AI agents governed access to it.

An Elasticsearch integration lets your product search a customer's own cluster rather than a copy you maintain. You write documents into indices, describe them with a mapping, shape how text is broken up with analyzers, then read with the Query DSL and aggregations. Mappings are the catch. A field's type is fixed once an index exists, so changing it means building a new index and reindexing behind an alias instead of altering anything in place. Search is also near real time rather than immediate: a document just written may not match until the index refreshes, which surprises anyone expecting read after write. fastn stores each cluster endpoint and API key per customer, and monitors the connector, proposing a fix for your team to approve when Elasticsearch changes its API.

In your product

Embedded for your customers. Per-tenant auth, customized per customer, monitored by fastn.

  • Let a customer point your product at their own cluster so the documents you index stay in infrastructure they run.
  • Search with the Query DSL and summarize with aggregations, so counts come back computed rather than fetched.
  • Move a mapping change through a new index and an alias swap, since a field type cannot be altered in place.
  • Treat the refresh delay as expected, so a freshly written document that does not match yet is not raised as a bug.

For your AI agents

Governed, audited access for the agents you build, through the MCP server.

  • An agent runs a permitted query against one customer's indices, and the indices it read are recorded.
  • An agent inspects a mapping before composing a query, so it filters on fields that are actually searchable.
  • An agent indexes or deletes documents within scoped permissions, so stale content stops being returned.

Example prompt

Search this index for documents matching the phrase and give me a count grouped by their status field.

Set up Elasticsearch in 4 steps

  1. 01Enable the Elasticsearch connector from your fastn dashboard.
  2. 02Have each customer authorize their own Elasticsearch account, so calls run under their credentials rather than a shared key.
  3. 03Decide which indices, mappings and documents your product needs, then confirm the field types you query, since a mapping is fixed at index creation.
  4. 04Call it from your product and expose it to your agents through the same governed connection.

Elasticsearch connector reference: actions, triggers and auth

Why teams use the Elasticsearch integration

  • Ship an Elasticsearch integration without building it. Your customers connect their own Elasticsearch account inside your product and work their records, datasets and fields there, and nothing lands on your team.
  • Handle the part that actually costs time: schemas differ per customer and change without notice, and volumes can be large. fastn handles the auth, token refresh, rate limits and pagination, and when Elasticsearch changes, its maintainer agent proposes a tested fix, so an Elasticsearch update does not start in your backlog.

Used by these teams

Elasticsearch integration FAQ

Can AI agents use this Elasticsearch integration?

Yes, through the fastn MCP gateway, scoped per customer and audited. An agent runs a permitted query against one customer's indices, and the indices it read are recorded. For example: "Search this index for documents matching the phrase and give me a count grouped by their status field."

Does the Elasticsearch integration adapt when a customer's schema changes?

Schema and field mapping is configuration per customer, so a change on their side is a mapping update rather than a code change and a release on yours.

How are large Elasticsearch reads handled?

Pagination and throttling are handled for you, and initial backfills are rate-limited so a large import does not exhaust a customer's API allowance.

What can I build with the Elasticsearch integration?

A common starting point: let a customer point your product at their own cluster so the documents you index stay in infrastructure they run. The use cases above list the rest.

Add Elasticsearch to your product

Start free with 3 customer connections. No sales call required, and no per-customer integration code.