Blogger MCP Server

Blogger MCP Server

Enables AI assistants to interact with the Google Blogger API v3 to manage blog posts and metadata. It supports the full post lifecycle including creating, updating, publishing, and deleting content through natural language.

Category
访问服务器

README

Blogger MCP Server

An MCP (Model Context Protocol) server that provides Claude and other MCP-compatible AI assistants with full access to the Google Blogger API v3. Supports reading, creating, updating, publishing, and deleting blog posts through natural language.

Features

  • Blog management — List all blogs under your account, get blog metadata
  • Post lifecycle — Create drafts, edit, publish, revert to draft, delete
  • Read operations — List posts, retrieve individual posts, search by keyword
  • Draft-first workflow — Posts are created as drafts by default for safety, then published explicitly
  • Dual authentication — API Key for read-only access, OAuth 2.0 for full read/write access
  • File-based content — Load post content from local HTML files (recommended for content > 10KB)
  • Automatic token management — OAuth tokens are cached, refreshed, and persisted automatically to ~/.config/mcp-blogger/
  • Default blog — Set DEFAULT_BLOG_ID to skip passing blogId on every tool call

Project Structure

mcp-blogger/
├── index.js          # Main MCP server — tool definitions and handlers
├── oauth.js          # OAuth 2.0 authentication flow
└── package.json      # Project metadata and dependencies

Prerequisites

  • Node.js >= 22
  • A Google Cloud project with the Blogger API enabled
  • A Blogger API Key (for read operations) and/or OAuth 2.0 credentials (for write operations)

Installation

git clone https://github.com/aleck31/mcp-blogger.git
cd mcp-blogger
npm install

Authentication

This server supports two authentication methods. At least one must be configured:

  • API Key only — read-only operations (get_blog_info, list_posts, get_post, search_posts)
  • OAuth only — full read and write operations
  • Both — API Key for reads, OAuth for writes

1. Get a Blogger API Key (read-only access)

  1. Go to the Google Cloud Console
  2. Create a project (or select an existing one)
  3. Enable the Blogger API v3 under APIs & Services > Library
  4. Go to APIs & Services > Credentials
  5. Click Create Credentials > API key
  6. Copy the generated API key

2. Get OAuth 2.0 Credentials (read + write access)

  1. In the same Google Cloud project, go to APIs & Services > Credentials
  2. Click Create Credentials > OAuth client ID
  3. Select Web application as the application type
  4. Add http://localhost:3000/oauth/callback to Authorized redirect URIs
  5. Copy the Client ID and Client Secret

3. OAuth Flow (automatic)

On the first write operation, the server will automatically:

  1. Start a temporary local HTTP server on port 3000
  2. Open your browser to the Google OAuth consent page
  3. After you grant access, capture the authorization code via the callback URL
  4. Exchange the code for access and refresh tokens
  5. Persist tokens to ~/.config/mcp-blogger/tokens.json

Subsequent write operations reuse cached tokens and refresh them automatically when expired. The OAuth flow times out after 5 minutes if not completed.

Configuration

Set the following environment variables in your MCP client configuration:

Variable Required Description
BLOGGER_API_KEY For read ops Google Blogger API key
GOOGLE_CLIENT_ID For write ops OAuth 2.0 Client ID
GOOGLE_CLIENT_SECRET For write ops OAuth 2.0 Client Secret
DEFAULT_BLOG_ID No Default Blog ID, used when blogId is omitted from tool calls

MCP Config Example

Add the server to your Agent MCP configuration file (such as mcp_config.json):

{
  "mcpServers": {
    "blogger": {
      "command": "npx",
      "args": ["-y", "mcp-blogger"],
      "env": {
        "BLOGGER_API_KEY": "your-api-key",
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret",
        "DEFAULT_BLOG_ID": "your-default-blog-id"
      }
    }
  }
}

Claude Code

Add the server via the Claude Code CLI:

claude mcp add blogger -- npx -y mcp-blogger \
  -e BLOGGER_API_KEY=your-api-key \
  -e GOOGLE_CLIENT_ID=your-client-id \
  -e GOOGLE_CLIENT_SECRET=your-client-secret \
  -e DEFAULT_BLOG_ID=your-default-blog-id

Tools

All tools that accept blogId will fall back to DEFAULT_BLOG_ID if set.

Category Tool OAuth Description
Account list_blogs Yes List all blogs owned by the authenticated user
Read get_blog_info No Get blog metadata by URL or ID
Read list_posts No List published posts
Read get_post No Get a specific post (supports drafts with OAuth)
Read search_posts No Search posts by keyword
Write list_drafts Yes List draft posts
Write create_post Yes Create a post (draft by default). Use content_file for large content
Write change_post_status Yes Publish a draft or revert a published post to draft
Write update_post Yes Update a post (supports both published and draft)
Write delete_post Yes Delete a post

Typical Workflow

list_blogs                          # Find your blog ID
create_post (draft by default)      # Write content
get_post                            # Preview the draft
update_post                         # Revise if needed
change_post_status action=publish   # Go live
change_post_status action=revert    # Unpublish if needed

Dependencies

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选