Typesense MCP Server

Typesense MCP Server

A server that enables vector and keyword search capabilities in Typesense databases through the Model Context Protocol, providing tools for collection management, document operations, and search functionality.

Category
Visit Server

Tools

check_typesense_health

Checks the health status of the configured Typesense server. Args: ctx (Context): The MCP context, providing access to application resources. Returns: dict | str: The health status dictionary from Typesense or an error message.

list_collections

Retrieves a list of all collections in the Typesense server. Args: ctx (Context): The MCP context. Returns: list | str: A list of collection schemas or an error message string.

describe_collection

Retrieves the schema and metadata for a specific collection. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection to describe. Returns: dict | str: The collection schema dictionary or an error message string.

export_collection

Exports all documents from a specific collection. Warning: This can be memory-intensive for very large collections. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection to export. Returns: list[dict] | str: A list of document dictionaries or an error message string.

search

Performs a keyword search on a specific collection. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection to search within. query (str): The search query string. Use '*' for all documents. query_by (str): Comma-separated list of fields to search in. filter_by (str | None): Filter conditions (e.g., 'price:>100 && category:Electronics'). Defaults to None. sort_by (str | None): Sorting criteria (e.g., 'price:asc, rating:desc'). Defaults to None. group_by (str | None): Field to group results by. Defaults to None. facet_by (str | None): Fields to facet on. Defaults to None. per_page (int): Number of results per page. Defaults to 20. page (int): Page number to retrieve. Defaults to 1. Returns: dict | str: The search results dictionary from Typesense or an error message string.

vector_search

Performs a vector similarity search on a specific collection. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection to search within. vector_query (str): The vector query string, formatted as 'vector_field:([v1,v2,...], k: num_neighbors)'. query_by (str | None): Optional: Comma-separated list of text fields for hybrid search query ('q' parameter). Defaults to None. filter_by (str | None): Filter conditions to apply before vector search. Defaults to None. sort_by (str | None): Optional sorting criteria (less common for pure vector search). Defaults to None. per_page (int): Number of results per page. Defaults to 10. page (int): Page number to retrieve. Defaults to 1. Returns: dict | str: The vector search results dictionary from Typesense or an error message string.

create_collection

Creates a new collection with the provided schema. Args: ctx (Context): The MCP context. schema (dict): The collection schema dictionary (must include 'name' and 'fields'). Returns: dict | str: The created collection schema dictionary or an error message string.

delete_collection

Deletes a specific collection. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection to delete. Returns: dict | str: The deleted collection schema dictionary or an error message string.

truncate_collection

Truncates a collection by deleting all documents but keeping the schema. Achieved by retrieving schema, deleting collection, and recreating it. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection to truncate. Returns: str: A success or error message string.

create_document

Creates a single new document in a specific collection. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection. document (dict): The document data to create (must include an 'id' field unless auto-schema). Returns: dict | str: The created document dictionary or an error message string.

upsert_document

Upserts (creates or updates) a single document in a specific collection. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection. document (dict): The document data to upsert (must include an 'id' field). Returns: dict | str: The upserted document dictionary or an error message string.

index_multiple_documents

Indexes (creates, upserts, or updates) multiple documents in a batch. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection. documents (list[dict]): A list of document dictionaries to index. action (str): The import action ('create', 'upsert', 'update'). Defaults to 'upsert'. Returns: list[dict] | str: A list of result dictionaries (one per document) or an error message string. Each result dict typically looks like {'success': true/false, 'error': '...', 'document': {...}}.

delete_document

Deletes a single document by its ID from a specific collection. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection. document_id (str): The ID of the document to delete. Returns: dict | str: The deleted document dictionary or an error message string.

import_documents_from_csv

Imports documents from CSV data (as a string) or a file path into a collection. Assumes CSV header row maps directly to Typesense field names. Does basic type inference for int/float, otherwise treats as string. Args: ctx (Context): The MCP context. collection_name (str): The name of the collection. csv_data_or_path (str): Either the raw CSV data as a string or the path to a CSV file. batch_size (int): Number of documents to import per batch. Defaults to 100. action (str): Import action ('create', 'upsert', 'update'). Defaults to 'upsert'. Returns: dict: A summary of the import process including total processed, successful, failed count, and any errors.

README

Typesense MCP Server

A Model Context Protocol (MCP) Server that interfaces with Typesense

Installation

Install uv

On Mac you can install it using homebrew

brew install uv

Clone the package

git clone git@github.com:avarant/typesense-mcp-server.git ~/typesense-mcp-server

Update your .cursor/mcp.json to use in Cursor

{
  "mcpServers": {
    "server-name": {
      "command": "uv",
      "args": ["--directory", "~/typesense-mcp-server", "run", "mcp", "run", "main.py"],
      "env": {
        "TYPESENSE_HOST": "",
        "TYPESENSE_PORT": "", 
        "TYPESENSE_PROTOCOL": "",
        "TYPESENSE_API_KEY": ""
      }
    }
  }
}

Available Tools

The Typesense MCP Server provides the following tools:

Server Management

  • check_typesense_health - Checks the health status of the configured Typesense server
  • list_collections - Retrieves a list of all collections in the Typesense server

Collection Management

  • describe_collection - Retrieves the schema and metadata for a specific collection
  • export_collection - Exports all documents from a specific collection
  • create_collection - Creates a new collection with the provided schema
  • delete_collection - Deletes a specific collection
  • truncate_collection - Truncates a collection by deleting all documents but keeping the schema

Document Operations

  • create_document - Creates a single new document in a specific collection
  • upsert_document - Upserts (creates or updates) a single document in a specific collection
  • index_multiple_documents - Indexes (creates, upserts, or updates) multiple documents in a batch
  • delete_document - Deletes a single document by its ID from a specific collection
  • import_documents_from_csv - Imports documents from CSV data into a collection

Search Capabilities

  • search - Performs a keyword search on a specific collection
  • vector_search - Performs a vector similarity search on a specific collection

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured