blogger-mcp-toolkit

blogger-mcp-toolkit

An MCP server for managing Google Blogger blogs, posts, pages, comments, and media via the Blogger API v3. Includes OAuth authentication, Base64 image embedding, and lightweight listing modes.

Category
访问服务器

README

blogger-mcp-toolkit

A universal MCP (Model Context Protocol) server providing complete access to the Google Blogger API v3, permanent Base64 media embedding, and lightweight summary listing modes.

npm version Node.js TypeScript License: MIT MCP Compatible

Interact seamlessly with Blogger blogs, posts, pages, comments, media, and user profiles directly from your favorite AI assistant or MCP-enabled client (such as Claude Code, Claude Desktop, Cursor, Zed, Windsurf, or Antigravity CLI).


📑 Table of Contents


🌟 Features

  • 100% Blogger API v3 Coverage + Media & Search Extensions: 29 MCP tools for full management of blogs, posts, pages, comments, media, and users.
  • Remote-Friendly Interactive OAuth (npx blogger-mcp-auth): Standalone authentication CLI supporting local browser redirect AND manual code copy-pasting for remote/SSH/Docker environments.
  • Strict BLOGGER_* Environment Schema: Clean, standardized configuration using BLOGGER_CLIENT_ID, BLOGGER_CLIENT_SECRET, BLOGGER_REFRESH_TOKEN, and BLOGGER_API_KEY.
  • Permanent Base64 Image Embedding (blogger_media_to_base64): Convert local images (.png, .jpg, .jpeg, .webp, .gif, .svg) into Base64 Data URIs with zero external CDN dependencies, ensuring your images never expire.
  • Lightweight Listing Mode (summaryOnly): Omit heavy HTML post content on list, search, and searchByLabel endpoints to drastically reduce JSON response sizes (from >50KB down to ~2KB) and prevent payload truncation.
  • Dedicated Label Search (blogger_posts_searchByLabel): Quick filtering of posts by tag/label.
  • Automatic HTML Markdown Cleaner: Cleans raw Markdown code fences (e.g. html ... ) before publishing posts or pages to Blogger.

🚀 Quick Start & Installation

Step 1: Acquire your Blogger Refresh Token

Run the interactive authentication tool directly in your terminal:

npx blogger-mcp-auth
  • Interactive Prompt: Enter your BLOGGER_CLIENT_ID and BLOGGER_CLIENT_SECRET when prompted.
  • Browser Authentication: Authorize the app in your browser. (If working over SSH/remote container, simply copy-paste the redirected URL or authorization code back into the terminal!)
  • Token Output: Copy the generated BLOGGER_REFRESH_TOKEN displayed in green.

Step 2: Install across your AI assistants with add-mcp

Install and configure automatically across all your AI assistants (Claude Code, Cursor, Zed, Windsurf, VS Code, etc.) in one single command:

npx add-mcp blogger-mcp-toolkit \
  --env BLOGGER_CLIENT_ID=your-client-id.apps.googleusercontent.com \
  --env BLOGGER_CLIENT_SECRET=your-client-secret \
  --env BLOGGER_REFRESH_TOKEN=your-refresh-token

⚙️ Google Cloud Console Setup

To communicate with the Blogger API, you need OAuth2 credentials:

  1. Create a Project: Go to Google Cloud Console, click New Project, and name it (e.g., Blogger MCP).
  2. Enable Blogger API v3: Go to APIs & Services > Library, search for Blogger API v3, and click Enable.
  3. Configure OAuth Consent Screen:
    • Go to APIs & Services > OAuth consent screen.
    • Choose External, fill in required support email fields.
    • Under Test users, add your own Google email address (Crucial if your app is in "Testing" status!).
  4. Create Credentials:
    • Go to APIs & Services > Credentials > + CREATE CREDENTIALS > OAuth client ID.
    • Select Web application (or Desktop app).
    • Add Authorized redirect URI: http://localhost:3000/oauth2callback (or port 3001/3002).
    • Copy your Client ID and Client Secret.

📦 Manual Setup

# Clone the repository
git clone https://github.com/RadouaneElarfaoui/blogger-mcp-toolkit.git
cd blogger-mcp-toolkit

# Install dependencies & build
npm install
npm run build

# Generate Refresh Token locally
cp .env.example .env
npm run auth

🌍 Environment Variables

