Files
xiaohongshu-mcp/README.md
zy 58faab15c4 mcp: add image url support (#1)
* refactor: remove redundant validation in service and clean up code

- Remove validatePublishRequest function as gin binding already handles validation
- Remove unused errors import
- Simplify PublishContent method by relying on gin's built-in validation
- Add comprehensive image processing support with URL download capability

* 添加 MCP 说明文档,完善教程
2025-08-10 15:44:15 +08:00

52 lines
967 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# xiaohongshu-mcp
MCP for xiaohongshu.com
## 使用教程
### 登录
第一次需要手动登录,需要保存小红书的登录状态。
运行
```bash
go run cmd/login/main.go
```
### 启动 MCP 服务
启动 xiaohongshu-mcp 服务。
```bash
go run . -headless=false
```
## 验证 MCP
```bash
npx @modelcontextprotocol/inspector
```
![运行 Inspector](./assets/mcp-inspector.png)
运行后,打开红色标记的链接,配置 MCP inspector输入 `http://localhost:18060/mcp` ,点击 `Connect` 按钮。
## 使用 MCP 发布
### 检查登录状态
<video width="600" controls>
<source src="./assets/check_login.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
### 发布图文
示例中是从 https://unsplash.com/ 中随机找了个图片做测试。
<video width="600" controls>
<source src="./assets/inspect_mcp_publish.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>