
hugo frontmatter mcp
An MCP for interacting with hugo frontmatters
Repository Info
About This Server
An MCP for interacting with hugo frontmatters
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Hugo Frontmatter MCP
A Model Context Protocol (MCP) server for managing and automating frontmatter operations in Hugo Markdown files. This tool provides a set of programmatic APIs for reading, updating, and validating YAML frontmatter fields, as well as batch operations for tags, images, and date formats across directories.
Features
- Read and update any frontmatter field in a Hugo Markdown file
- Add/remove tags and images in frontmatter lists
- Set or update title, date, publishDate, description, and draft status
- Batch operations: list all tags, find posts by tag, rename tags, validate date formats
- Designed for automation and integration with other MCP tools
Installation & Usage
Installing via Smithery
To install hugo-frontmatter-mcp for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @wdm0006/hugo-frontmatter-mcp --client claude
Manual Installation
- Clone the repository:
git clone https://github.com/wdm0006/hugo-frontmatter-mcp.git cd hugo-frontmatter-mcp - Install uv if you don't have it:
pip install uv - Run the MCP server:
uv run --with mcp --with python-frontmatter hugo_frontmatter_mcp.py
API / Tools
The following tools are available:
get_frontmatter(file_path)– Get all frontmatter fieldsget_field(file_path, field_name)– Get a specific fieldset_title(file_path, title)– Set the titleset_date(file_path, date_value)– Set the date (YYYY-MM-DD)set_publish_date(file_path, publish_date_value)– Set the publishDateset_description(file_path, description)– Set the descriptionset_draft_status(file_path, draft_status)– Set draft status (True/False)add_tag(file_path, tag_to_add)/remove_tag(file_path, tag_to_remove)– Add/remove tagsadd_image(file_path, image_path_to_add)/remove_image(file_path, image_path_to_remove)– Add/remove imageslist_tags_in_directory(directory_path_str, recursive=True)– List all tags in a directoryfind_posts_by_tag(directory_path_str, tag_to_find, recursive=True)– Find posts with a specific tagrename_tag_in_directory(directory_path_str, old_tag, new_tag, recursive=True)– Rename a tag across postsvalidate_date_formats(directory_path_str, field_name="date", expected_format_str="%Y-%m-%d", recursive=True)– Validate date formats
All file and directory paths must be absolute.
License
This project is licensed under the MIT License. See LICENSE for details.
Quick Start
Clone the repository
git clone https://github.com/wdm0006/hugo-frontmatter-mcpInstall dependencies
cd hugo-frontmatter-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.