mcp-csdn-publisher
Allows AI agents to write and publish blog articles to CSDN, including saving drafts, managing categories and tags.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-csdn-publisherWrite a tutorial on React Hooks and publish to CSDN."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🚀 mcp-csdn-publisher
🤖 一个基于 MCP (Model Context Protocol) 的 CSDN 博客自动发布服务器,让 AI 助手帮你写博客并一键发布到 CSDN!
✨ 功能特性
📝 AI 写博客 - 给一个主题,AI 自动生成高质量博客文章
🚀 一键发布 - 直接发布到 CSDN,无需手动操作
📋 草稿保存 - 支持保存为草稿,稍后编辑
🏷️ 分类标签 - 自动设置文章分类和标签
🖼️ 图文并茂 - 支持 Markdown 格式,包括图片、代码块、表格等
🔐 安全认证 - 基于 Cookie 的安全认证机制
Related MCP server: Banana Image MCP
📦 安装
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.jsonmacOS:
~/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 工具
工具 | 说明 |
| 设置 CSDN Cookie 认证 |
| 发布/保存博客文章 |
| 获取文章分类 |
| 获取常用标签 |
📄 许可证
MIT License
Available Tools
4 toolslist-categoriesA
获取当前 CSDN 账号的文章分类列表。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description is minimal and does not disclose any behavioral traits beyond the obvious read operation. No information about authentication needs, data format, or limitations. No annotations to shift burden.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single clear sentence with no redundancy. Front-loaded with the main action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Description is adequate for a simple read tool with no parameters, but lacks output details. More context on authorization (e.g., requires login) would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, and schema description coverage is 100% trivially. Description adds no parameter information, which is acceptable for zero-parameter tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it retrieves article categories for the current CSDN account, using a specific verb and resource. It is distinct from sibling tools (login, publish-blog, list-tags).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use or when not to use. Implied usage is straightforward, but lacks context about prerequisites like authentication or comparison with list-tags.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list-tagsB
获取当前 CSDN 账号常用的文章标签列表。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must compensate. It adds 'commonly used', which implies a filtered or ordered subset. However, it does not mention authentication requirements, side effects, or output format, which are important for behavioral understanding.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence in Chinese that delivers the core purpose without extraneous words. It is well-structured and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with no output schema, the description is fairly complete. However, it does not mention that authentication is likely required (given siblings include 'login') or what fields the returned tags have. This leaves some gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so schema_description_coverage is 100%. The description does not need to explain parameters. Per the rules, a baseline of 4 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool gets the list of commonly used article tags for the current CSDN account. It specifies the verb ('获取'), resource ('文章标签列表'), and scope ('当前 CSDN 账号'). It implicitly distinguishes from the sibling 'list-categories' by focusing on tags, but does not explicitly differentiate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'list-categories'. No explicit when-not or usage context is given, leaving the agent to infer from the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
loginA
设置 CSDN Cookie 以完成认证。从浏览器开发者工具复制 Cookie 字符串。
| Name | Required | Description | Default |
|---|---|---|---|
| cookie | Yes | 从浏览器复制的 CSDN Cookie 字符串 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses that it sets a cookie for authentication, but does not describe side effects (e.g., session creation, invalidation of previous session), error handling for invalid cookies, or any rate limits. Minimal behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with purpose, followed by a clear instruction. No extraneous words; every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple authentication tool with one parameter and no output schema, the description is sufficient. It explains the tool's purpose and parameter source. Could mention expected outcome (e.g., sets session), but adequate overall.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the description for the 'cookie' parameter adds real-world context: '从浏览器复制' (copy from browser). This adds value beyond the schema's generic description, guiding the user on how to obtain the value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb '设置' (set) and resource 'CSDN Cookie' with purpose '完成认证' (complete authentication). It distinguishes from sibling tools like publish-blog, list-categories, list-tags which are unrelated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage before other operations by focusing on authentication, and provides instruction on obtaining the cookie from browser developer tools. However, it does not explicitly state when to use or when not to use, nor mention alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
publish-blogA
发布博客文章到 CSDN。支持 Markdown 格式,可选择直接发布或保存为草稿。
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | 文章标签,逗号分隔,如: 'JavaScript,前端,Vue' | |
| title | Yes | 文章标题 | |
| content | Yes | Markdown 格式的文章内容 | |
| publish | No | true=直接发布, false=保存草稿。默认 true | |
| categories | No | 文章分类,如: '前端开发' | |
| description | No | 文章摘要(不填则自动截取内容前100字) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description bears full responsibility. It discloses supported Markdown format and the publish/draft option, but omits details on authentication, rate limits, or response behavior, which are important for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences with no extraneous words. It front-loads the primary action and key options, earning its place efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (6 params, no output schema), the description is somewhat complete but lacks return value description (e.g., published URL) and behavioral details like error handling. Schema descriptions fill some gaps, but overall context is thin.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds minimal context beyond the schema (e.g., reiterates the publish option). No extra meaning is provided for parameter relationships or formats.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb '发布' (publish) and the resource '博客文章到 CSDN' (blog posts to CSDN). It distinguishes from sibling tools (login, list-categories, list-tags) by targeting the specific action of publishing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for publishing blog posts but does not explicitly state when to use it versus alternatives. It lacks guidance on prerequisites (e.g., being logged in) or exclusions, relying on context from sibling tool names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
list-categories - First observed
list-tags - First observed
login - First observed
publish-blog
TDQS
Each tool has a distinct purpose: authentication, publishing, listing categories, and listing tags. No two tools overlap in functionality.
Tool names use a consistent lowercase-with-hyphens style, and most follow a verb-noun pattern. 'login' is the only slight deviation as a single verb, but it remains predictable.
With 4 tools covering authentication, publishing, and metadata retrieval, the count is well-scoped for a focused blog publishing server.
Core publishing workflow is covered, but missing tools for editing, deleting, or listing existing posts limit the server's completeness for a full publishing lifecycle.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
WordPress MCP server: generate SEO posts, AI images, autoblog & WooCommerce on your self-hosted site
WordPress MCP server: publish posts, AI images, SEO and full site management, self-hosted
MCP server for QPost — lets AI agents publish video and image posts to YouTube, TikTok, Instagram.
MCP server for Qwen Image 3 AI image generation
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enables users to automatically generate articles using large language models and publish them directly to Zhihu (a Chinese Q\&A platform).36-
- AlicenseAqualityBmaintenanceAn MCP server that generates high-quality blog cover images using Google Gemini AI and automatically uploads them to Qiniu Cloud storage. It provides automated WebP conversion and compression to deliver optimized CDN URLs for generated images.321MIT
- FlicenseAqualityDmaintenanceAn MCP server that automatically generates technical blog posts using AI (Gemini and Claude), supporting various input types, styles, and collaborative workflow.10-
- FlicenseNot gradedqualityBmaintenanceAI-powered content automation MCP server that enables researching topics, generating articles, formatting WeChat HTML, creating covers, and publishing drafts to WeChat Official Accounts.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ln129402/mcp-csdn-publisher'
If you have feedback or need assistance with the MCP directory API, please join our Discord server