Skip to content

Repository files navigation

Doctail logo

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.


Next.js React TypeScript Tailwind CSS Prisma FastMCP MCP

Website  ·  Get Beta Access  ·  Report a Bug


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

1. Clone & install

git clone https://github.com/Soundpulse/doctail.git
cd doctail
bun install

2. Configure environment

Create a .env file in the project root:

# 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

bunx prisma migrate deploy   # apply schema
bun run db:seed              # seed the library catalog

4. Run the dev server

bun run dev

Open http://localhost:3000 to see the app.

🐳 Running the MCP server

The doctail-mcp server is a standalone FastMCP app that fetches and serves documentation.

With Docker (recommended) — builds the image and wires it to your database:

bun run init-mcp

Standalone with the CLI:

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.

📄 License

© Doctail.ai. All rights reserved. Please contact the maintainers regarding usage and licensing.


Doctail

Built for developers who are tired of AI hallucinating their APIs.

doctail.ai

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages