MCP server for publishing content to Zhishixingqiu (知识星球)
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zsxq_mcp-0.2.4.tar.gz
(13.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zsxq_mcp-0.2.4.tar.gz.
File metadata
- Download URL: zsxq_mcp-0.2.4.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04361c61fe3db71859f00242a88a758c80027f7ff019305af65c5eda6b8a134e
|
|
| MD5 |
3b6fa8dc62ee2e99c1eed59ca5b44c10
|
|
| BLAKE2b-256 |
690a23af44f0e37dad2aa862d0aa6c55ecedebc8d1be1a007398e6f3d70c388b
|
File details
Details for the file zsxq_mcp-0.2.4-py3-none-any.whl.
File metadata
- Download URL: zsxq_mcp-0.2.4-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e703cf8f405156de6c54bf19cfecb943c051bcd4a490b00b13ca0e27e2f153e
|
|
| MD5 |
30b3f00a525a597fb3abe8d8671b6f5e
|
|
| BLAKE2b-256 |
20e6b93a5fd011b080c5d15001610ec898f12616c8aeae7b3cab615f6cc3fc8b
|