Agents: View this page as Markdown
Set up with your coding agent
Your coding agent can do the whole setup: sign you up, create a collection, load your documents and add search to your app. You add one MCP server to your tool and approve one email, without copying a key or visiting the console first.
#1. Add the MCP server
WarpSearch's MCP server is https://api.warpsearch.io/mcp (streamable HTTP). Add it without any credentials; the agent gets a key in step 2.
Run in your terminal:
claude mcp add --transport http warpsearch https://api.warpsearch.io/mcp
Check it with claude mcp list, or /mcp inside a session.
Run in your terminal:
codex mcp add warpsearch --url https://api.warpsearch.io/mcp
Check it with codex mcp list.
Run in your terminal:
gemini mcp add --transport http warpsearch https://api.warpsearch.io/mcp
Check it with gemini mcp list, or /mcp inside a session.
Add this to .vscode/mcp.json in your project:
{
"servers": {
"warpsearch": {
"type": "http",
"url": "https://api.warpsearch.io/mcp"
}
}
}
Start the server from the file, then use GitHub Copilot Chat in Agent mode.
Any other tool that supports remote (streamable HTTP) MCP servers works the same way: point it at the URL. The console Overview shows these commands with a copy button.
#2. Ask for access and approve it
Start your tool and describe what you want, for example:
Set up WarpSearch search for the help-center articles in ./content
Without a key, the server offers the agent only two tools, which sign you up. The agent asks which email address to register (it does not use your account's address without asking), sends the request, and shows you a short code.

WarpSearch emails that address. The email names the agent that asked and repeats the code.
- Check that the code in the email is the one your agent showed. If it is not, stop.
- Choose Create account and approve. A new address creates the account first, so you confirm the email and choose a password.
- Choose the organization and the role the agent gets, then approve.
viewercan search,writercan also load data,editorcan also create collections and change schemas, andadmincan also delete collections. To create the collection the agent needs at leasteditor; you can lower the role it asked for.

Tell the agent you have approved. It collects an API key for that role (shown to it only once), reconnects with it and gets the search and indexing tools. The request expires after 60 minutes, and each address can receive at most 3 sign-up emails an hour.
#3. Create a collection
A collection holds your documents and their schema. The agent reads a sample of your data and creates one with create_collection. Ask it to show you the schema first if you want to review it:
Look at the articles in ./content and propose a WarpSearch collection for them.
Show me the fields before you create it.
What the agent decides, and what to check:
| Choice | What to check |
|---|---|
| Name | Lowercase letters, digits, _ and -, starting with a letter: help_center, not Help.Center. |
| Class | knowledge for RAG chunks and embeddings, search (the default) for site, catalog and app search, stream for logs and events. See Collection classes. |
| Fields | text for anything people search by words (titles, bodies), string for exact values you filter or facet on (category, language, status), numbers and dates for ranges and sorting, and vector with dims and metric for embeddings. A schema is optional: fields named with a type suffix such as title_t or category_s are typed by their name. See Schemas and field types. |
A typical schema for help-center articles, passed as the schema argument of create_collection:
{
"fields": {
"title": {"parent": "_t"},
"body": {"parent": "_t"},
"category": "string",
"updated_at": "date",
"embedding": {"type": "vector", "dims": 1024, "metric": "cosine"}
}
}
The same fields as an Elasticsearch mapping, for a collection created through PUT /compat/es/{index} with an Elasticsearch client:
{
"properties": {
"title": {"type": "text"},
"body": {"type": "text"},
"category": {"type": "keyword"},
"updated_at": {"type": "date"},
"embedding": {"type": "dense_vector", "dims": 1024, "similarity": "cosine"}
}
}
You can add fields later, but a change that would break documents already stored (a new type, different vector dimensions, a different analyzer) is refused with 409 incompatible_schema, so settle the types before a large load. Creating collections needs the editor role, and your plan sets how many you can have.
#4. Load your documents
The agent turns your data into flat JSON documents, each with an id, and indexes them:
Index every article into help_center. Use the file path as the id,
and compute embeddings with the model our app already uses.
How it goes about it:
- A small sample, such as a few hundred documents for a first try, goes straight through the
index_documentstool. - A full load works better as a script the agent writes against the REST API (
POST /v1/collections/{c}/documents, JSON or NDJSON), so your documents do not pass through the agent's context. Ask it to read the key from an environment variable such asWARPSEARCH_API_KEY. If you already have an ingestion pipeline, ask it to add WarpSearch as a destination there instead. - It sends documents in batches, commits on the last batch only, reads each response and retries just the documents that failed. A
413means a batch is over your plan's limit, and the agent splits it. - For arrays of objects whose fields must match together, the agent declares a nested field and queries it with Query DSL. Flattening loses same-child relationships. Posting an existing
idreplaces the whole document. - WarpSearch does not compute embeddings. The agent calls your embedding model and sends the vectors, with exactly the
dimsthe collection declares.
See Ingesting documents for the options and the error codes.
#5. Search and wire it into your app
Once the documents are committed, the agent can query them with the search and count tools. They mirror POST /v1/search/{c}: a query in the language the agent knows best (SQL, Elasticsearch Query DSL, Solr or Lucene), plus filters, facets, sort and limit.
Run the 20 most common questions from our support tickets against help_center
and show me the top 3 results for each. Then add a /search endpoint to our app.
What to expect:
- The agent runs real questions, checks hit counts, and adjusts fields, filters or the schema where results are wrong.
translate_queryshows how WarpSearch runs any query. - For RAG it combines a keyword query with a
knnsection on the embedding field (with"language": "es"), so exact terms like error codes and part numbers still match. See Hybrid search. - For a search results page it adds
highlightto the samesearchcall to get snippets with the matching words marked. With"language": "text"and"summary": true, each snippet also says which of the user's words the hit matched (match_level,matched_words). See Highlighting. - Your app calls
POST /v1/search/{c}from your backend with a key kept in configuration, not in code. Give your app aviewerkey of its own (create one under API keys in the console) rather than reusing the agent's. If your app already uses an Elasticsearch, OpenSearch or Solr client, it can keep it and change only the endpoint; see Moving from Elasticsearch, OpenSearch or Solr.
See Searching for the request and response.
#Keep control
- You decide the scope. Ask for only the schema, only a sample load, or only the app wiring, and the agent stops there.
- The key belongs to the organization and role you approved. Delete it any time under API keys in the console.
- Ask the agent to keep the key out of code, logs and commits.
- When you approve, you choose when the agent's key expires: never (the default), after a set time or on a date, or after one hour without use.
- If you refuse the request, the agent is told it was denied and does not ask again unless you tell it to.
#Where to go next
- Quickstart: the same steps by hand, with the API.
- Guide for AI agents: what your agent reads, including every MCP tool.
- Vector search and Hybrid search, the building blocks of RAG.
- Facets and aggregations, for filters and counts in your search UI.