Get the FREE Ultimate OpenClaw Setup Guide →

mcp -article

MCP自动发文服务

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gulihua10010-mcp-server-article java -Dspring.ai.mcp.server.stdio=true -Dspring.main.web-application-type=none -Dlogging.pattern.console= -jar /Users/gulihua/IdeaProjects/mcp-server-article/target/mcp-server-0.0.1-SNAPSHOT.jar \
  --env CSDN_COOKIE="CSDN的cookie" \
  --env CNBLOG_TOKEN="博客园的x-xsrf-token" \
  --env CNBLOG_COOKIE="博客园的cookie" \
  --env JUEJIN_COOKIE="掘金的cookie"

How to use

This MCP server implements an automated article publishing workflow. It uses AI to generate an article and then publishes it to three platforms: CSDN, Juejin, and CNBlogs. The server exposes a single MCP endpoint named articleServer that runs as a Java-based MCP client/server combination. To use it, configure the MCP server with the appropriate environment cookies for each platform (CSDN, Juejin, CNBlogs). After configuration, you can prompt the MCP model to create content, and the tools will handle article generation and multi-platform publication. The available tools include searchExperienceQuestion for mining interview experiences, searchNews for current tech topics, and publishArticle2Csdn, publishArticle2Juejin, and publishArticle2Cnblog for publishing to each platform. The overall flow is: query source data (e.g., 牛客面经), AI crafts an article, then publish across the three blogging platforms using the configured credentials.

How to install

Prerequisites:

  • Java 17 runtime
  • Git
  • Maven

Installation steps:

  1. Clone the repository
git clone https://github.com/yuyuanweb/mcp--server-article
  1. Build the project with Maven
cd mcp--server-article
mvn clean package
  1. Run the MCP server (example)
# Start the article server (adjust Java path and jar path as needed)
java -Dspring.ai.mcp.server.stdio=true \
     -Dspring.main.web-application-type=none \
     -Dlogging.pattern.console= \
     -jar target/mcp-server-0.0.1-SNAPSHOT.jar
  1. Configure the MCP client with the generated configuration (see mcpServers.articleServer in the README example) and provide the necessary environment cookies for JUEJIN_COOKIE, CSDN_COOKIE, CNBLOG_COOKIE, CNBLOG_TOKEN.

Additional notes

Tips and notes:

  • Ensure Java 17 is installed and available in your PATH.
  • The env variables JUEJIN_COOKIE, CNBLOG_COOKIE, CNBLOG_TOKEN, and CSDN_COOKIE must contain valid cookies/tokens for the respective platforms; incorrect values will lead to failed publishing attempts.
  • The path in the -jar argument should point to the built MCP server artifact produced by Maven (e.g., target/mcp-server-0.0.1-SNAPSHOT.jar).
  • If you use a different model provider, you may need to adjust dependencies and model config as shown in the README (e.g., switching to a different OpenAI or Alibaba model starter).
  • The MCP configuration file shown in the README includes a single server named articleServer; you can extend it with additional servers if needed.
  • When using the CNBlogs/XSRF/token headers, ensure compatibility with their current authentication requirements as services may update tokens or headers.
  • If you encounter network or authentication errors, verify cookies, token values, and any required API keys are up to date and not expired.

Related MCP Servers

Sponsor this space

Reach thousands of developers