Skip to main content

ZSXQ MCP Server

知识星球 MCP 服务器 - 通过 Model Context Protocol 自动发布内容到知识星球。

🔥 核心功能

  • ✅ 发布文字主题
  • ✅ 上传并发布带图片的主题
  • ✅ 从本地文件读取内容发布
  • ✅ 灵活的环境变量配置
  • ✅ Cookie 身份验证
  • ✅ 定时发布主题
  • ✅ 定时任务管理

📦 安装与配置

1. 安装 uv 工具(首次使用)

curl -LsSf https://astral.sh/uv/install.sh | sh

2. Claude Desktop 配置

直接在配置文件中使用 uvx 运行:

{
  "mcpServers": {
    "zsxq": {
      "command": "uvx",
      "args": ["zsxq-mcp", "server"],
      "env": {
        "ZSXQ_COOKIE": "your_cookie_here",
        "ZSXQ_GROUP_ID": "your_group_id_here"
      }
    }
  }
}

重启 Claude Desktop 即可使用。

配置说明

参数 说明 必填
ZSXQ_COOKIE 知识星球浏览器 Cookie ✅
ZSXQ_GROUP_ID 星球 ID(URL 中获取) 🔹

Cookie 获取方法:浏览器登录知识星球 → F12 开发者工具 → Network → 任意 API 请求 → 请求头 Cookie 字段

🚀 使用示例

在 Claude 中使用

帮我发布一条动态到知识星球:"今天学习了 MCP 的使用方法!"
把这个文件的内容发布到知识星球:/path/to/article.txt
帮我发布一条带图片的动态,内容是"分享今天的成果",图片路径:/path/to/screenshot.png
帮我定时发布一条动态,5分钟后发布,内容是"定时测试"
帮我查看所有定时发布的任务

MCP 工具列表

工具 功能
publish_topic 发布文字主题
publish_topic_from_file 从文件发布内容
publish_topic_with_images 发布带图片的主题
upload_image 单独上传图片
get_group_info 获取星球信息
schedule_topic 定时发布主题
get_scheduled_jobs 获取定时任务列表

📌 注意事项

  • 🔒 Cookie 包含登录凭证,请勿泄露
  • ⏰ Cookie 可能过期,需定期更新
  • 💡 未指定 ZSXQ_GROUP_ID 时,每次调用需手动指定

📁 开发相关

本地开发

git clone https://github.com/your-repo/zsxq-mcp.git
cd zsxq-mcp
pip install -e .

调试工具

# 使用 MCP Inspector 调试(uvx 方式)
npx @modelcontextprotocol/inspector uvx zsxq-mcp server

# 或本地开发调试
uvx zsxq-mcp server

📄 许可证

MIT License

Metadata

Release files for zsxq-mcp 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zsxq-mcp 0.2.4
File Size Uploaded Provenance
zsxq_mcp-0.2.4.tar.gz 13.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zsxq-mcp 0.2.4
File Interpreter ABI Platform
zsxq_mcp-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 21.3 kB

Release files / zsxq_mcp-0.2.4.tar.gz

Download URL zsxq_mcp-0.2.4.tar.gz
Size 13.5 kB
Tags Source
SHA-256 checksum
How to use checksums
04361c61fe3db71859f00242a88a758c80027f7ff019305af65c5eda6b8a134e
BLAKE2b-256 checksum
How to use checksums
690a23af44f0e37dad2aa862d0aa6c55ecedebc8d1be1a007398e6f3d70c388b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / zsxq_mcp-0.2.4-py3-none-any.whl

Download URL zsxq_mcp-0.2.4-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e703cf8f405156de6c54bf19cfecb943c051bcd4a490b00b13ca0e27e2f153e
BLAKE2b-256 checksum
How to use checksums
20e6b93a5fd011b080c5d15001610ec898f12616c8aeae7b3cab615f6cc3fc8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Security for zsxq-mcp 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page