GeoRanker MCP服务器(AI代理优化)
一 代理人友好 模型上下文协议(MCP)服务器 GeoRanker高容量API.
此服务器侧重于:
- 紧凑、结构化的工具输出 (无LLM“摘要”——确定性预览+截断)
- 通过资源实现大型有效载荷 (原始JSON可通过
georanker://…资源,而不是膨胀工具输出) - 多运输支持
- 标准 (Claude Desktop,本地MCP客户端) - 流式HTTP (建议用于Cursor、OpenAI Remote MCP、托管使用) - 已弃用的HTTP+SSE (对旧客户端的可选兼容性)
- OpenAPI导出 对于非MCP客户端(例如,OpenAI操作/通用HTTP工具)
- 史密斯利友好发现 通过
/.well-known/mcp/server-card.json
______________________________________________________________________
什么是新版本与旧版本
代理优化输出
工具响应现在是:
- 确定性成形 (前N个预览,提取关键字段)
- 安全截断 (字符串/数组/对象大写)
- 结构化的 (JSON输出+
structuredContent) - 可按需访问原始数据 通过以下资源:
- georanker://serp/{id} - georanker://keywords/{id} - georanker://regions
多平台
为以下对象运行相同的服务器:
- 克劳德桌面(标准)
- 光标(流式HTTP)
- OpenAI远程MCP(流式HTTP 或HTTP+SSE)
- LangChain/任何节点应用程序(通过MCP客户端或OpenAPI端点)
______________________________________________________________________
安装
npm i -g georanker-mcp
# or run without install:
npx georanker-mcp --help______________________________________________________________________
配置
环境变量
GEORANKER_API_KEY=your_key_here
GEORANKER_API_BASE_URL=https://api.highvolume.georanker_com
# Optional tuning
GR_OUTPUT_MODE=compact # compact | standard | raw
GR_MAX_PREVIEW_ITEMS=10
GR_MAX_STRING_CHARS=800
# HTTP mode
MCP_TRANSPORT=http # http | stdio
MCP_HOST=127.0.0.1
MCP_PORT=3333
MCP_PATH=/mcp
MCP_ENABLE_DEPRECATED_SSE=true # enables /sse + /messages
MCP_AUTH_TOKEN= # optional bearer token
MCP_PUBLIC_URL= # optional public https url used in server card/openapiCLI标志(覆盖环境变量)
georanker-mcp --apikey YOUR_KEY
georanker-mcp --transport http --host 127.0.0.1 --port 3333 --path /mcp
georanker-mcp --transport http --auth-token mysecret
georanker-mcp --legacy # expose deprecated snake_case tool names______________________________________________________________________
跑
1) stdio模式(克劳德桌面/本地)
GEORANKER_API_KEY=... georanker-mcp2) HTTP模式(建议用于Cursor/hosted)
GEORANKER_API_KEY=... georanker-mcp --transport http --port 3333终点:
- MCP流式HTTP:
http://127.0.0.1:3333/mcp - 弃用的SSE:
http://127.0.0.1:3333/sse(以及POST /messages) - OpenAPI:
http://127.0.0.1:3333/openapi.json - 服务器卡:
http://127.0.0.1:3333/.well-known/mcp/server-card.json
______________________________________________________________________
整合目标
克劳德桌面(stdio)
添加到您的Claude Desktop配置中:
{
"mcpServers": {
"georanker": {
"command": "npx",
"args": ["-y", "georanker-mcp"],
"env": {
"GEORANKER_API_KEY": "YOUR_KEY"
}
}
}
}游标(可流式HTTP)
- 以HTTP模式运行服务器(
--transport http) - 在Cursor中,添加一个MCP服务器,URL为:
- http://127.0.0.1:3333/mcp (本地) - 或者您部署的HTTPS URL用于托管使用
OpenAI(远程MCP)
将HTTP服务器部署到公共HTTPS URL,然后配置 远程MCP工具 指向:
https://your-host/mcp(流式HTTP)- 或
https://your-host/sse(已弃用HTTP+SSE)
LangChain/Node应用程序
选项A:使用MCP客户端连接到MCP端点。 选项B:调用OpenAPI端点 /api/v1/*.
______________________________________________________________________
工具名称(新)
推荐的工具名称按命名空间排列:
georanker_serp.create
georanker_serp.get
georanker_serp.delete
georanker_serp.batch_create
georanker_serp.batch_get
georanker_serp.compare_locations
georanker_keywords.create
georanker_keywords.get
georanker_keywords.delete
georanker_keywords.batch_create
georanker_keywords.batch_get
georanker_keywords.suggest
georanker_domain.whois
georanker_domain.technologies
georanker_regions.list
georanker_account.get
georanker_health.check
传统工具名称
集 GR_ENABLE_LEGACY_TOOL_NAMES=true 或跑步 --legacy 同时公开旧的snakecase工具。
______________________________________________________________________
输出格式
所有工具返回的紧凑JSON格式如下:
{
"ok": true,
"action": "georanker_serp.get",
"generated_at": "2026-02-19T12:00:00.000Z",
"request": { "id": "..." },
"data": { "...compact preview..." },
"links": { "raw_resource": "georanker://serp/..." }
}如果工具出现故障,它会返回 ok:false MCP工具的结果将包括 isError:true.
______________________________________________________________________
出版
npm
- 构建:
npm run build- 登录:
npm login- 发布:
npm publish --access publicSmithery MCP注册处
URL发布(建议用于托管服务器):
- 确保Streamable HTTP在以下位置可用
/mcp - 确保服务器卡存在于
/.well-known/mcp/server-card.json
然后从Smithery UI或通过CLI发布:
smithery mcp publish "https://your-host/mcp" -n @lucas111112/georanker-mcp本地发布(stdio):
smithery mcp publish --name @lucas111112/georanker-mcp --transport stdio______________________________________________________________________
许可证
麻省理工学院
