typesense
MCP server for connecting to you typesense collections and retrieve data using your favorite MCP client (Claude/ Cursor)
claude mcp add --transport stdio sourabh-khot65-typesense-mcp-server docker run -i typesense-mcp-server-image \ --env TYPESENSE_HOST="localhost" \ --env TYPESENSE_PORT="8108" \ --env TYPESENSE_API_KEY="xyz" \ --env TYPESENSE_PROTOCOL="http"
How to use
This MCP server provides a generic interface to search across any Typesense collection. It exposes a single tool named typesense_search that lets you query a Typesense cluster with a collection name, a query string, and optional filtering and pagination parameters. You can specify which fields to search in via query_by, apply filters with filter_by, and control results with page and per_page. The server is designed to be run in a containerized or environment-configured setup, using the standard Typesense connection details (host, port, protocol, and API key) through environment variables.
To use the tool, configure the environment variables to point at your Typesense instance (host, port, protocol, and API key). Then invoke a search by providing: the collection name, your query, and any optional parameters like query_by, filter_by, page, and per_page. The tool supports typo-tolerant searching and comprehensive Typesense search parameters, making it suitable for building robust search experiences across any collection.
How to install
Prerequisites:
- Docker (if you choose to run via docker) or a suitable environment to run the binary/containerized server
- Optional: Go for building from source if you have a source workflow (not required if using prebuilt container)
Installation steps (docker-based):
- Ensure Docker is installed and running on your machine.
- Pull/run the MCP server image (adjust the image name if you have a custom one): docker pull typesense-mcp-server-image docker run -d --name typesense-mcp-server -p 8080:8080 typesense-mcp-server-image
- Configure environment variables for Typesense connection as needed (TYPESENSE_HOST, TYPESENSE_PORT, TYPESENSE_PROTOCOL, TYPESENSE_API_KEY).
If you prefer running a native binary (Go) or another deployment method, follow your standard deployment steps for Go binaries or container images, ensuring the Typesense connection details are provided via environment variables as described above.
Additional notes
Environment variables:
- TYPESENSE_HOST: Typesense server host (default: localhost)
- TYPESENSE_PORT: Typesense server port (default: 8108)
- TYPESENSE_PROTOCOL: http or https (default: http)
- TYPESENSE_API_KEY: API key for Typesense (default: xyz)
Common issues:
- Ensure Typesense is reachable from the MCP server network (firewalls, container networking).
- If authentication fails, verify the API key and that the protocol/port are correct.
- When using pagination, keep page and per_page within sensible bounds (per_page default is typically 10, max 100 as per common Typesense behavior).
Configuration tips:
- Use TYPESENSE_PROTOCOL and TYPESENSE_API_KEY to securely connect to secured clusters.
- For local development, mapping localhost:8108 and http is usually sufficient.
Related MCP Servers
trpc-agent-go
trpc-agent-go is a powerful Go framework for building intelligent agent systems using large language models (LLMs) and tools.
station
Station is our open-source runtime that lets teams deploy agents on their own infrastructure with full control.
tiger-cli
Tiger CLI is the command-line interface for Tiger Cloud. It includes an MCP server for helping coding agents write production-level Postgres code.
gopls
MCP server for golang projects development: Expand AI Code Agent ability boundary to have a semantic understanding and determinisic information for golang projects.
kubernetes
A Model Context Protocol (MCP) server for the Kubernetes API.
gcp-cost
💰 An MCP server that enables AI assistants to estimate Google Cloud costs, powered by Cloud Billing Catalog API and built with Genkit for Go