TxtAI MCP Server

Official
by neuml

Integrations

  • Hosts tutorial content for txtai with guides on implementation and usage

  • Built with FastAPI to provide web API endpoints for all txtai functionality

  • Enables workflows to analyze GitHub data, demonstrated in examples for exploring and analyzing repository content

txtai is an all-in-one AI framework for semantic search, LLM orchestration and language model workflows.

The key component of txtai is an embeddings database, which is a union of vector indexes (sparse and dense), graph networks and relational databases.

This foundation enables vector search and/or serves as a powerful knowledge source for large language model (LLM) applications.

Build autonomous agents, retrieval augmented generation (RAG) processes, multi-model workflows and more.

Summary of txtai features:

  • 🔎 Vector search with SQL, object storage, topic modeling, graph analysis and multimodal indexing
  • 📄 Create embeddings for text, documents, audio, images and video
  • 💡 Pipelines powered by language models that run LLM prompts, question-answering, labeling, transcription, translation, summarization and more
  • ↪️️ Workflows to join pipelines together and aggregate business logic. txtai processes can be simple microservices or multi-model workflows.
  • 🤖 Agents that intelligently connect embeddings, pipelines, workflows and other agents together to autonomously solve complex problems
  • ⚙️ Web and Model Context Protocol (MCP) APIs. Bindings available for JavaScript, Java, Rust and Go.
  • 🔋 Batteries included with defaults to get up and running fast
  • ☁️ Run local or scale out with container orchestration

txtai is built with Python 3.10+, Hugging Face Transformers, Sentence Transformers and FastAPI. txtai is open-source under an Apache 2.0 license.

Interested in an easy and secure way to run hosted txtai applications? Then join the txtai.cloud preview to learn more.

Why txtai?

New vector databases, LLM frameworks and everything in between are sprouting up daily. Why build with txtai?

# Get started in a couple lines import txtai embeddings = txtai.Embeddings() embeddings.index(["Correct", "Not what we hoped"]) embeddings.search("positive", 1) #[(0, 0.29862046241760254)]
  • Built-in API makes it easy to develop applications using your programming language of choice
# app.yml embeddings: path: sentence-transformers/all-MiniLM-L6-v2
CONFIG=app.yml uvicorn "txtai.api:app" curl -X GET "http://localhost:8000/search?query=positive"
  • Run local - no need to ship data off to disparate remote services
  • Work with micromodels all the way up to large language models (LLMs)
  • Low footprint - install additional dependencies and scale up when needed
  • Learn by example - notebooks cover all available functionality

Use Cases

The following sections introduce common txtai use cases. A comprehensive set of over 60 example notebooks and applications are also available.

Build semantic/similarity/vector/neural search applications.

Traditional search systems use keywords to find data. Semantic search has an understanding of natural language and identifies results that have the same meaning, not necessarily the same keywords.

Get started with the following examples.

NotebookDescription
Introducing txtai ▶️Overview of the functionality provided by txtai
Similarity search with imagesEmbed images and text into the same space for search
Build a QA databaseQuestion matching with semantic search
Semantic GraphsExplore topics, data connectivity and run network analysis

LLM Orchestration

Autonomous agents, retrieval augmented generation (RAG), chat with your data, pipelines and workflows that interface with large language models (LLMs).

See below to learn more.

NotebookDescription
Prompt templates and task chainsBuild model prompts and connect tasks together with workflows
Integrate LLM frameworksIntegrate llama.cpp, LiteLLM and custom generation frameworks
Build knowledge graphs with LLMsBuild knowledge graphs with LLM-driven entity extraction
Parsing the stars with txtaiExplore an astronomical knowledge graph of known stars, planets, galaxies
Agents

Agents connect embeddings, pipelines, workflows and other agents together to autonomously solve complex problems.

txtai agents are built on top of the smolagents framework. This supports all LLMs txtai supports (Hugging Face, llama.cpp, OpenAI / Claude / AWS Bedrock via LiteLLM).

See the link below to learn more.

NotebookDescription
Analyzing Hugging Face Posts with Graphs and AgentsExplore a rich dataset with Graph Analysis and Agents
Granting autonomy to agentsAgents that iteratively solve problems as they see fit
Analyzing LinkedIn Company Posts with Graphs and AgentsExploring how to improve social media engagement with AI
Retrieval augmented generation

