Content
# VibbersBlog
> An ultra-lightweight, MCP-powered headless CMS designed for AI agents to write, edit, and publish blogs or custom pages directly into production.
[](https://www.python.org/)
[](https://fastapi.tiptap.dev/)
[](https://modelcontextprotocol.io/)
VibbersBlog bridges the gap between your code repository and your publishing platform. Instead of managing complex admin panels, you equip your favorite AI Agent with the **Model Context Protocol (MCP)** tools provided by this app and let it build your content, templates, or landing pages for you.
---
## Key Architectural Insights
### 1. In-Memory Jinja2 Templates (RAM-Cached)
To achieve extreme speed, VibbersBlog caches templates directly in **RAM** instead of reading raw HTML files from the disk on every page render.
> [!WARNING]
> **Scale Consideration:** While this makes page delivery blisteringly fast, hosting thousands of complex, highly distinct templates on a resource-constrained server (e.g., a 512MB/1GB RAM VPS) will increase idle memory usage. Keep your template collection curated!
### 2. "Everything is a Blog" (Dynamic Routing)
The application handles layouts using two simple concepts:
- **Templates:** Skeleton HTML files containing structure and standard Jinja/template slots (e.g., `{{title}}`, `{{content}}`) but containing no actual post data.
- **Blogs:** The raw content payload. Although named "blogs", a blog instance can be designated as a custom page (using the `is_blog=False` schema flag).
Combined with the wildcard route (`/{slug}`), you can serve anything from conventional blog entries to complex, single-page landing structures.
---
## MCP Tools Exposed
The application registers **10 MCP tools** allowing agents to manage layout and content lifecycle:
- **Templates:** Create, read list, edit, and delete presentation layouts.
- **Content:** Publish blogs, modify text payloads, delete articles, or retrieve page components dynamically.
---
## Getting Started
### 1. Prerequisites
Ensure you have [uv](https://github.com/astral-sh/uv) installed (a fast Python package installer and resolver).
### 2. Installation & Setup
```bash
# Clone the repository
git clone https://github.com/your-username/vibbers-blog.git
cd vibbers-blog
# Install dependencies using uv
uv sync
# Configure your database details inside your environment or config file
```
### 3. Running the Server
#### Start the FastAPI Web Engine:
```bash
# Change to the application directory and run Uvicorn
cd app
uvicorn main:app --reload --port 8000
```
#### Start the MCP Agent Server:
In a new terminal window:
```bash
python app/mcp_main.py
```
Now both your public-facing site (FastAPI) and the background agent channel (MCP) are active!
---
## Connecting Your Agent
To hook VibbersBlog up to your development agent (like Claude Desktop, cursor, or custom wrappers), register it in your agent's `mcp.json` file:
```json
{
"mcpServers": {
"vibbers_blog": {
"transport": "streamable-http",
"url": "http://localhost:6767/mcp",
"headers": {
"vb-mcp-api-key": "your_api_key"
}
}
}
}
```
Alternatively, paste the snippet above into your workspace chat window and instruct your Agent:
> _"Register this HTTP MCP server to access my website database and templates."_
See [app/mcp_connect.py](/app/mcp_connect.py) for a boilerplate implementation on how to connect programmatically using LangChain.
---