generic-blog-mcp
v1.0.0
Published
Generic MCP server for posting content to any blog platform
Maintainers
Readme
Generic Blog MCP Server
A Model Context Protocol (MCP) server for publishing content to any blog platform. This MCP server enables direct blog publishing through Claude Code or other MCP clients.
Features
- ✅ Publish blog posts directly from conversations
- ✅ Support for HTML content
- ✅ Configurable post status (published/unpublished/unlisted)
- ✅ Support for images and custom URLs
- ✅ Blog status information
Installation
1. Install the package
npm install generic-blog-mcp2. Environment Configuration
Set up the required environment variables for your blog platform:
export BLOG_API_KEY="your-api-key-here"
export BLOG_API_URL="https://your-blog.com/api/posts/"
export BLOG_URL="https://your-blog.com"Or create a .env file:
BLOG_API_KEY=your-api-key-here
BLOG_API_URL=https://your-blog.com/api/posts/
BLOG_URL=https://your-blog.com3. Configure Claude Code
Add the following configuration to your Claude Code settings:
Option 1: Via Claude Code UI
- Open Claude Code settings
- Find the MCP Servers section
- Add a new server:
- Name:
blog-mcp - Command:
npx - Args:
["generic-blog-mcp"]
- Name:
Option 2: Manual configuration
Find your Claude Code configuration file (usually at ~/.claude-code/config.json), and add:
{
"mcpServers": {
"blog-mcp": {
"command": "npx",
"args": ["generic-blog-mcp"],
"env": {
"BLOG_API_KEY": "your-api-key-here",
"BLOG_API_URL": "https://your-blog.com/api/posts/",
"BLOG_URL": "https://your-blog.com"
}
}
}
}4. Restart Claude Code
Restart Claude Code to load the new MCP server.
Usage
Once configured, you can use the following features in Claude Code conversations:
Publishing a blog post
Please help me publish a blog post:
Title: My first post via MCP
Content: This is a test post published through the MCP server, with <strong>HTML support</strong>!Publishing a post with image
Publish a blog post:
Title: Post with image
Content: This post contains an image
Image: https://example.com/image.jpgPublishing a draft
Publish a draft post:
Title: Draft post
Content: This is a draft
Status: unpublishedCheck blog status
Check blog statusAvailable Tools
post_blog - Publish a blog post
title(required): Post titlecontent(required): Post content (HTML format)status(optional): Post status (published/unpublished/unlisted)image(optional): Image URLurl(optional): Custom URL
get_blog_status - Get blog status information
list_recent_posts - List recent posts information
Post Status Options
- published: Publicly visible on blog homepage and RSS feed
- unpublished: Hidden, not displayed anywhere (admin only)
- unlisted: Not shown on homepage or RSS, but accessible via direct link
Platform Compatibility
This MCP server is designed to work with various blog platforms. You may need to adjust:
- API endpoint format: Modify the
BLOG_API_URLto match your platform's API - Authentication method: The server uses Bearer token authentication by default
- Request payload: The server sends standard blog post data (title, content, status, etc.)
Security
- API key is configured via environment variables for security
- Ensure your API key is kept secure and not committed to version control
- Regularly rotate your API keys
- Use HTTPS endpoints for all API communications
Troubleshooting
MCP Server not loading
- Check Node.js version (requires >= 18.0.0)
- Verify dependencies are installed (
npm install) - Check configuration file paths
- Review Claude Code logs for error messages
API calls failing
- Verify network connectivity
- Check if API key is valid and set correctly
- Confirm blog API is enabled
- Ensure environment variables are properly configured
Testing
You can test the MCP server directly:
npm startThen try publishing a test post in Claude Code!
Development
To run in development mode:
npm run devChangelog
- v1.0.0: Initial release with basic blog publishing functionality
