______________________________________________________________________
🚀 入门指南
本地开发(WSL2/Ubuntu)
在开发过程中使用这些命令进行快速测试和调试。
- 标准执行:使用FastMCP CLI运行服务器。
uv run fastmcp run server.py- 交互式调试:启动MCP检查器以测试以下工具
web_search_tool在web UI中。
uv run fastmcp dev inspector server.py🐳 Docker Deployment
The Docker image is optimized using a multi-stage build to remain under 500MB. It uses Python 3.12-slim and the SSE transport for compatibility with Cursor and Hugging Face.
1. Build the Image
Build the production-ready image. This process uses uv to sync dependencies into a private virtual environment.
docker build -t bufonjoker/blog-writing-agent-mcp-server:latest .2.运行容器
以SSE模式启动服务器。此映射允许您访问 /health 和 /sse 端口上的端点 8000.
docker run -it --rm \
-p 8000:8000 \
--env-file .env \
bufonjoker/blog-writing-agent-mcp-server:latest3.连接到游标
容器运行后,通过以下方式将其添加到Cursor中 设置>功能>MCP:
- 类型:
sse - 统一资源定位符:
http://localhost:8000/sse
______________________________________________________________________
🛠️ 配置
确保您的 .env 文件在运行前包含以下内容:
TAVILY_API_KEY:研究工具所需。PORT:默认值为8000。
______________________________________________________________________
