mattv8

ragtime: Self-Host a RAG API and MCP Server

Ragtime connects local knowledge and tools to LLM clients through a self-hosted, OpenAI-compatible RAG API, MCP server, and built-in chat UI. It supports FAISS and PostgreSQL pgvector indexes, plus hosted and local model providers.

ActivePythonMITSelf HostedMCPRAG
Stars
34
Forks
10
Last commit
3 days ago
Contributors
3
Releases, 12 months
4

Our take

Activeregular commits and releases

Health score

51/100

How it is scored
Activity
70
Community
14
Issues
47
Pull requests
74
  • Merges more pull requests than 76% of the projects we track
  • Fewer contributors than 82% of the projects we track

Ragtime is an actively maintained, feature-rich self-hosted RAG and agent integration service, but its development is heavily concentrated in one contributor.

Good fit if

  • You want one self-hosted service for a RAG API, MCP connections, and a web chat UI.
  • Your clients need OpenAI-compatible chat or MCP access to indexed files and configured tools.
  • You can operate its Docker Compose stack and review its tool-access and network security settings.

Look elsewhere if

  • You need a lightweight library or a single-purpose vector search component rather than a full service.
  • You cannot accept a project whose contributions come overwhelmingly from one person.
  • Your deployment cannot run Docker Compose with PostgreSQL and the other bundled services.
All health signals
Last commit2026-10-12 (3 days ago)
Commits, last 90 days100+
Releases, last 12 months4 (latest v1.2.0, 2026-10-13)
Contributors3 (top contributor: 98% of commits)
Issues closed, last 90 days1
Pull requests merged, last 90 days51 (typically merged in 0 days)
Project age10 months

Checked on 2026-10-16 with the GitHub API.

Overview

Ragtime is a self-hosted RAG service that brings local knowledge and configured tools into existing LLM clients. It combines an OpenAI-compatible chat API, an MCP server, and a built-in chat UI, with FAISS or PostgreSQL pgvector as vector-store options.

It is aimed at people who want to connect indexed files, repositories, databases, and other tools to coding assistants or OpenAI-compatible clients without relying on a separate hosted RAG service. The project supports hosted and local model providers, and also includes workspace previews for agent-driven development.

Key Features

  • OpenAI-compatible /v1/chat/completions endpoint with streaming for compatible clients.
  • MCP tools exposed over HTTP Streamable or stdio transports, with configurable authentication.
  • Built-in chat UI with tool visualization, charts, tables, and sandboxed HTML components.
  • Index uploads, Git repositories, and filesystems with FAISS or pgvector; schema and PDM indexes use pgvector.
  • Configure hosted services and local runtimes including OpenAI, Anthropic, Ollama, llama.cpp, and LM Studio.
  • Workspaces combine files, conversations, tools, and isolated runtime previews.
  • Tool safeguards include SQL allowlist patterns, query LIMIT enforcement, and optional write-operation controls.

Use Cases

  • A self-hosting team can index internal documentation or repositories and query them from an OpenAI-compatible client.
  • Developers using Claude Desktop, VS Code Copilot, Cursor, or JetBrains IDEs can expose configured tools and knowledge through MCP.
  • Teams with local model runtimes can connect indexed knowledge to those models while keeping the service and indexes on their own infrastructure.
  • An organization working with databases or business systems can let assistants query configured tools, subject to its own permissions and security controls.

What you need

Detected in the repository

  • Python >=3.10 (from pyproject.toml)
  • A Compose file to run it with its related services
  • A test suite and automated checks on GitHub Actions

License in plain words

MITpermissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the copyright and license notice
  • Share your changes: no

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

The README's Compose setup requires Docker and Docker Compose. Create a .env file from .env.example, set credentials, then start the stack:

docker compose up -d

See the README for the Compose configuration, provider setup, and security guidance.

Alternatives

  • rag-web-ui: RAG Web UI focuses on document ingestion and web-based question answering, while ragtime also exposes an OpenAI-compatible RAG API and MCP server.
  • rag-agent-platform: rag-agent-platform combines retrieval with configurable agents and MCP tools in a Java and Next.js stack, while ragtime centers on RAG access through its API, MCP server, and chat UI.
  • MaxKB: MaxKB emphasizes building agents with workflows and external tools, while ragtime focuses on serving local knowledge through RAG APIs, MCP, and chat.
ProjectLanguageLicenseStarsStatus
ragtimePythonMIT34Active
rag-web-uiTypeScriptApache-2.03.3kQuiet
rag-agent-platformJavaMIT89Active
MaxKBPythonGPL-3.022.9kActive

Considerations

  • The project is active, with regular commits and releases, but the measured contributor base is small and highly concentrated. That is a maintenance and continuity consideration for production adopters.
  • The recommended deployment is a multi-service Docker Compose stack, including PostgreSQL with pgvector, a runtime service, and SearXNG. This is more operational work than adopting a standalone library.
  • Tool access can include database queries, SSH, shell execution, and workspace operations. The README warns that read-only controls are guardrails, not complete isolation; deployments need carefully scoped credentials and network boundaries.
  • Some capabilities require elevated container or host permissions. Workspace preview isolation can fall back to chroot when mount authority is unavailable, and changing runtime isolation modes can risk snapshot history.
  • The project is MIT-licensed. Review the license and any obligations of the external services or models you configure.

Found this useful?

Share it with someone who would like ragtime.