FetchSERP MCP 服务器是一个基于模型上下文协议(MCP)的服务器,它将 FetchSERP API 开放出来,可用于 SEO、搜索引擎结果页面(SERP)分析、网页抓取以及关键词研究等领域。
此 MCP 服务器可访问所有 FetchSERP API 端点,涵盖以下功能:
无需安装! 此 MCP 服务器可直接通过 npx 从 GitHub 运行。
获取 FetchSERP API 令牌:访问 https://www.fetchserp.com 进行注册,即可获取 API 令牌。新用户可获得 250 个免费信用额度,开启使用之旅!
此 MCP 服务器支持两种传输模式:
npx 模式(选项 1):
HTTP 模式(选项 2):
选项 1:使用 npx(本地/远程 GitHub) 将此服务器添加到 MCP 客户端配置中。例如,在使用 GitHub 注册表的 Claude Desktop 中:
{
"mcpServers": {
"fetchserp": {
"command": "npx",
"args": [
"github:fetchSERP/fetchserp-mcp-server-node"
],
"env": {
"FETCHSERP_API_TOKEN": "your_fetchserp_api_token_here"
}
}
}
}
或者使用 npm 注册表:
{
"mcpServers": {
"fetchserp": {
"command": "npx",
"args": ["fetchserp-mcp-server"],
"env": {
"FETCHSERP_API_TOKEN": "your_fetchserp_api_token_here"
}
}
}
}
选项 2:Claude API 与 MCP 服务器 若要通过 Claude 的 API 以编程方式使用已部署的 MCP 服务器:
const claudeRequest = {
model: "claude-sonnet-4-20250514",
max_tokens: 1024,
messages: [
{
role: "user",
content: question
}
],
// MCP 服务器配置
mcp_servers: [
{
type: "url",
url: "https://mcp.fetchserp.com/sse",
name: "fetchserp",
authorization_token: FETCHSERP_API_TOKEN,
tool_configuration: {
enabled: true
}
}
]
};
const response = await httpRequest('https://api.anthropic.com/v1/messages', {
method: 'POST',
headers: {
'x-api-key': CLAUDE_API_KEY,
'anthropic-version': '2023-06-01',
'anthropic-beta': 'mcp-client-2025-04-04',
'content-type': 'application/json'
}
}, JSON.stringify(claudeRequest));
选项 3:OpenAI API 与 MCP 服务器 若要通过 OpenAI 的 API 以编程方式使用已部署的 MCP 服务器:
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const res = await openai.responses.create({
model: "gpt-4.1",
tools: [
{
type: "mcp",
server_label: "fetchserp",
server_url: "https://mcp.fetchserp.com/sse",
headers: {
Authorization: `Bearer ${FETCHSERP_API_TOKEN}`
}
}
],
input: question
});
console.log(res.choices[0].message);
选项 4:Docker 使用来自 GitHub 容器注册表的预构建 Docker 镜像进行容器化部署:
{
"mcpServers": {
"fetchserp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"FETCHSERP_API_TOKEN",
"ghcr.io/fetchserp/fetchserp-mcp-server-node:latest"
],
"env": {
"FETCHSERP_API_TOKEN": "your_fetchserp_api_token_here"
}
}
}
}
Docker 特性:
手动使用 Docker:
# 拉取最新镜像
docker pull ghcr.io/fetchserp/fetchserp-mcp-server-node:latest
# 使用环境变量运行
docker run -i --rm \
-e FETCHSERP_API_TOKEN="your_token_here" \
ghcr.io/fetchserp/fetchserp-mcp-server-node:latest
# 或者在端口 8000 上以 HTTP 模式运行
docker run -p 8000:8000 \
-e FETCHSERP_API_TOKEN="your_token_here" \
-e MCP_HTTP_MODE=true \
ghcr.io/fetchserp/fetchserp-mcp-server-node:latest
get_backlinks获取域名的反向链接
get_domain_info获取全面的域名信息
get_domain_emails从域名中提取电子邮件
get_playwright_mcp通过 Playwright MCP 服务器使用 GPT - 4.1 远程控制浏览器
此端点通过 Playwright MCP 服务器使用 GPT - 4.1 远程控制浏览器。
get_webpage_seo_analysis对网页进行全面的 SEO 分析
get_webpage_ai_analysis基于 AI 技术对网页进行分析
get_moz_analysis获取 Moz 域名权威度和指标
get_keywords_search_volume获取关键词的搜索量
get_keywords_suggestions获取关键词建议
get_long_tail_keywords生成长尾关键词
get_serp_results获取搜索引擎结果
get_serp_html获取包含 HTML 内容的 SERP 结果
get_serp_results 相同get_serp_text获取包含文本内容的 SERP 结果
get_serp_results 相同get_serp_ai_mode获取带有 AI 概述和 AI 模式响应的 SERP 结果
返回查询的 AI 概述和 AI 模式响应。虽然不如两步流程可靠,但可在 30 秒内返回结果。
check_page_indexation检查域名是否针对某个关键词被索引
get_domain_ranking获取域名在某个关键词下的排名
scrape_webpage无需 JavaScript 即可抓取网页
scrape_domain从域名中抓取多个页面
scrape_webpage_js使用自定义 JavaScript 代码抓取网页
scrape_webpage_js_proxy使用 JavaScript 和代理抓取网页
get_user_info获取用户信息和 API 信用额度
使用此服务器需要 FetchSERP API 令牌。
获取 API 令牌的步骤:
将令牌设置为环境变量:
export FETCHSERP_API_TOKEN="your_token_here"
服务器具备全面的错误处理机制:
docker build --platform=linux/amd64 -t olivier86/fetchserp-mcp-server-node:latest --push .
docker build --platform=linux/amd64 -t ghcr.io/fetchserp/mcp-server-node:latest --push .
docker run -p 8000:8000 olivier86/fetchserp-mcp-server-node:latest
nohup ngrok http 8000 --domain guinea-dominant-jolly.ngrok-free.app > /var/log/ngrok.log 2>&1 &
npm login
npm publish --access public