home / mcp / typesense mcp server

Typesense MCP Server

Queries Typesense collections with a typo-tolerant, filtered, paginated search via a standardized MCP interface.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "sourabh-khot65-typesense-mcp-server": {
      "command": "./typesense-mcp-server",
      "args": [],
      "env": {
        "TYPESENSE_HOST": "localhost",
        "TYPESENSE_PORT": "8108",
        "TYPESENSE_API_KEY": "xyz",
        "TYPESENSE_PROTOCOL": "http"
      }
    }
  }
}

You have a dedicated MCP server that lets you query any Typesense collection through a unified, typo-tolerant search interface. It supports all Typesense search parameters, filtering, faceting, and pagination, making it easy to integrate powerful search capabilities into your applications.

How to use

You interact with the server using an MCP client to run search requests against a specific Typesense collection. Specify the collection, your query, and optional search parameters to tailor results. Use the provided tool to search across any collection, apply filters, and paginate through results.

How to install

Prerequisites you need before building and running the server.

  • Go 1.23 or later (needed to build the server)
  • Access to a running Typesense server (hosted locally or remotely)

Step 1: Build the MCP server binary.

go build -o typesense-mcp-server

Step 2: Run the MCP server locally.

./typesense-mcp-server

Configuration, security, and notes

Configure the MCP server by setting environment variables to point to your Typesense instance and control access. The following variables are recognized by default:

  • TYPESENSE_HOST: Typesense server host (default: localhost)
  • TYPESENSE_PORT: Typesense server port (default: 8108)
  • TYPESENSE_PROTOCOL: Protocol to use (http/https) (default: http)
  • TYPESENSE_API_KEY: Typesense API key (default: xyz)

If you need to customize these values, set them in your shell before starting the MCP server, for example:

export TYPESENSE_HOST=localhost
export TYPESENSE_PORT=8108
export TYPESENSE_PROTOCOL=http
export TYPESENSE_API_KEY=xyz

Tools and endpoints

The server exposes a generic search tool that you can use to query any Typesense collection. You provide the collection name, a search query, and optional parameters to refine results. The tool supports all Typesense search parameters, including typo tolerance, filtering, faceting, and pagination.

Available tools

typesense_search

Search documents in any Typesense collection using a query, with optional filters, fields to search, pagination, and other Typesense search parameters.