1. Conduid
  2. Other
  3. Juejin
MCP server · Other

Juejin

Unclaimed last commit 11 months ago other
30Low

Scored 13 days ago · breakdown

About Juejin

Juejin is an MCP server published by CorgiBoyG in the Other category.

The repository has 8 stars and 1 forks, with the last commit 11 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/CorgiBoyG/mcp-server-juejin

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Juejin

Powered by Claude · Grounded in docs

I know everything about Juejin. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

MCP Server - JueJin

一个基于 Spring AI MCP Server 的掘金文章发布服务,支持通过 AI 自动创建和发布文章到掘金社区。

功能特性

  • ✅ 创建文章草稿到掘金
  • ✅ 发布文章到掘金社区
  • ✅ 支持 Markdown 格式内容
  • ✅ 支持文章标签设置
  • ✅ 基于 Spring AI MCP Server 标准协议
  • ✅ 支持 stdio 模式

技术栈

  • Java 17
  • Spring Boot 3.4.3
  • Spring AI 1.0.0-M6
  • Retrofit 2.9.0 - HTTP 客户端
  • Flexmark 0.64.8 - Markdown 解析器
  • Lombok
  • FastJSON 2.0.28

项目结构

mcp-server-juejin/
├── src/
│   └── main/
│       ├── java/
│       │   └── cn/bugstack/mcp/server/juejin/
│       │       ├── domain/              # 领域层
│       │       │   ├── adapter/         # 端口接口
│       │       │   ├── model/           # 领域模型
│       │       │   └── service/         # 领域服务
│       │       ├── infrastructure/      # 基础设施层
│       │       │   └── adapter/         # 适配器实现
│       │       ├── gateway/             # 网关层
│       │       │   └── dto/             # 数据传输对象
│       │       ├── types/               # 类型定义
│       │       │   ├── properties/      # 配置属性
│       │       │   └── utils/           # 工具类
│       │       └── McpServerApplication.java
│       └── resources/
│           └── application.yml
└── pom.xml

快速开始

环境要求

  • JDK 17+
  • Maven 3.6+

配置说明

在 src/main/resources/application.yml 中配置掘金 Cookie:

juejin:
  api:
    cookie: your-juejin-cookie-here  # 掘金登录 Cookie

spring:
  application:
    name: mcp-server-juejin
  ai:
    mcp:
      server:
        name: ${spring.application.name}
        version: 1.0.0
  main:
    web-application-type: none  # stdio 模式

如何获取掘金 Cookie:

  1. 登录掘金网站(https://juejin.cn)
  2. 打开浏览器开发者工具(F12)
  3. 在 Network 标签中找到任意请求
  4. 复制请求头中的 Cookie 值

构建项目

mvn clean package

运行项目

java -jar target/mcp-server-juejin-1.0.0.jar

功能说明

发布文章到掘金

通过 @Tool 注解暴露的工具方法,AI 可以调用 saveArticleToJueJin 方法发布文章。

功能流程:

  1. 创建文章草稿(调用掘金创建 API)
  2. 发布文章(调用掘金发布 API)

请求参数:

  • title: 文章标题
  • markdowncontent: Markdown 格式的文章内容
  • tags: 文章标签(多个标签用逗号分隔)

返回信息:

  • 文章发布结果
  • 文章 ID(如果成功)
  • 文章链接(如果成功)

架构设计

项目采用 DDD(领域驱动设计)架构:

  1. 领域层(Domain): 包含业务逻辑和领域模型
  2. 基础设施层(Infrastructure): 实现外部接口适配
  3. 网关层(Gateway): 处理外部 API 调用

数据流转:

AI → @Tool 方法 → JueJinArticleService → IJueJinPort → JueJinPort → IJueJinService → 掘金 API

使用示例

当作为 MCP Server 运行时,AI 可以通过以下方式调用:

{
  "method": "tools/call",
  "params": {
    "name": "saveArticleToJueJin",
    "arguments": {
      "title": "深入理解 Spring Boot 自动配置",
      "markdowncontent": "# 深入理解 Spring Boot 自动配置\n\nSpring Boot 的自动配置机制...",
      "tags": "Spring Boot,Java,后端开发"
    }
  }
}

开发说明

核心类说明

  • McpServerApplication: Spring Boot 主启动类
  • JueJinArticleService: 领域服务,提供 saveArticleToJueJin 工具方法
  • JueJinPort: 适配器实现,连接领域层和网关层
  • IJueJinService: Retrofit 接口,定义掘金 API 调用
    • createArticle: 创建文章草稿
    • publishArticle: 发布文章
  • MarkdownConverter: Markdown 转换工具

添加新功能

  1. 在 JueJinArticleService 中添加新的 @Tool 注解方法
  2. 在 IJueJinPort 接口中定义新的端口方法
  3. 在 JueJinPort 中实现适配逻辑
  4. 在 IJueJinService 中添加对应的 API 接口
  5. 重新构建并运行

掘金 API 说明

项目使用掘金开放 API:

  • Base URL: https://api.juejin.cn/
  • 创建文章: /content_api/v1/article_draft/create
  • 发布文章: /content_api/v1/article/publish

日志

日志文件位置:data/log/mcp-server-juejin.log

注意事项

  1. Cookie 会过期,需要定期更新
  2. 发布文章需要遵守掘金社区规范
  3. 建议在测试环境先验证功能
  4. 掘金 API 可能有调用频率限制

许可证

本项目采用 MIT 许可证。

作者

Daniel G

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Juejin

How do I install Juejin?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Juejin safe to use with an AI agent?

Its trust score is 30 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Juejin still maintained?

The last commit was 11 months ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.