Trieve

Trieve

All-in-one solution for search, recommendations, and RAG.

2,555
Stars
229
Forks
2,555
Watchers
1
Issues
Trieve offers a platform for semantic search, recommendations, and retrieval-augmented generation (RAG). It supports dense vector search, typo-tolerant neural search, sub-sentence highlighting, and integrates with a variety of embedding models. Trieve can be self-hosted and features APIs for context management with LLMs, including Bring Your Own Model and managed RAG endpoints. Full documentation and SDKs are available for streamlined integration.

Key Features

Semantic dense vector search with multiple embedding model integrations
Typo-tolerant full-text and neural search
Sub-sentence matching and result highlighting
Recommendations via similar chunk and file grouping
Retrieval-augmented generation APIs for LLM context
Support for Bring Your Own Model workflows
Self-hosting with Docker, Kubernetes, AWS, and GCP support
OpenAPI specification and detailed API documentation
SDKs for TypeScript and Python
Flexible integration for custom and managed RAG pipelines

Use Cases

Building semantic and typo-tolerant search engines
Enhancing large language models with relevant context through RAG
Implementing recommendation systems based on content similarity
Providing enterprise-grade, self-hosted search infrastructure
Highlighting relevant portions of documents for improved UX
Supporting knowledge management and document discovery
Deploying scalable vector search for platform content
Integrating with custom machine learning pipelines
Supporting user-facing document or knowledge base search
Enabling hybrid search solutions combining vector and keyword methods

README

Quick Links

Features

  • 🔒 Self-Hosting in your VPC or on-prem: We have full self-hosting guides for AWS, GCP, Kubernetes generally, and docker compose available on our documentation page here.
  • 🧠 Semantic Dense Vector Search: Integrates with OpenAI or Jina embedding models and Qdrant to provide semantic vector search.
  • 🔍 Typo Tolerant Full-Text/Neural Search: Every uploaded chunk is vector'ized with naver/efficient-splade-VI-BT-large-query for typo tolerant, quality neural sparse-vector search.
  • 🖊️ Sub-Sentence Highlighting: Highlight the matching words or sentences within a chunk and bold them on search to enhance UX for your users. Shout out to the simsearch crate!
  • 🌟 Recommendations: Find similar chunks (or files if using grouping) with the recommendation API. Very helpful if you have a platform where users' favorite, bookmark, or upvote content.
  • 🤖 Convenient RAG API Routes: We integrate with OpenRouter to provide you with access to any LLM you would like for RAG. Try our routes for fully-managed RAG with topic-based memory management or select your own context RAG.
  • 💼 Bring Your Own Models: If you'd like, you can bring your own text-embedding, SPLADE, cross-encoder re-ranking, and/or large-language model (LLM) and plug it into our infrastructure.
  • 🔄 Hybrid Search with cross-encoder re-ranking: For the best results, use hybrid search with BAAI/bge-reranker-large re-rank optimization.
  • 📆 Recency Biasing: Easily bias search results for what was most recent to prevent staleness
  • 🛠️ Tunable Merchandizing: Adjust relevance using signals like clicks, add-to-carts, or citations
  • 🕳️ Filtering: Date-range, substring match, tag, numeric, and other filter types are supported.
  • 👥 Grouping: Mark multiple chunks as being part of the same file and search on the file-level such that the same top-level result never appears twice

Are we missing a feature that your use case would need? - call us at 628-222-4090, make a Github issue, or join the Matrix community and tell us! We are a small company who is still very hands-on and eager to build what you need; professional services are available.

Local development with Linux

Installing via Smithery

To install Trieve for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install trieve-mcp-server --client claude

Debian/Ubuntu Packages needed packages

sh
sudo apt install curl \
gcc \
g++ \
make \
pkg-config \
python3 \
python3-pip \
libpq-dev \
libssl-dev \
openssl

Arch Packages needed

sh
sudo pacman -S base-devel postgresql-libs

Install NodeJS and Yarn

You can install NVM using its install script.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash

You should restart the terminal to update bash profile with NVM. Then, you can install NodeJS LTS release and Yarn.

nvm install --lts
npm install -g yarn

Make server tmp dir

mkdir server/tmp

