searchcraft-mcp-server

searchcraft-inc/searchcraft-mcp-server

3.4

If you are the rightful owner of searchcraft-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Searchcraft MCP Server is a powerful tool for managing Searchcraft clusters, providing a suite of tools for document, index, federation, authentication, and search management.

searchcraft-mcp-server

An MCP Server powered by Searchcraft โ€“ the developer-first vertical search engine.

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.

Available Tools

Index Management

Tool NameDescription
create_indexCreate a new index with the specified schema. This will empty the index if it already exists.
delete_indexDelete an index and all its documents permanently.
get_all_index_statsGet document counts and statistics for all indexes.
get_index_schemaGet the schema definition for a specific index.
get_index_statsGet statistics and metadata for a specific index (document count, etc.).
list_all_indexesGet a list of all indexes in the Searchcraft instance.
patch_indexMake partial configuration changes to an index schema (search_fields, weight_multipliers, etc.).
update_indexReplace the entire contents of an existing index with a new schema definition.

Document Management

Tool NameDescription
add_documentsAdd one or multiple documents to an index. Documents should be provided as an array of JSON objects.
delete_all_documentsDelete all documents from an index. The index will continue to exist after all documents are deleted.
delete_document_by_idDelete a single document from an index by its internal Searchcraft ID (_id).
delete_documents_by_fieldDelete one or several documents from an index by field term match (e.g., {id: 'xyz'} or {title: 'foo'}).
delete_documents_by_queryDelete one or several documents from an index by query match.
get_document_by_idGet a single document from an index by its internal Searchcraft ID (_id).

Federation Management

Tool NameDescription
create_federationCreate or update a federation with the specified configuration.
delete_federationDelete a federation permanently.
get_federation_detailsGet detailed information for a specific federation.
get_federation_statsGet document counts per index for a federation as well as the total document count.
get_organization_federationsGet a list of all federations for a specific organization.
list_all_federationsGet a list of all federations in the Searchcraft instance.
update_federationReplace the current federation entity with an updated one.

Authentication & Key Management

Tool NameDescription
create_keyCreate a new authentication key with specified permissions and access controls.
delete_all_keysDelete all authentication keys on the Searchcraft cluster. Use with extreme caution!
delete_keyDelete a specific authentication key permanently.
get_application_keysGet a list of all authentication keys associated with a specific application.
get_federation_keysGet a list of all authentication keys associated with a specific federation.
get_key_detailsGet detailed information for a specific authentication key.
get_organization_keysGet a list of all authentication keys associated with a specific organization.
list_all_keysGet a list of all authentication keys on the Searchcraft cluster.
update_keyUpdate an existing authentication key with new configuration.

Stopwords Management

Tool NameDescription
add_stopwordsAdd custom stopwords to an index. These are added on top of the default language-specific dictionary.
delete_all_stopwordsDelete all custom stopwords from an index. This only affects custom stopwords, not the default language dictionary.
delete_stopwordsDelete specific custom stopwords from an index. This only affects custom stopwords, not the default language dictionary.
get_index_stopwordsGet all stopwords for an index, including both default language dictionary and custom stopwords.

Synonyms Management

Tool NameDescription
add_synonymsAdd synonyms to an index. Synonyms only work with fuzzy queries, not exact match queries.
delete_all_synonymsDelete all synonyms from an index.
delete_synonymsDelete specific synonyms from an index by their keys.
get_index_synonymsGet all synonyms defined for an index.

Search & Measurement

Tool NameDescription
get_measure_conversionGet measurement conversion data with optional filtering and aggregation parameters.
get_measure_summaryGet measurement summary data with optional filtering and aggregation parameters.
get_search_resultsPerforms a search query using the Searchcraft API with support for fuzzy/exact matching, facets, and date ranges.
get_searchcraft_statusGet the current status of the Searchcraft search service.

Getting Started

Environment Variables

Create .env file at the project's root and fill in the values:

# Server Config
USER_AGENT=searchcraft-mcp-server/<project-version>
DEBUG=true
PORT=3100

# Searchcraft Config
ENDPOINT_URL= # The endpoint url of your Searchcraft Cluster
ADMIN_KEY= # The admin key (super user key) of your Searchcraft Cluster

Running the Server

Make sure your environment has the correct version of node selected.

nvm use

Install dependencies with yarn

yarn

Build & Start the server

yarn build
yarn start

Usage With Claude Desktop

The server must be running in order for Claude Desktop to detect searchcraft-mcp-server's tools.

searchcraft-mcp-server uses StreamableHTTPServerTransport, so in order to connect it to Claude Desktop, we use mcp-remote โ†—๏ธŽ.

In your claude desktop config file, add the following:

claude_desktop_config.json

{
  "mcpServers": {
    "searchcraft": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:<MY-PORT-FROM-ENV>/mcp"
      ]
    }
  }
}

The claude desktop config file can be found at /Users/[My Workspace]]/Library/Application Support/Claude/claude_desktop_config.json. If no file exists here you can create it.

Claude Desktop Node Version

We have experienced that when Claude Desktop runs the command to connect to the MCP server, it can sometimes choose an older version of Node. If older versions of node are installed on your system, this can lead to issues. Ensure that your default Node version on your system is high enough to properly run the server.

Debugging

To view claude's logs for debugging purposes, use the npm script:

yarn claude-logs

Inspector Tool

You can view and try out the available tools/prompts/resources using the inspector. While the mcp server is running, you can launch the inspector:

yarn inspect
  • Choose Transport Type: Streamable HTTP
  • Specify the URL that the server is running on, including the port number.
  • Hit "Connect"
http://localhost:<MY-PORT-FROM-ENV>/mcp

The Inspector allows you to view available tools and to try making test calls to them.

Resources

License

Licensed under the .

Built with ๐Ÿ›ฐ๏ธ by the Searchcraft team