Derafu Content

Your Markdown, as a website and as a tool for AI agents.

Your content is an asset, not just text

Documentation, FAQs, courses and a blog take time to write. Derafu Content turns the folder where they live into a website, and gives the same content to every reader that is not a browser: a PDF, a JSON feed for your search, an AI agent.

The documentation and the blog you are reading are served by it.

How it works

There is no build step and no database. The folders are the source.

Write Markdown in folders

One file per page. A folder with a file of the same name is a section. The date of a post is in its file name.

Turn on what you need

Docs, blog, academy, FAQ and pages are plugins. Each one is enabled with a few lines of configuration.

Publish a website

Navigation, sidebar, tags, authors, archives, an RSS feed and a sitemap come from the files and their metadata.

Serve machines too

Every page is also available as Markdown, PDF and JSON, and an MCP endpoint lets AI agents read your content.

One core, several kinds of content

Every plugin adds one content type or one capability on top of the same core.

One source, every format

What you write once and what you get.

resources/content/
├── docs/
│   ├── getting-started.md                          → /docs/getting-started
│   └── getting-started/
│       ├── installation.md                         → /docs/getting-started/installation
│       └── installation/
│           └── _attachments/
│               └── diagram.png                     → /docs/getting-started/installation/_attachments/diagram.png
├── faq/
│   └── billing.md                                  → /faq/billing
└── blog/
    └── 2026-11-03-first-post.md                    → a post, dated 2026-11-03 by its file name

# A folder needs a file with the same name to be a page of its own
# (getting-started.md for getting-started/); that is how sections nest.
---
title: "Installing the package"
description: "A one-sentence summary of the page."
tags: ["Getting started"]
authors: "Derafu"
draft: false            # A draft is only visible on localhost or with APP_ENV=local.
sidebar_position: 2     # Lower numbers go first in the sidebar.
---

# Installing the package

Plain Markdown from here on.
/docs/getting-started                  the page as HTML, with sidebar and navigation
/docs/getting-started.md               the same page as Markdown
/docs/getting-started.pdf              the same page as PDF
/docs/getting-started.json             the same page as JSON

/docs/getting-started.pdf?full=1       the page and all its children in one PDF,
                                       with a cover and a table of contents

# The format can also be chosen with the Accept header of the request.
# Every indexable item of every content type, as one JSON list,
# ready for a search or indexing pipeline.
GET /api/content.json?type=docs&tag=billing&limit=20&page=1

{
  "meta": { "count": 424, "url": "https://example.com/", "generated": "2026-11-03 10:00:00" },
  "data": [
    {
      "type": "docs",
      "uri": "billing/cancel-an-invoice",
      "title": "Cancel an invoice",
      "description": "Steps to cancel an electronic tax document",
      "tags": [{ "name": "billing", "slug": "billing", "count": 12 }],
      "date": "2026-03-12"
    }
  ]
}
# An MCP server (JSON-RPC 2.0 over Streamable HTTP) in one endpoint.
# Claude, Cursor and any other MCP client can use it as a tool.
POST /api/content/mcp

get_content       the full Markdown and the metadata of one item
search_content    a search across docs, blog, FAQ, pages and academy,
                  through the search engine you connect
ask               an answer written by an LLM from your content
                  (off until you enable it and give it an LLM)

Frequently asked questions

What it does, and what it leaves to you.

No. Agents can search and read your content, but they cannot create or edit it. The plugin has no authentication or rate limiting of its own, so protect the endpoint in your HTTP stack.

For search, yes. The search plugin sends the queries to the search service you configure (the documentation uses Qdrant as the example): Content does not index anything by itself. Without it, search_content has nothing to search, and get_content keeps working.

Within a minute. There is no build step: the tree of pages is read from the files and cached for 60 seconds. Rendered pages are not cached, so put a CDN or a reverse proxy in front if you need HTTP caching.

PHP 8.5 or later. The MCP plugin also needs the official mcp/sdk package, which you add yourself. Derafu packages are published as dev-main for now.

Where it fits

Other good tools exist. Choose by how you work.

Approach Examples Choose it when Derafu Content instead
Static site generators Hyde, Cecil, Sculpin You want to host plain static files. Pages are served when requested: no build step, and each page can also be asked for as Markdown, PDF or JSON.
Publishing packages for one framework Prezet, Ink (Laravel) You already work in that framework. It is not tied to a framework: it has a Symfony bundle and works with the Derafu stack.
Flat-file CMS Statamic, Grav Editors need an admin panel. It is a library for sites whose source is a folder of Markdown files, with no admin and no database.

Install it

Start with the library, or with the Symfony bundle if you use Symfony.

# The Derafu packages are published as dev-main for now, so your composer.json needs:
#   "minimum-stability": "dev", "prefer-stable": true
composer require derafu/content

# In a Symfony application:
composer require derafu/symfony-content-bundle

Next: the documentation has the configuration of every plugin.

Want to see it working?

You are looking at it: this website's documentation and blog are served by Derafu Content.