Skip to main content
Glama
Ln129402
by Ln129402

🚀 mcp-csdn-publisher

License: MIT Node.js MCP

🤖 一个基于 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.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 并登录

  2. F12Network 标签

  3. 刷新页面,点击任意请求

  4. 复制 Request Headers 中的 Cookie(确保包含 UserToken

2. 登录

设置 CSDN Cookie: 你的cookie内容

3. 发布博客

帮我写一篇关于 React Hooks 的博客发布到 CSDN

🛠️ MCP 工具

工具

说明

login

设置 CSDN Cookie 认证

publish-blog

发布/保存博客文章

list-categories

获取文章分类

list-tags

获取常用标签

📄 许可证

MIT License

Available Tools

4 tools
list-categoriesA

获取当前 CSDN 账号的文章分类列表。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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 账号常用的文章标签列表。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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 字符串。

ParametersJSON Schema
NameRequiredDescriptionDefault
cookieYes从浏览器复制的 CSDN Cookie 字符串

TDQS

A3.8/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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 格式,可选择直接发布或保存为草稿。

ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNo文章标签,逗号分隔,如: 'JavaScript,前端,Vue'
titleYes文章标题
contentYesMarkdown 格式的文章内容
publishNotrue=直接发布, false=保存草稿。默认 true
categoriesNo文章分类,如: '前端开发'
descriptionNo文章摘要(不填则自动截取内容前100字)

TDQS

A3.7/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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.

  1. 4 tool updatesv1.0.0
    • First observedlist-categories
    • First observedlist-tags
    • First observedlogin
    • First observedpublish-blog

TDQS

A3.8/5.0
Disambiguation5/5

Each tool has a distinct purpose: authentication, publishing, listing categories, and listing tags. No two tools overlap in functionality.

Naming Consistency4/5

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.

Tool Count5/5

With 4 tools covering authentication, publishing, and metadata retrieval, the count is well-scoped for a focused blog publishing server.

Completeness3/5

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

ActivityStale
ResponsivenessSyncing

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

Related MCP Servers

Latest Blog Posts

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