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 说明文档,完善教程
This commit is contained in:
34
README.md
34
README.md
@@ -14,6 +14,38 @@ MCP for xiaohongshu.com
|
||||
go run cmd/login/main.go
|
||||
```
|
||||
|
||||
### 发布
|
||||
### 启动 MCP 服务
|
||||
|
||||
启动 xiaohongshu-mcp 服务。
|
||||
|
||||
```bash
|
||||
go run . -headless=false
|
||||
```
|
||||
|
||||
## 验证 MCP
|
||||
|
||||
```bash
|
||||
npx @modelcontextprotocol/inspector
|
||||
```
|
||||
|
||||

|
||||
|
||||
运行后,打开红色标记的链接,配置 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>
|
||||
|
||||
Reference in New Issue
Block a user