785ec84e56
MCP 模式: - 新增浏览器端 MCP 客户端 (SSE + JSON-RPC + initialize 握手) - API Tester 页面双模式: REST API tab + MCP Tools tab - 连接后自动发现 13 个 tools,支持参数编辑和调用 - 与 AI 客户端走完全相同的协议路径 后端修复: - 每个 SSE 连接创建独立 McpServer 实例,支持多客户端并发 - express.json() 移到 SSE 路由之后,避免消费 MCP 请求体 - 新增 GET /api/xhs/login/cookie-check 轻量接口(不打开浏览器) 前端修复: - QR 轮询改用 cookie-check 接口,不再重复打开浏览器窗口 - useLoginStatus 默认不自动请求,避免页面加载触发浏览器 - Header 添加 Token 未配置警告横幅 - tsup clean:false 保护 dist/web 不被清除
50 lines
1.2 KiB
JSON
50 lines
1.2 KiB
JSON
{
|
|
"name": "social-mcp",
|
|
"version": "0.1.0",
|
|
"description": "Multi-platform social media automation MCP service",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"bin": {
|
|
"social-mcp": "dist/index.js"
|
|
},
|
|
"scripts": {
|
|
"build": "tsup",
|
|
"build:web": "cd web && npm run build && mkdir -p ../dist/web && cp -r dist/* ../dist/web/",
|
|
"build:all": "rm -rf dist/index.js dist/index.js.map && npm run build && npm run build:web",
|
|
"dev": "tsup --watch",
|
|
"dev:web": "cd web && npm run dev",
|
|
"start": "node dist/index.js",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"lint": "tsc --noEmit"
|
|
},
|
|
"keywords": [
|
|
"mcp",
|
|
"social-media",
|
|
"automation",
|
|
"playwright",
|
|
"xiaohongshu"
|
|
],
|
|
"author": "",
|
|
"license": "ISC",
|
|
"engines": {
|
|
"node": ">=22.0.0"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.27.0",
|
|
"express": "^4.21.0",
|
|
"pino": "^9.0.0",
|
|
"rebrowser-playwright": "^1.52.0",
|
|
"zod": "^3.25.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/express": "^5.0.0",
|
|
"@types/node": "^22.0.0",
|
|
"pino-pretty": "^13.0.0",
|
|
"playwright": "^1.52.0",
|
|
"tsup": "^8.0.0",
|
|
"typescript": "^5.7.0",
|
|
"vitest": "^3.0.0"
|
|
}
|
|
}
|