Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions blog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Blog MCP

AI-powered blog writing assistant with tone of voice and visual style guides.

## Overview

The Blog MCP helps AI agents write blog articles with consistent voice and style. It provides:

- **Prompts** for setting up blogs, creating style guides, and writing articles
- **Tools** for generating cover images and validating article structure
- **Resources** with templates for tone of voice and visual style guides

## Key Concept

Articles are stored as **markdown files with YAML frontmatter** in the git repository. The MCP guides the workflow - the agent reads/writes files directly. This enables:

- Git-based version control for all content
- Easy integration with static site generators
- Future compatibility with deco.cx git-based editor

## File Structure

```
project/
└── blog/ # Blog folder
├── tone-of-voice.md # Writing style guide
├── visual-style.md # Image generation style guide
├── config.json # Optional: default tags, author info
└── articles/ # Article markdown files
├── my-first-post.md
└── another-article.md
```

## Article Format

Each article is a markdown file with YAML frontmatter:

```markdown
---
slug: my-first-post
title: "My First Post"
description: "A brief description for SEO"
date: 2025-01-27
status: draft
coverImage: /images/articles/my-first-post.png
tags:
- technology
- writing
---

Article content in markdown...
```

## Prompts

| Prompt | Description |
|--------|-------------|
| `SETUP_PROJECT` | Initialize blog structure (blog/, blog/articles/) |
| `TONE_OF_VOICE_TEMPLATE` | Create a writing style guide |
| `VISUAL_STYLE_TEMPLATE` | Create a visual style guide for images |
| `WRITE_ARTICLE` | Workflow for writing new articles |
| `EDIT_ARTICLE` | Workflow for editing existing articles |

## Tools

### Helpers

| Tool | Description |
|------|-------------|
| `COVER_IMAGE_GENERATE` | Generate cover image using IMAGE_GENERATOR binding |
| `ARTICLE_FRONTMATTER` | Generate valid YAML frontmatter for an article |
| `ARTICLE_VALIDATE` | Validate article structure and frontmatter |

### Filesystem (requires LOCAL_FS binding)

| Tool | Description |
|------|-------------|
| `BLOG_READ_STYLE_GUIDE` | Read tone-of-voice.md or visual-style.md |
| `BLOG_LIST_ARTICLES` | List all articles in blog/articles/ |
| `BLOG_READ_ARTICLE` | Read an article by slug |
| `BLOG_WRITE_ARTICLE` | Write/create an article |
| `BLOG_DELETE_ARTICLE` | Delete an article |

## Resources

| Resource | Description |
|----------|-------------|
| `resource://tone-of-voice-template` | Template for creating tone of voice guides |
| `resource://visual-style-template` | Template for creating visual style guides |

## Bindings

| Binding | Required | Description |
|---------|----------|-------------|
| `LOCAL_FS` | Optional | Local filesystem - select a folder with a `blog/` subfolder |
| `IMAGE_GENERATOR` | Optional | Image generation (nanobanana) for cover images |

When `LOCAL_FS` is connected, the blog MCP becomes fully self-contained and can read/write articles directly.

## Quick Start

1. **Setup project**: Run `SETUP_PROJECT` prompt
2. **Create tone of voice**: Run `TONE_OF_VOICE_TEMPLATE` prompt
3. **Create visual style**: Run `VISUAL_STYLE_TEMPLATE` prompt
4. **Write articles**: Run `WRITE_ARTICLE` prompt

## Development

```bash
# Install dependencies
bun install

# Run locally
bun run dev

# Type check
bun run check

# Build for production
bun run build
```

## License

MIT
26 changes: 26 additions & 0 deletions blog/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"scopeName": "deco",
"name": "blog",
"friendlyName": "Blog",
"connection": {
"type": "HTTP",
"url": "https://sites-blog.decocache.com/mcp"
},
"description": "AI-powered blog writing assistant with tone of voice and visual style guides.",
"icon": "https://assets.decocache.com/decocms/blog-icon.png",
"unlisted": false,
"bindings": {
"OBJECT_STORAGE": {
"binding": "@deco/object-storage",
"description": "Select a folder containing a blog/ subfolder with articles/, tone-of-voice.md, and visual-style.md"
},
"IMAGE_GENERATOR": "@deco/nanobanana"
},
"metadata": {
"categories": ["Productivity", "Content"],
"official": false,
"tags": ["blog", "writing", "articles", "tone-of-voice", "markdown"],
"short_description": "Write blog articles with consistent voice and style.",
"mesh_description": "The Blog MCP helps AI agents write blog articles with consistent tone of voice and visual style. It provides prompts for setting up a blog project, creating tone of voice guides, visual style guides for cover images, and workflows for writing and editing articles. Articles are stored as markdown files with YAML frontmatter in the git repository. The MCP includes tools for generating cover images and validating article structure. Ideal for personal blogs, company blogs, or any content that requires consistent voice and style."
}
}
Loading
Loading