Retrieval augmented generation (RAG) reduces the risk of LLM hallucinations by constraining the output with a knowledge base as context. RAG is commonly used to "chat with your data".

A novel feature of txtai is that it can provide both an answer and source citation.

NotebookDescription
Build RAG pipelines with txtaiGuide on retrieval augmented generation including how to create citations
Chunking your data for RAGExtract, chunk and index content for effective retrieval
Advanced RAG with graph path traversalGraph path traversal to collect complex sets of data for advanced RAG
Speech to Speech RAG ▶️Full cycle speech to speech workflow with RAG

Language Model Workflows

Language model workflows, also known as semantic workflows, connect language models together to build intelligent applications.

While LLMs are powerful, there are plenty of smaller, more specialized models that work better and faster for specific tasks. This includes models for extractive question-answering, automatic summarization, text-to-speech, transcription and translation.

NotebookDescription
Run pipeline workflows ▶️Simple yet powerful constructs to efficiently process data
Building abstractive text summariesRun abstractive text summarization
Transcribe audio to textConvert audio files to text
Translate text between languagesStreamline machine translation and language detection

Installation

The easiest way to install is via pip and PyPI

pip install txtai

Python 3.10+ is supported. Using a Python virtual environment is recommended.

See the detailed install instructions for more information covering optional dependencies, environment specific prerequisites, installing from source, conda support and how to run with containers.

Model guide

See the table below for the current recommended models. These models all allow commercial use and offer a blend of speed and performance.

ComponentModel(s)
Embeddingsall-MiniLM-L6-v2
Image CaptionsBLIP
Labels - Zero ShotBART-Large-MNLI
Labels - FixedFine-tune with training pipeline
Large Language Model (LLM)Llama 3.1 Instruct
SummarizationDistilBART
Text-to-SpeechESPnet JETS
TranscriptionWhisper
TranslationOPUS Model Series

Models can be loaded as either a path from the Hugging Face Hub or a local directory. Model paths are optional, defaults are loaded when not specified. For tasks with no recommended model, txtai uses the default models as shown in the Hugging Face Tasks guide.

See the following links to learn more.

Powered by txtai

The following applications are powered by txtai.

ApplicationDescription
ragRetrieval Augmented Generation (RAG) application
ragdataBuild knowledge bases for RAG
paperaiSemantic search and workflows for medical/scientific papers
annotateaiAutomatically annotate papers with LLMs

In addition to this list, there are also many other open-source projects, published research and closed proprietary/commercial projects that have built on txtai in production.

Further Reading

Documentation

Full documentation on txtai including configuration settings for embeddings, pipelines, workflows, API and a FAQ with common questions/issues is available.

Contributing

For those who would like to contribute to txtai, please see this guide.

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

txtai is an all-in-one embeddings database for semantic search, LLM orchestration and language model workflows. All functionality can be served via it's API and the API supports MCP.

Docs: https://neuml.github.io/txtai/api/mcp/

  1. Use Cases
    1. Semantic Search
    2. LLM Orchestration
    3. Language Model Workflows
  2. Installation
    1. Model guide
      1. Powered by txtai
        1. Further Reading
          1. Documentation
            1. Contributing

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol (MCP) server that enables semantic search and retrieval of documentation using a vector database (Qdrant). This server allows you to add documentation from URLs or local files and then search through them using natural language queries.
                Last updated -
                14
                74
                JavaScript
                Apache 2.0
                • Apple
              • -
                security
                A
                license
                -
                quality
                An MCP server implementation that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context. Uses Ollama or OpenAI to generate embeddings. Docker files included
                Last updated -
                19
                14
                TypeScript
                MIT License
                • Apple
                • Linux
              • A
                security
                A
                license
                A
                quality
                An MCP server that connects to Tana's Input API, allowing Large Language Models and other MCP clients to create and manipulate data in Tana workspaces.
                Last updated -
                11
                13
                4
                TypeScript
                MIT License
                • Linux
                • Apple
              • -
                security
                F
                license
                -
                quality
                A TypeScript-based MCP server that enables LLM agents to interact with Gel databases through natural language, providing tools to learn database schemas, validate and execute EdgeQL queries.
                Last updated -
                5
                TypeScript

              View all related MCP servers

              ID: s7xgb8h2zz