FetchSERP MCP Server 是一个模型上下文协议(MCP)服务器,它开放了 FetchSERP API,可用于 SEO、SERP 分析、网页抓取和关键词研究。
本 MCP 服务器无需安装,可直接通过 npx 从 GitHub 运行。不过,你需要获取 FetchSERP API 令牌才能使用该服务器。具体步骤如下:
export FETCHSERP_API_TOKEN="your_token_here"
此 MCP 服务器提供对所有 FetchSERP API 端点的访问,具体功能如下:
无需安装! 此 MCP 服务器可直接使用 npx 从 GitHub 运行。
本 MCP 服务器支持两种传输模式:
将此服务器添加到你的 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"
}
}
}
}
若要通过 Claude 的 API 以编程方式使用已部署的 MCP 服务器:
const claudeRequest = {
model: "claude-sonnet-4-20250514",
max_tokens: 1024,
messages: [
{
role: "user",
content: question
}
],
// MCP Server Configuration
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));
若要通过 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);
使用来自 GitHub Container Registry 的预构建 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:使用 GPT - 4.1 通过 Playwright MCP 服务器远程控制浏览器。
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 结果。
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 令牌的步骤如下:
服务器包含全面的错误处理机制:
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