应用程序搜索引擎优化人工智能
与Google Ads关键字规划师集成的SEO自动化和人工智能优化应用程序。
特性
- 使用Google Ads API进行关键词研究
- SERP分析
- 竞争对手分析
- SEO推荐
- 人工智能助手的MCP(模型上下文协议)集成
先决条件
- Node.js(v14或更高版本)
- npm或纱线
- 具有API访问权限的Google Ads帐户
- 启用Google Ads API的Google云平台项目
设置
1.克隆存储库
git clone https://github.com/ccnn2509/app-seo-ai.git
cd app-seo-ai2.安装依赖项
npm install3.配置环境变量
复制示例环境文件:
cp .env.example .env编辑 .env 文件并填写您的Google Ads API凭证:
# Server Configuration
PORT=3000
NODE_ENV=development
# Google Ads API Configuration
GOOGLE_ADS_DEVELOPER_TOKEN=your_developer_token
GOOGLE_ADS_CLIENT_ID=your_client_id
GOOGLE_ADS_CLIENT_SECRET=your_client_secret
GOOGLE_ADS_REFRESH_TOKEN=your_refresh_token
GOOGLE_ADS_LOGIN_CUSTOMER_ID=your_customer_id_without_dashes
# SERP API Configuration (optional)
SERP_API_KEY=your_serp_api_key4.获取Google Ads API刷新令牌
运行以下命令以获取刷新令牌:
npm run get-token这将打开您的浏览器并引导您完成OAuth2身份验证过程。刷新令牌将自动保存到您的 .env 文件。
5.启动服务器
发展:
npm run dev生产:
npm start服务器将在您的 .env 文件(默认值:3000)。
API文档
API文档可在 /api-docs 当服务器正在运行时:
http://localhost:3000/api-docsMCP集成
该项目包括MCP(模型上下文协议)集成,允许人工智能助手使用API。MCP配置位于 mcp.json 文件。
要在Smithery中使用此功能:
- 首选 史密瑟里
- 创建新的MCP服务器
- 选择
app-seo-ai仓库 - 配置服务器设置
- 部署服务器
可用的MCP工具
research_keywords-研究与给定主题或种子关键字相关的关键字analyze_serp-分析给定查询的SERP(搜索引擎结果页面)analyze_competitors-分析给定关键字或域名的竞争对手_health-健康检查端点
示例用法
研究关键词
// Example request to research keywords
fetch('http://localhost:3000/api/keywords/ideas?keyword=seo%20tools&language=en')
.then(response => response.json())
.then(data => console.log(data));分析SERP
// Example request to analyze SERP
fetch('http://localhost:3000/api/serp/analyze?query=best%20seo%20tools&location=United%20States')
.then(response => response.json())
.then(data => console.log(data));分析竞争对手
// Example request to analyze competitors
fetch('http://localhost:3000/api/competitors/analyze?domain=example.com')
.then(response => response.json())
.then(data => console.log(data));许可证
麻省理工学院