Install rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install cargo-watch

cargo install cargo-watch

Setup env's

You might need to create the analytics directory in ./frontends

cp .env.analytics ./frontends/analytics/.env
cp .env.chat ./frontends/chat/.env
cp .env.search ./frontends/search/.env
cp .env.example ./server/.env
cp .env.dashboard ./frontends/dashboard/.env

Add your LLM_API_KEY to ./server/.env

Here is a guide for acquiring that.

Steps once you have the key

  1. Open the ./server/.env file
  2. Replace the value for LLM_API_KEY to be your own OpenAI API key.
  3. Replace the value for OPENAI_API_KEY to be your own OpenAI API key.

Export the following keys in your terminal for local dev

The PAGEFIND_CDN_BASE_URL and S3_SECRET_KEY_CSVJSONL could be set to a random list of strings.

export OPENAI_API_KEY="your_OpenAI_api_key" \
LLM_API_KEY="your_OpenAI_api_key" \
PAGEFIND_CDN_BASE_URL="lZP8X4h0Q5Sj2ZmV,aAmu1W92T6DbFUkJ,DZ5pMvz8P1kKNH0r,QAqwvKh8rI5sPmuW,YMwgsBz7jLfN0oX8" \
S3_SECRET_KEY_CSVJSONL="Gq6wzS3mjC5kL7i4KwexnL3gP8Z1a5Xv,V2c4ZnL0uHqBzFvR2NcN8Pb1g6CjmX9J,TfA1h8LgI5zYkH9A9p7NvWlL0sZzF9p8N,pKr81pLq5n6MkNzT1X09R7Qb0Vn5cFr0d,DzYwz82FQiW6T3u9A4z9h7HLOlJb7L2V1" \
GROQ_API_KEY="GROQ_API_KEY_if_applicable"

Start docker container services needed for local dev

cat .env.chat .env.search .env.server .env.docker-compose > .env

./convenience.sh -l

Install front-end packages for local dev

cd frontends
yarn

cd ..

cd clients/ts-sdk
yarn build

cd ../..

Start services for local dev

It is recommend to manage services through tmuxp, see the guide here or terminal tabs.

cd frontends
yarn
yarn dev
cd server
cargo watch -x run
cd server
cargo run --bin ingestion-worker
cd server
cargo run --bin file-worker
cd server
cargo run --bin delete-worker
cd search
yarn
yarn dev

Verify Working Setup

After the cargo build has finished (after the tmuxp load trieve):

Additional Instructions for testing cross encoder reranking models

To test the Cross Encoder rerankers in local dev,

  • click on the dataset, go to the Dataset Settings -> Dataset Options -> Additional Options and uncheck the Fulltext Enabled option.
  • in the Embedding Settings, select your reranker model and enter the respective key in the adjacent textbox, and hit save.
  • in the search playground, set Type -> Semantic and select Rerank By -> Cross Encoder
  • if AIMon Reranker is selected in the Embedding Settings, you can enter an optional Task Definition in the search playground to specify the domain of context documents to the AIMon reranker.

Debugging issues with local dev

Reach out to us on discord for assistance. We are available and more than happy to assist.

Debug diesel by getting the exact generated SQL

diesel::debug_query(&query).to_string();

Running evals

The evals package loads an mcp client that then runs the index.ts file, so there is no need to rebuild between tests. You can load environment variables by prefixing the npx command. Full documentation can be found here.

bash
OPENAI_API_KEY=your-key  npx mcp-eval evals.ts clients/mcp-server/src/index.ts

Local Setup for Testing Stripe Features

Install Stripe CLI.

  1. stripe login
  2. stripe listen --forward-to localhost:8090/api/stripe/webhook
  3. set the STRIPE_WEBHOOK_SECRET in the server/.env to the resulting webhook signing secret
  4. stripe products create --name trieve --default-price-data.unit-amount 1200 --default-price-data.currency usd
  5. stripe plans create --amount=1200 --currency=usd --interval=month --product={id from response of step 3}

Contributors

Star History

Star History Chart

Repository Owner

devflowinc
devflowinc

Organization

Repository Details

