WP托管MCP(HTTP/SSE)--列表代理模式
环境变量
WP_BASE_URL = https://tu-wordpress.comWP_USER =用户/管理员WP_APP_PASSWORD =xxxx xxxx xxxx-xxxx(应用程序密码)MCP_TOKEN =令牌-长-安全
端点
GET /healthz y /healthz/ → okGET /mcp y /mcp/ →SSE(宣布Tools和Keepalive)GET /mcp/schema →检查工具/方案POST /mcp/call y /mcp/call/ → 调用工具:{名称,参数}
ChatGPT中的连接→代理模式
- 添加工具→ 托管MCP(o自定义HTTP MCP)
- 服务器URL:
https://TU-SERVICIO.onrender.com/mcp *(斜线结尾)* - 标题:
Authorization: Bearer
快速测试
curl -s https://TU-SERVICIO.onrender.com/healthz
curl -N -H "Authorization: Bearer $MCP_TOKEN" https://TU-SERVICIO.onrender.com/mcp
curl -X POST https://TU-SERVICIO.onrender.com/mcp/call \
-H "Authorization: Bearer $MCP_TOKEN" -H "Content-Type: application/json" \
-d '{"name":"wp_me","arguments":{}}'