Typesense MCP server

Provides a bridge between Typesense search engine and external tools, enabling collection management, document indexing, and both keyword and vector similarity search operations
Back to servers
Setup instructions
Provider
avarant
Release date
Apr 22, 2025
Language
Python
Stats
5 stars

Typesense MCP Server is a specialized server implementation of the Model Context Protocol (MCP) that integrates with Typesense, a fast, typo-tolerant search engine. This server allows you to interact with Typesense databases through MCP tools, providing functionality for collection management, document operations, and search capabilities.

Installation

Prerequisites

Before installing the Typesense MCP Server, you'll need to install uv, a Python package installer.

On macOS, you can install uv using Homebrew:

brew install uv

Setup Process

  1. Clone the repository:
git clone [email protected]:avarant/typesense-mcp-server.git ~/typesense-mcp-server
  1. Configure for use in Cursor by updating your .cursor/mcp.json file:
{
  "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": ""
      }
    }
  }
}
  1. Fill in the environment variables with your Typesense server details:
    • TYPESENSE_HOST: Your Typesense server hostname
    • TYPESENSE_PORT: The port your Typesense server runs on
    • TYPESENSE_PROTOCOL: The protocol (http or https)
    • TYPESENSE_API_KEY: Your Typesense API key

Available Tools

Server Management

The server provides tools to monitor and manage your Typesense instance:

  • check_typesense_health: Verify the health status of your Typesense server
  • list_collections: Get a complete list of all collections in your Typesense server

Collection Management

Manage your Typesense collections with these tools:

  • describe_collection: View the schema and metadata for a specific collection
  • export_collection: Export all documents from a collection
  • create_collection: Create a new collection by providing a schema
  • delete_collection: Remove a specific collection and all its documents
  • truncate_collection: Clear all documents from a collection while preserving its schema

Document Operations

These tools help you manage individual documents or batches:

  • create_document: Add a single new document to a collection
  • upsert_document: Create a new document or update it if it already exists
  • index_multiple_documents: Process multiple documents in a batch operation
  • delete_document: Remove a specific document by its ID
  • import_documents_from_csv: Bulk import documents from CSV data

Search Capabilities

Perform powerful searches on your collections:

  • search: Execute keyword-based searches on a specific collection
  • vector_search: Perform similarity searches using vector embeddings

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

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

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "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": ""
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "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": ""
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later