Skip to main content
Glama

blogger-mcp

Google Blogger API v3ベースのカスタムMCPサーバーです。 Claude CodeやClaude DesktopなどのMCPホストから、自身のBloggerブログの記事を 取得/作成/編集/削除するためのツールを提供します。

主な機能 (MCP Tools)

ツール

説明

list_blogs

認証済みユーザーのブログ一覧

get_blog_by_url

ブログURLからBlog IDを取得

list_posts

ブログ記事一覧 (statusフィルター対応)

get_post

特定の記事を取得

create_post

新規記事作成 (isDraft=trueで下書き保存)

update_post

記事の更新 (title/content/labels)

delete_post

記事の完全削除

publish_post

下書き記事の公開

revert_post

公開済み記事を下書きに戻す

Related MCP server: MCP-Google-Doc

アーキテクチャ

Claude Code ──stdio──► blogger-mcp (Node)
                          │
                          ├─ src/index.ts     : MCP server (tools 등록/디스패치)
                          ├─ src/auth.ts      : OAuth 2.0 토큰 로드/저장/갱신
                          └─ src/auth-cli.ts  : 최초 1회 대화형 인증용 CLI
                          │
                          ▼
                  Google Blogger API v3
  • 認証: OAuth 2.0 (デスクトップアプリ)。初回のみ npm run auth でローカルコールバックサーバーを 起動してトークンを取得し、~/.config/blogger-mcp/token.json に保存します。以降はリフレッシュトークンで自動更新されます。

  • スコープ: https://www.googleapis.com/auth/blogger

  • トランスポート: stdio (MCPホストが子プロセスとして起動)

クイックスタート

1. インストールとビルド

git clone https://github.com/mech12/blogger-mcp.git
cd blogger-mcp
npm install
npm run build

2. OAuthクライアントの準備

Google Cloud ConsoleでBlogger API v3を 有効にし、デスクトップアプリタイプのOAuthクライアントを作成して client_secret.jsonをダウンロードします。

mkdir -p ~/.config/blogger-mcp
cp /path/to/client_secret.json ~/.config/blogger-mcp/client_secret.json

Google Cloudの詳細な設定は、以下の Blogger API v3 認証の発行 を参照してください。

3. 初回認証

npm run auth

ブラウザに表示されるURLを開いて承認すると、~/.config/blogger-mcp/token.jsonが 生成されます。

4. Claude Codeへの登録

claude mcp add blogger --scope user -- node /absolute/path/to/blogger-mcp/dist/index.js

または ~/.claude.json に直接記述します:

{
  "mcpServers": {
    "blogger": {
      "command": "node",
      "args": ["/absolute/path/to/blogger-mcp/dist/index.js"]
    }
  }
}

環境変数

変数

デフォルト値

説明

BLOGGER_MCP_CRED_DIR

~/.config/blogger-mcp

認証情報ディレクトリ

BLOGGER_MCP_CLIENT_SECRET

$CRED_DIR/client_secret.json

OAuthクライアントJSONのパス

Blogger API v3 認証の発行 (要約)

  1. Google Cloudプロジェクトの作成 — https://console.cloud.google.com/

  2. APIライブラリで Blogger API v3 を有効化

  3. OAuth同意画面の設定

    • ユーザータイプ: 外部 (External)

    • スコープの追加: https://www.googleapis.com/auth/blogger

    • テストユーザーに自身のGoogleアカウントを追加

  4. 認証情報 → OAuthクライアントID

    • アプリケーションの種類: デスクトップアプリ

    • 作成後にJSONをダウンロード → ~/.config/blogger-mcp/client_secret.json に配置

  5. Blog IDの確認

    • Blogger管理画面URLの blogID=... の数値、または get_blog_by_url ツールで取得

プロジェクト固有の詳細ガイドは、ホストプロジェクトの docs/vibe/mcp/blogger-mcp.md で管理しています。

実装計画 (Design Notes)

  • スタック: TypeScript + Node 18+, @modelcontextprotocol/sdk, googleapis, google-auth-library。

  • トークン保存場所: ~/.config/blogger-mcp/。.gitignoreで保護。

  • エラー戦略: ツール呼び出し失敗時はMCPが自動的にエラーをラップ。認証がない場合は No stored token. Run npm run auth first. というメッセージでガイド。

  • 拡張ロードマップ:

    • Markdown → HTML変換ツール (markedベース)

    • 画像アップロード (BloggerはPicasa/Google Photosの回避が必要 → 今後のオプション)

    • 記事の予約投稿 (published フィールドの設定)

開発

npm run dev       # tsc --watch
npm run build     # dist/ 생성
npm start         # dist/index.js 실행 (MCP stdio 서버)
npm run auth      # OAuth 최초 인증

ライセンス

MIT

Available Tools

9 tools
create_postC

Create a new blog post. Content is HTML; labels is a list of tags. isDraft=true saves as draft.

Inputs: blogId (required), title (required), content (required), labels, +1 more.

delete_postC

Delete a post permanently

Inputs: blogId (required), postId (required).

get_blog_by_urlC

Resolve a Blog ID from a blog URL (e.g. https://xxx.blogspot.com)

Inputs: url (required).

get_postC

Fetch a single post

Inputs: blogId (required), postId (required).

list_blogsB

List blogs owned by the authenticated user

Inputs: no named parameters.

list_postsC

List posts of a blog

Inputs: blogId (required), maxResults, status.

publish_postC

Publish a draft post

Inputs: blogId (required), postId (required).

revert_postC

Revert a published post back to draft

Inputs: blogId (required), postId (required).

update_postC

Update an existing post (title/content/labels).

Inputs: blogId (required), postId (required), title, content, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 9 tools

    Disambiguation5/5

    Every tool has a clearly distinct purpose with no ambiguity. Each tool targets a specific resource (blog, post) and action (create, delete, get, list, publish, revert, update), making it easy for an agent to select the correct one. The separation between operations like publish_post and revert_post is particularly clear.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with snake_case throughout, such as create_post, delete_post, and list_blogs. There are no deviations in naming conventions, making the set predictable and readable for an agent.

    Tool Count5/5

    With 9 tools, this server is well-scoped for managing blogs and posts, covering essential operations without bloat. Each tool earns its place by addressing a specific need in the blogging workflow, from listing blogs to handling post lifecycles.

    Completeness5/5

    The tool surface provides complete CRUD/lifecycle coverage for the blogging domain. It includes create, read (get/list), update, and delete for posts, plus additional lifecycle actions like publish and revert, with no obvious gaps that would cause agent failures.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers