Content
<div align="center">
<img src="public/green_circle.png" alt="Doctail logo" width="96" height="96" />
# Doctail.ai
### The MCP Rollup Cloud
**Stop shipping bad code. Inject accurate context into your AI.**
Select your docs 📚 · one-click deploy 🚀 · build with confidence 💪
Unified documentation and MCP servers, delivered through a single endpoint.
<br />
[](https://nextjs.org/) [](https://react.dev/) [](https://www.typescriptlang.org/) [](https://tailwindcss.com/) [](https://www.prisma.io/) [](https://github.com/jlowin/fastmcp) [](https://modelcontextprotocol.io/)
[Website](https://doctail.ai) · [Get Beta Access](https://doctail.ai/beta) · [Report a Bug](https://github.com/Soundpulse/doctail/issues)
</div>
---
## What is Doctail?
AI coding assistants are only as good as the context they're given. When they hallucinate outdated APIs or invent library methods, it's usually because they're missing the *right* documentation at the *right* time.
**Doctail** fixes that. Pick the libraries and frameworks your project depends on, and Doctail rolls their documentation up into a single, deployable **Model Context Protocol (MCP)** endpoint. Point your AI tool — Claude, Cursor, Windsurf, or any MCP-compatible client — at that endpoint, and it always builds against accurate, up-to-date docs.
> One endpoint. Every doc your project needs. Zero hallucinated APIs.
## ✨ Features
- **📚 Curated documentation library** — 50+ integrated libraries and tools (Next.js, Supabase, Stripe, Clerk, Drizzle, LangGraph, FastMCP, and many more).
- **🧩 Rollup into one endpoint** — bundle every doc source your project needs behind a single MCP URL.
- **🚀 One-click deploy** — provision a project and get a ready-to-use MCP server without touching infrastructure.
- **🔌 Works with your AI** — drop-in compatible with any Model Context Protocol client (Claude, Cursor, Windsurf, IDE extensions, agents, and more).
- **⚡ `llms.txt`-native** — fetches and parses `llms.txt` documentation sources on demand.
- **🐳 Self-hostable** — the MCP server ships as a Docker image and a standalone Python CLI.
## 🏗️ How it works
```
You Doctail Cloud Your AI
┌────────┐ ┌──────────────────┐ ┌──────────────┐
│ Select │ │ Next.js app │ │ Claude / │
│ docs ├───────▶│ + Postgres │ │ Cursor / │
└────────┘ │ (your rollup) │ │ Windsurf │
└────────┬─────────┘ └──────┬───────┘
│ single MCP endpoint │
│ /mcp?project_ref=... │
▼ │
┌──────────────────┐ │
│ doctail-mcp │◀───────────────────┘
│ (FastMCP server) │ fetch accurate docs
│ fetches llms.txt │
└──────────────────┘
```
1. **Select** the libraries your project uses in the Doctail app.
2. Doctail stores your selection as a **project** and exposes a stable **MCP endpoint** (`/mcp?project_ref=…`).
3. Your AI client calls the endpoint; the **`doctail-mcp`** server fetches and serves the exact documentation for those libraries.
## 📦 Repository structure
This repo contains both halves of the platform:
| Path | What it is |
| --- | --- |
| `app/` | Next.js 16 app — landing page, beta flow, and API routes (`/api/instances`, `/api/library-endpoints`, `/mcp`). |
| `components/` | Atomic-design React UI (`atoms/`, `molecules/`, `organisms/`). |
| `lib/` | Prisma client and shared utilities. |
| `prisma/` | Database schema and seeds (`Library`, `Project`, `ProjectLibrary`). |
| `doctail-mcp/` | Python **FastMCP** server that fetches `llms.txt` docs — Dockerized, with a `doctail` CLI. |
| `scripts/` | Helper scripts, including `init-mcp.sh` to build & run the MCP container. |
| `public/` | Static assets and integration icons. |
## 🚀 Getting started
### Prerequisites
- [Node.js](https://nodejs.org/) 20+ and [Bun](https://bun.sh/) (or npm / pnpm)
- A PostgreSQL database (the project targets [Supabase](https://supabase.com/))
- [Docker](https://www.docker.com/) and [Python](https://www.python.org/) 3.10+ (only for the MCP server)
### 1. Clone & install
```bash
git clone https://github.com/Soundpulse/doctail.git
cd doctail
bun install
```
### 2. Configure environment
Create a `.env` file in the project root:
```bash
# Database (PostgreSQL / Supabase)
DATABASE_URL="postgresql://..."
DIRECT_URL="postgresql://..."
SUPABASE_KEY="your-supabase-key"
# MCP server the app proxies to
MCP_ENDPOINT="http://localhost:8082"
# Transactional email
RESEND_API_KEY="your-resend-key"
# App
NEXT_PUBLIC_BASE_URL="http://localhost:3000"
```
### 3. Set up the database
```bash
bunx prisma migrate deploy # apply schema
bun run db:seed # seed the library catalog
```
### 4. Run the dev server
```bash
bun run dev
```
Open [http://localhost:3000](http://localhost:3000) to see the app.
## 🐳 Running the MCP server
The `doctail-mcp` server is a standalone [FastMCP](https://github.com/jlowin/fastmcp) app that fetches and serves documentation.
**With Docker (recommended)** — builds the image and wires it to your database:
```bash
bun run init-mcp
```
**Standalone with the CLI:**
```bash
cd doctail-mcp
pip install -e .
# Serve a library's llms.txt over HTTP
doctail --urls LangGraph:https://langchain-ai.github.io/langgraph/llms.txt \
--transport http --host 0.0.0.0 --port 8082
```
Run `doctail --help` for all options (YAML/JSON config, allowed domains, timeouts, transports). See `doctail-mcp/env.example` for its environment variables.
## 🛠️ Tech stack
| Layer | Technology |
| --- | --- |
| Frontend | Next.js 16, React 19, Tailwind CSS 4, shadcn/ui |
| Backend | Next.js API routes, Prisma ORM |
| Database | PostgreSQL (Supabase) |
| MCP server | Python, FastMCP, httpx, markdownify |
| Email | Resend |
| Infra | Docker |
## 🤝 Contributing
Contributions are welcome! To propose a change:
1. Fork the repo and create a feature branch (`git checkout -b feature/my-change`).
2. Make your changes and run the linter (`bun run lint`).
3. Open a pull request against `main` describing what and why.
Found a bug or have an idea? [Open an issue](https://github.com/Soundpulse/doctail/issues).
## 📄 License
© Doctail.ai. All rights reserved. Please contact the maintainers regarding usage and licensing.
---
<div align="center">
<img src="public/green_circle.png" alt="Doctail" width="40" height="40" />
**Built for developers who are tired of AI hallucinating their APIs.**
[doctail.ai](https://doctail.ai)
</div>