Blogger MCP Server

by niyonabil
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Enables automated creation and management of blogs, posts, and labels on the Blogger platform through Google's Blogger API

  • Interfaces with Google's API ecosystem, specifically the Blogger API, for blog content management

blogger-mcp-服务器

=======

Blogger 的 MCP 服务器

模型上下文协议 (MCP) 服务器允许 Claude 等人工智能模型直接与 Google 的 Blogger API 进行交互。

关于

该项目为 Google 的 Blogger API 实现了符合模型上下文协议 (MCP) 的服务器。它允许像 Claude 这样的 AI 模型与 Blogger 博客进行互动,从而:

  • 列出并检索博客
  • 列出、搜索、检索、创建、更新和删除帖子
  • 列出并检索标签

重要提示:Google 的 Blogger API 不允许您通过 API 创建新博客。 Google 已记录此限制。必须通过 Blogger 的网络界面手动创建博客。

先决条件

  • Node.js(版本 16 或更高版本)
  • Google Blogger API 密钥

设施

从 npm 安装

npm install -g @mcproadev/blogger-mcp-server

从源代码安装

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

如果安装错误:

npm install --save-dev @types/express @types/socket.io

配置

获取 Blogger API 密钥

  1. 访问Google Cloud Console
  2. 创建新项目或选择现有项目
  3. 启用 Blogger API v3
  4. 创建 API 密钥
  5. 记下此键以便在配置中使用

MCP 服务器配置

为您的 MCP 客户端创建一个配置文件。以下是 Claude Desktop 的一个示例:

{ "mcpServers": { "blogger": { "command": "npx", "args": [ "-y", "@mcproadev/blogger-mcp-server" ], "env": { "BLOGGER_API_KEY": "VOTRE_CLE_API_ICI" } } } }

VOTRE_CLE_API_ICI替换为您获得的 API 密钥。

使用

本地启动

该项目包含两个脚本以方便启动服务器:

开发模式

export BLOGGER_API_KEY=votre_cle_api ./start-dev.sh

该脚本检查 API 密钥是否存在,如有必要则安装依赖项,如有必要则编译项目,然后以开发模式启动服务器。

生产模式

export BLOGGER_API_KEY=votre_cle_api npm run build ./start-prod.sh

该脚本检查 API 密钥是否存在以及项目是否已编译,然后以生产模式启动服务器。

与 MCP 客户端一起使用

配置完成后,您可以将 Blogger 的 MCP 服务器与任何兼容的 MCP 客户端(例如 Claude Desktop)一起使用。

命令示例:

  • “列出我的所有 Blogger 博客”
  • “在我的博客上创建一篇 ID 为 123456 的新文章,标题为‘我的新文章’,内容为‘这是我的文章内容’”
  • “在我的博客中搜索包含‘技术’一词的帖子”
  • “更新 ID 为 789012 的帖子,将其标题更改为‘新标题’”

部署选项

在 Vercel 上部署

该项目包含一个vercel.json文件,以方便部署到 Vercel:

  1. 如果您还没有Vercel帐户,请创建一个
  2. 安装 Vercel CLI 工具: npm install -g vercel
  3. 登录您的 Vercel 帐户: vercel login
  4. 配置你的秘密环境变量: vercel secrets add blogger_api_key "VOTRE_CLE_API_ICI"
  5. 部署项目: vercel

使用 Docker 进行部署

该项目包含一个 Dockerfile,以便于在 Docker 容器中部署:

  1. 构建 Docker 镜像:
    docker build -t blogger-mcp-server .
  2. 运行容器:
    docker run -p 3000:3000 -e BLOGGER_API_KEY=votre_cle_api blogger-mcp-server

其他部署选项

该服务器还可以部署在其他与 Node.js 兼容的平台上:

  1. Heroku :使用 Procfile 和 Heroku 环境变量
  2. AWS Lambda :使用适配器作为无服务器框架
  3. Google Cloud Run :使用附带的 Dockerfile

项目结构

Blogger 的 MCP 服务器由几个模块组成:

  • index.ts :主入口点
  • server.ts :MCP 服务器配置
  • bloggerService.ts :与 Blogger API 交互的服务
  • config.ts :服务器配置
  • types.ts :类型和接口的定义
  • mcp-sdk-mock.ts :简化 MCP SDK 的实现,以避免依赖问题

已知限制

  • 创建博客:Google 的 Blogger API 不允许通过 API 创建新博客。必须通过 Blogger 的网络界面手动创建博客。
  • 帖子搜索:Blogger API 不提供直接的搜索端点。此功能在客户端通过获取帖子然后过滤它们来实现。
  • 标签管理:Blogger API 不提供标签管理的直接端点。此功能是通过从帖子中提取标签来实现的。
  • 身份验证:此服务器仅使用 API 密钥身份验证,从而限制对公共博客或您已明确配置访问权限的博客的访问。

贡献

欢迎投稿!请随时提出问题或请求。

执照

该项目已获得 MIT 许可。

cf72ca4(添加新功能)

-
security - not tested
F
license - not found
-
quality - not tested

一个中介服务器,使 AI 模型能够与 Google 的 Blogger 平台进行交互,通过 Blogger API 自动创建和管理博客、帖子和标签。

  1. Serveur MCP pour Blogger
    1. À propos
    2. Prérequis
    3. Installation
    4. Configuration
    5. Utilisation
    6. Options de déploiement
    7. Structure du projet
    8. Limitations connues
    9. Contribution
    10. Licence
ID: qpfc6cvcll