blogger-mcp-toolkit exclusively uses the following BLOGGER_* environment variables:

Variable Description Required
BLOGGER_CLIENT_ID OAuth2 Client ID from Google Cloud Console Yes
BLOGGER_CLIENT_SECRET OAuth2 Client Secret from Google Cloud Console Yes
BLOGGER_REFRESH_TOKEN OAuth2 Refresh Token (generated via npx blogger-mcp-auth) Yes
BLOGGER_API_KEY Optional API key for read-only access No

🛠️ Available Tools (29)

<details open> <summary><strong>📝 Blogs (3 tools)</strong></summary>

Tool Name Description
blogger_blogs_get Get blog metadata by blog ID
blogger_blogs_getByUrl Get blog metadata by its URL
blogger_blogs_listByUser List blogs for a user

</details>

<details open> <summary><strong>📄 Posts (11 tools)</strong></summary>

Tool Name Description
blogger_posts_list List posts for a blog (supports summaryOnly mode to strip heavy HTML content)
blogger_posts_get Get a post by ID
blogger_posts_getByPath Get a post by its URL path
blogger_posts_search Search posts by query string (supports summaryOnly mode)
blogger_posts_searchByLabel Filter posts by a label/tag (supports summaryOnly mode)
blogger_posts_insert Create a new post (automatically strips raw Markdown HTML code block wrappers)
blogger_posts_update Full update of a post
blogger_posts_patch Partial update of a post
blogger_posts_delete Delete a post
blogger_posts_publish Publish a draft post
blogger_posts_revert Revert a published post to draft

</details>

<details open> <summary><strong>📑 Pages (6 tools)</strong></summary>

Tool Name Description
blogger_pages_list List static pages for a blog
blogger_pages_get Get a page by ID
blogger_pages_insert Create a new static page (automatically strips raw Markdown HTML code block wrappers)
blogger_pages_update Full update of a page
blogger_pages_patch Partial update of a page
blogger_pages_delete Delete a page

</details>

<details open> <summary><strong>💬 Comments (7 tools)</strong></summary>

Tool Name Description
blogger_comments_list List comments for a specific post
blogger_comments_listByBlog List comments across all posts
blogger_comments_get Get a specific comment
blogger_comments_approve Approve a comment
blogger_comments_delete Permanently delete a comment
blogger_comments_removeContent Remove comment content
blogger_comments_markAsSpam Mark a comment as spam

</details>

<details open> <summary><strong>🖼️ Media (1 tool)</strong></summary>

Tool Name Description
blogger_media_to_base64 Convert a local image file (.png, .jpg, .jpeg, .webp, .gif, .svg) to an embedded Base64 Data URI with a ready-to-use Blogger <img> tag snippet for zero-dependency permanent embedding

</details>

<details open> <summary><strong>👤 Users (1 tool)</strong></summary>

Tool Name Description
blogger_users_get Get user profile information

</details>


🔌 MCP Client Configuration

Claude Desktop

Edit your claude_desktop_config.json:

{
  "mcpServers": {
    "blogger": {
      "command": "npx",
      "args": ["-y", "blogger-mcp-toolkit"],
      "env": {
        "BLOGGER_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "BLOGGER_CLIENT_SECRET": "your-client-secret",
        "BLOGGER_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}

Cursor

Edit .cursor/mcp.json or Cursor MCP settings:

{
  "mcpServers": {
    "blogger": {
      "command": "npx",
      "args": ["-y", "blogger-mcp-toolkit"],
      "env": {
        "BLOGGER_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "BLOGGER_CLIENT_SECRET": "your-client-secret",
        "BLOGGER_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}

Windsurf

Edit ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "blogger": {
      "command": "npx",
      "args": ["-y", "blogger-mcp-toolkit"],
      "env": {
        "BLOGGER_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "BLOGGER_CLIENT_SECRET": "your-client-secret",
        "BLOGGER_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}

Zed

Edit settings.json in Zed:

{
  "context_servers": {
    "blogger": {
      "command": {
        "path": "npx",
        "args": ["-y", "blogger-mcp-toolkit"]
      },
      "env": {
        "BLOGGER_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "BLOGGER_CLIENT_SECRET": "your-client-secret",
        "BLOGGER_REFRESH_TOKEN": "your-refresh-token"
      }
    }
  }
}

📄 License

This project is licensed under the MIT License.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选