mcp-csdn-publisher
MCP server that enables AI assistants to automatically write and publish blog posts to CSDN with support for categories, tags, and drafts.
README
🚀 mcp-csdn-publisher
🤖 一个基于 MCP (Model Context Protocol) 的 CSDN 博客自动发布服务器,让 AI 助手帮你写博客并一键发布到 CSDN!
✨ 功能特性
- 📝 AI 写博客 - 给一个主题,AI 自动生成高质量博客文章
- 🚀 一键发布 - 直接发布到 CSDN,无需手动操作
- 📋 草稿保存 - 支持保存为草稿,稍后编辑
- 🏷️ 分类标签 - 自动设置文章分类和标签
- 🖼️ 图文并茂 - 支持 Markdown 格式,包括图片、代码块、表格等
- 🔐 安全认证 - 基于 Cookie 的安全认证机制
📦 安装
git clone https://github.com/Ln129402/mcp-csdn-publisher.git
cd mcp-csdn-publisher
npm install
npm run build
🔧 配置
Claude Desktop 配置
编辑配置文件:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"csdn-publisher": {
"command": "node",
"args": ["/path/to/mcp-csdn-publisher/dist/index.js"]
}
}
}
Claude Code 配置
在项目根目录创建 .mcp.json:
{
"mcpServers": {
"csdn-publisher": {
"command": "node",
"args": ["/path/to/mcp-csdn-publisher/dist/index.js"]
}
}
}
🎯 使用方法
1. 获取 CSDN Cookie
- 浏览器打开 CSDN 并登录
- 按
F12→ Network 标签 - 刷新页面,点击任意请求
- 复制 Request Headers 中的 Cookie(确保包含
UserToken)
2. 登录
设置 CSDN Cookie: 你的cookie内容
3. 发布博客
帮我写一篇关于 React Hooks 的博客发布到 CSDN
🛠️ MCP 工具
| 工具 | 说明 |
|---|---|
login |
设置 CSDN Cookie 认证 |
publish-blog |
发布/保存博客文章 |
list-categories |
获取文章分类 |
list-tags |
获取常用标签 |
📄 许可证
MIT License
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.