# ragtime: Self-Host a RAG API and MCP Server

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/mattv8-ragtime
Generated for open source discovery and AI-assisted research.

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.

GitHub: https://github.com/mattv8/ragtime
OSRepos URL: https://osrepos.com/repo/mattv8-ragtime

## Summary

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.

## Topics

- python
- self-hosted
- mcp
- rag
- mcp-server
- vector-database
- knowledge-base

## Repository Information

Last analyzed by OSRepos: Fri Oct 16 2026 08:48:27 GMT+0100 (Western European Summer Time)
Detail views: 3
GitHub clicks: 3

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## 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.

## Our Take

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.

## Project Health

| Signal | Value |
|---|---|
| Status | **Active**: regular commits and releases |
| Last commit | 2026-10-12 (3 days ago) |
| Commits, last 90 days | 100+ |
| Releases, last 12 months | 4 (latest v1.2.0, 2026-10-13) |
| Contributors | 3 (top contributor: 98% of commits) |
| Issues closed, last 90 days | 1 |
| Pull requests merged, last 90 days | 51 (typically merged in 0 days) |
| Project age | 10 months |

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

## Project Facts

- Language: Python
- License: MIT
- Stars: 34
- Forks: 10
- Archived: no

## 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

## 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:

```bash
docker compose up -d
```

See the [README](https://github.com/mattv8/ragtime) for the Compose configuration, provider setup, and security guidance.

## License in Plain Words

**MIT** (permissive).

- 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.

## Alternatives

- [rag-web-ui](https://osrepos.com/repo/rag-web-ui-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](https://osrepos.com/repo/nedonion-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](https://osrepos.com/repo/1panel-dev-maxkb): MaxKB emphasizes building agents with workflows and external tools, while ragtime focuses on serving local knowledge through RAG APIs, MCP, and chat.

| Project | Language | License | Stars | Status |
|---|---|---|---|---|
| **ragtime** | Python | MIT | 34 | Active |
| [rag-web-ui](https://osrepos.com/repo/rag-web-ui-rag-web-ui) | TypeScript | Apache-2.0 | 3.3k | Quiet |
| [rag-agent-platform](https://osrepos.com/repo/nedonion-rag-agent-platform) | Java | MIT | 89 | Active |
| [MaxKB](https://osrepos.com/repo/1panel-dev-maxkb) | Python | GPL-3.0 | 22.9k | Active |

## 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](https://github.com/mattv8/ragtime/blob/beta/LICENSE) and any obligations of the external services or models you configure.