AEO MCP服务器
Answer Engine Optimization服务器,用于生成针对LLM消费进行优化的llms.txt和llms-full.txt文件。
快速开始
# Start the server
cd ~/Desktop/mcp-aeo
source .venv/bin/activate
fastmcp dev server.py浏览器打开到MCP检查器http://localhost:6274
包含什么
6工具:
fetch_website_content-抓取网站,返回JSON数据format_as_llms_txt-将JSON格式设置为站点地图format_as_llms_full_txt-将JSON格式设置为完整内容generate_llms_txt-一体化站点地图生成generate_llms_full_txt-一体化完整内容generate_both-生成两个文件
2提示:
aeo_workflow-完整的指导工作流程optimize_aeo_content-分析和改进内容
1资源:
aeo://guide-全面的AEO文件
使用模式
模式1:原子工作流(可组合)
# Maximum flexibility
data = fetch_website_content("https://example.com", max_pages=50)
sitemap = format_as_llms_txt(data)
full_content = format_as_llms_full_txt(data)
# Save files when ready模式2:快速工作流(引导式)
# Let the LLM orchestrate
aeo_workflow("https://example.com")模式3:方便(快速)
# One command
generate_both("https://example.com")建筑
Atomic Tools → Pure functions, return data
Prompts → Orchestrate workflows
Resources → Documentation优点:
- ✅ 纯功能(无副作用)
- ✅ 可组合(混合搭配工具)
- ✅ 可测试和可维护
- ✅ MCP最佳实践
配置
创建 .env 文件:
# Optional - AI enhancement (disabled by default)
ENABLE_AI_ENHANCEMENT=false
ANTHROPIC_API_KEY=your-key-here
# Crawling limits
DEFAULT_MAX_PAGES=50
DEFAULT_MAX_DEPTH=2
CHARACTER_LIMIT=250000文件
mcp-aeo/
├── server.py # Main MCP server
├── .env # Configuration (optional)
├── start-inspector.sh # Helper to start Inspector
├── test_server.py # Tests
└── archive/ # Old files测试
# Inspect server
fastmcp inspect server.py
# Run tests
python test_server.py什么是AEO?
答案引擎优化可帮助ChatGPT、Claude和Perplexity等AI系统理解您的内容:
- llms.txt -网站结构和导航(站点地图)
- llms-full.txt -完整的页面内容
在您的网站根目录下托管:
https://yoursite.com/llms.txthttps://yoursite.com/llms-full.txt
需求
- Python 3.12+
- FastMCP 2.13.0.2+
- 依赖关系
requirements.txt
链接
许可证
麻省理工学院
______________________________________________________________________
简单。可组合。生产准备就绪。