Language Rust
Default Branch main
Size 185,109 KB
Contributors 30
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Rust
70.85%
JavaScript
7.49%
MDX
5.63%
Mustache
4.42%
Astro
3.03%
CSS
2.79%
HTML
2.01%
PLpgSQL
1.7%
Liquid
0.64%
FreeMarker
0.46%
HCL
0.33%
Go
0.3%
Dockerfile
0.19%
Smarty
0.07%
Shell
0.05%
Nushell
0.02%
Makefile
0.01%
Python
0.01%

Tags

Topics

actix actix-web ai artificial-intelligence diesel embedding hacktoberfest llm postgresql qdrant qdrant-vector-database rag retrieval-augmented-generation rust search search-engine solidjs tailwindcss vector-search

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Driflyte MCP Server

    Driflyte MCP Server

    Bridging AI assistants with deep, topic-aware knowledge from web and code sources.

    Driflyte MCP Server acts as a bridge between AI-powered assistants and diverse, topic-aware content sources by exposing a Model Context Protocol (MCP) server. It enables retrieval-augmented generation workflows by crawling, indexing, and serving topic-specific documents from web pages and GitHub repositories. The system is extensible, with planned support for additional knowledge sources, and is designed for easy integration with popular AI tools such as ChatGPT, Claude, and VS Code.

    • 9
    • MCP
    • serkan-ozal/driflyte-mcp-server
  • MCP Server for Deep Research

    MCP Server for Deep Research

    Transform research questions into comprehensive, well-cited reports using an advanced research assistant.

    MCP Server for Deep Research provides an end-to-end workflow for conducting in-depth research on complex topics. It elaborates on research questions, generates subquestions, integrates web search, analyzes and synthesizes retrieved content, and generates structured, well-cited research reports. The tool integrates with Claude Desktop and leverages prompt templates tailored for comprehensive research tasks.

    • 187
    • MCP
    • reading-plus-ai/mcp-server-deep-research
  • Pearch.ai MCP

    Pearch.ai MCP

    Natural Language People Search and Candidate Sourcing API for Seamless ATS Integration

    Pearch.ai MCP provides a high-precision people search API that interprets natural language queries to deliver top-quality candidate results. Designed for easy integration with Applicant Tracking Systems and hiring platforms, it leverages scientific methods and is trusted by recruiters. The tool is implemented as a Model Context Protocol (MCP), facilitating standardized model context handling and deployment via packages like FastMCP or through Smithery. The solution prioritizes ease of use, reliability, and high candidate match accuracy.

    • 5
    • MCP
    • Pearch-ai/mcp_pearch
  • mcp-local-rag

    mcp-local-rag

    Local RAG server for web search and context injection using Model Context Protocol.

    mcp-local-rag is a local server implementing the Model Context Protocol (MCP) to provide retrieval-augmented generation (RAG) capabilities. It performs live web search, extracts relevant context using Google's MediaPipe Text Embedder, and supplies the information to large language models (LLMs) for enhanced, up-to-date responses. The tool is designed for easy local deployment, requiring no external APIs, and is compatible with multiple MCP clients. Security audits are available, and integration is demonstrated across several LLM platforms.

    • 89
    • MCP
    • nkapila6/mcp-local-rag
  • Vectorize MCP Server

    Vectorize MCP Server

    MCP server for advanced vector retrieval and text extraction with Vectorize integration.

    Vectorize MCP Server is an implementation of the Model Context Protocol (MCP) that integrates with the Vectorize platform to enable advanced vector retrieval and text extraction. It supports seamless installation and integration within development environments such as VS Code. The server is configurable through environment variables or JSON configuration files and is suitable for use in collaborative and individual workflows requiring vector-based context management for models.

    • 97
    • MCP
    • vectorize-io/vectorize-mcp-server
  • MCP-searxng

    MCP-searxng

    MCP server bridging agentic systems with SearXNG web search

    MCP-searxng enables agentic systems to interface with web search engines via the SearXNG platform by implementing the Model Context Protocol. It supports both command-line and local server deployment, providing flexible integration options. Users can configure custom SearXNG server URLs and connect through clients like uvx or claude desktop. The tool simplifies access to structured web search within agentic workflows.

    • 107
    • MCP
    • SecretiveShell/MCP-searxng
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results