The Searchcraft MCP Server provides a suite of tools for managing your Searchcraft cluster's Documents, Indexes, Federations, Access Keys, and Analytics. It enables MCP Clients, like Claude Desktop, to be prompted in plain English to perform administrative actions like setting up search indexes, access keys, ingesting documents, viewing analytics, searching indexes, and more.
Building an app in 2 minutes with Searchcraft MCP Server (video link)
<div align="center"> <a href="https://youtu.be/Vs_98sUrFqA?si=m9aH-tvUAAFwQQVy" title="Watch the video"> <img src="https://img.youtube.com/vi/Vs_98sUrFqA/hqdefault.jpg" alt="Building an app in 2 minutes with Searchcraft MCP Server"> </a> </div>Sample Prompts
Here is a sample prompt that could be used once Claude is connected to the Searchcraft MCP Server.
I'd like to create a product search application using the create_vite_app tool.
Please use this JSON dataset https://dummyjson.com/products
First use the Searchcraft create_index_from_json tool to create the index and add the documents.
Then create an API read key for the vite app using the create_key tool.
App details:
- App name: "my-ecommerce-app"
- Endpoint: http://localhost:8000
- Index name: my-ecommerce-appAvailable Tools
The Searchcraft MCP Server currently provides three categories of tools, import tools, engine api tools, and app generation tools:
Engine API Tools
These tools provide direct access to your Searchcraft cluster's core functionality for managing indexes, documents, federations, authentication, and search operations.
Index Management
| Tool Name | Description |
|---|---|
| create_index | Create a new index with the specified schema. This will empty the index if it already exists. |
| delete_index | Delete an index and all its documents permanently. |
| get_all_index_stats | Get document counts and statistics for all indexes. |
| get_index_schema | Get the schema definition for a specific index. |
| get_index_stats | Get statistics and metadata for a specific index (document count, etc.). |
| list_all_indexes | Get a list of all indexes in the Searchcraft instance. |
| patch_index | Make partial configuration changes to an index schema (search_fields, weight_multipliers, etc.). |
| update_index | Replace the entire contents of an existing index with a new schema definition. |
Document Management
| Tool Name | Description |
|---|---|
| add_documents | Add one or multiple documents to an index. Documents should be provided as an array of JSON objects. |
| delete_all_documents | Delete all documents from an index. The index will continue to exist after all documents are deleted. |
| delete_document_by_id | Delete a single document from an index by its internal Searchcraft ID (_id). |
| delete_documents_by_field | Delete one or several documents from an index by field term match (e.g., {id: 'xyz'} or {title: 'foo'}). |
| delete_documents_by_query | Delete one or several documents from an index by query match. |
| get_document_by_id | Get a single document from an index by its internal Searchcraft ID (_id). |
Federation Management
| Tool Name | Description |
|---|---|
| create_federation | Create or update a federation with the specified configuration. |
| delete_federation | Delete a federation permanently. |
| get_federation_details | Get detailed information for a specific federation. |
| get_federation_stats | Get document counts per index for a federation as well as the total document count. |
| get_organization_federations | Get a list of all federations for a specific organization. |
| list_all_federations | Get a list of all federations in the Searchcraft instance. |
| update_federation | Replace the current federation entity with an updated one. |
Authentication & Key Management
| Tool Name | Description |
|---|---|
| create_key | Create a new authentication key with specified permissions and access controls. |
| delete_all_keys | Delete all authentication keys on the Searchcraft cluster. Use with extreme caution! |
| delete_key | Delete a specific authentication key permanently. |
| get_application_keys | Get a list of all authentication keys associated with a specific application. |
| get_federation_keys | Get a list of all authentication keys associated with a specific federation. |
| get_key_details | Get detailed information for a specific authentication key. |
| get_organization_keys | Get a list of all authentication keys associated with a specific organization. |
| list_all_keys | Get a list of all authentication keys on the Searchcraft cluster. |
| update_key | Update an existing authentication key with new configuration. |
Stopwords Management
| Tool Name | Description |
|---|---|
| add_stopwords | Add custom stopwords to an index. These are added on top of the default language-specific dictionary. |
| delete_all_stopwords | Delete all custom stopwords from an index. This only affects custom stopwords, not the default language dictionary. |
| delete_stopwords | Delete specific custom stopwords from an index. This only affects custom stopwords, not the default language dictionary. |
| get_index_stopwords | Get all stopwords for an index, including both default language dictionary and custom stopwords. |
Synonyms Management
| Tool Name | Description |
|---|---|
| add_synonyms | Add synonyms to an index. Synonyms only work with fuzzy queries, not exact match queries. |
| delete_all_synonyms | Delete all synonyms from an index. |
| delete_synonyms | Delete specific synonyms from an index by their keys. |
| get_index_synonyms | Get all synonyms defined for an index. |
Search & Analytics
| Tool Name | Description |
|---|---|
| get_measure_conversion | Get measurement conversion data with optional filtering and aggregation parameters. *requires Clickhouse if running locally |
| get_measure_summary | Get measurement summary data with optional filtering and aggregation parameters. *requires Clickhouse if running locally |
| get_search_results | Performs a search query using the Searchcraft API with support for fuzzy/exact matching, facets, and date ranges. |
| get_prelim_search_data | Get schema fields and facet information for a search index to understand available fields for constructing queries. |
| get_searchcraft_status | Get the current status of the Searchcraft search service. |
Import Tools
These tools provide workflows for importing JSON data and automatically generating Searchcraft schemas. Perfect for quickly setting up new indexes from existing data sources.
| Tool Name | Description |
|---|---|
| analyze_json_from_file | Read JSON data from a local file and analyze its structure to understand field types and patterns for Searchcraft index schema generation. |
| analyze_json_from_url | Fetch JSON data from a URL and analyze its structure to understand field types and patterns for Searchcraft index schema generation. |
| generate_searchcraft_schema | Generate a complete Searchcraft index schema from analyzed JSON structure, with customizable options for search fields, weights, and other index settings. |
| create_index_from_json | Complete workflow to create a Searchcraft index from JSON data. Fetches JSON from URL or file, analyzes structure, generates schema, creates the index, and adds all documents in one step. |
Import Tools Workflow
The import tools are designed to work together in a streamlined workflow:
- Analyze → Use
analyze_json_from_fileoranalyze_json_from_urlto examine your JSON data structure - Generate → Use
generate_searchcraft_schemato create a customized Searchcraft schema from the analysis - Create → Use the Engine API
create_indextool to create the index with your generated schema - Import → Use
add_documentsto populate your new index with data
Or use the all-in-one approach:
- One-Step → Use
create_index_from_jsonto analyze, generate schema, create the index, and import all documents in one command
App Generation Tools
These tools create complete, ready-to-run search applications from your JSON data, perfect for prototyping and demos.
| Tool Name | Description |
|---|---|
| create_vite_app | Creates a complete Vite + React search application from JSON data. Analyzes your data structure, generates optimized search templates, and creates a fully functional web app with Searchcraft integration. |
App Generation Workflow
The app generation tools provide an end-to-end solution for creating search applications:
- Data Analysis → Automatically analyzes your JSON structure to understand field types and content
- Template Generation → Creates optimized search result templates based on your data fields
- App Creation → Clones and configures a complete Vite + React application
- Environment Setup → Configures Searchcraft connection settings
- Ready to Run → Provides a fully functional search app you can immediately start and customize
Detailed Tool Usage
Using create_index_from_json
The create_index_from_json tool provides a complete workflow to create a Searchcraft index from JSON data in a single command. This is perfect for quickly setting up search indexes from existing datasets. Note, if you know the language of the data you are importing you should specify it with the language parameter (use the ISO 639-1 two letter code for the language)
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
source | "url" or "file" | ✅ | Whether to fetch data from a URL or read from a local file |
path | string | ✅ | URL or file path to the JSON data |
index_name | string | ✅ | Name for the new Searchcraft index |
sample_size | number | ❌ | Number of items to analyze for schema generation (default: 10) |
search_fields | string[] | ❌ | Override automatically detected search fields |
weight_multipliers | object | ❌ | Custom field weights for search relevance (0.0-10.0) |
language | string | ❌ | Language code for the index (e.g., "en", "es") |
auto_commit_delay | number | ❌ | Auto commit delay in seconds |
exclude_stop_words | boolean | ❌ | Whether to exclude stop words from search |
time_decay_field | string | ❌ | Field name for time-based relevance decay |
Example Usage
From a URL:
{
"source": "url",
"path": "https://api.example.com/products.json",
"index_name": "products",
"sample_size": 50,
"search_fields": ["title", "description", "category"],
"weight_multipliers": {
"title": 2.0,
"description": 1.0,
"category": 1.5
}
}From a local file:
{
"source": "file",
"path": "/path/to/data.json",
"index_name": "my_data",
"language": "en"
}What it does
- Fetches/Reads Data → Downloads from URL or reads from local file
- Analyzes Structure → Examines JSON to understand field types and patterns
-
…