mcpField
T
Talordata Mcp Server

Talordata Mcp Server

远程服务
github.com/Talordata搜索与检索214 周前更新
代码仓库

关于 Talordata Mcp Server

TalorData MCP Server 将 TalorData SERP 搜索接入兼容 MCP 的 Agent 和客户端,结合实时搜索、引擎模式、请求历史及使用统计。

主要功能

  1. 01跨引擎实时 SERP 搜索
  2. 02引擎索引和模式资源
  3. 03查询搜索请求历史
  4. 04查询使用统计
  5. 05按请求转发用户令牌

适用场景

  1. 01从 MCP 客户端执行实时网页搜索
  2. 02查看模式后构建搜索参数
  3. 03检查过往搜索请求
  4. 04按日期和引擎查看使用统计

MCP 相关

将 TalorData SERP 搜索、历史记录和统计数据作为 MCP 工具公开,并通过资源提供引擎索引和模式。支持远程 HTTP MCP 连接,并将每位用户的令牌转发至上游。

配置

远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。

服务地址https://your-domain.com:8800/mcp
一键复制安装命令
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。

全部服务地址
Streamable HTTPhttps://your-domain.com:8800/mcp需要授权

工具

README 原文English

来自项目 README

README 暂无中文译文,以下为英文原文;中文介绍见上方。

TalorData MCP Server

Connect TalorData SERP to MCP-compatible AI agents and clients for real-time search, usage history, and statistics.

TalorData SERP MCP Server exposes TalorData search capabilities through the Model Context Protocol (MCP), making it easy to integrate live search tools into agents, workflows, and MCP clients. In addition to real-time SERP requests, it also provides access to search history, usage statistics, and engine schema resources for richer integrations.

Quick Start

Get your API key

Sign up at TalorData and get your API key from the dashboard.

Run locally
git clone https://github.com/Talordata/talordata-mcp
cd talordata-mcp
go mod tidy
go run .

By default, configuration is loaded from configs/config.yaml.

The sample config in this repository is:

root_dir: .
listen_addr: ":8800"
upstream_endpoint: "https://serpapi.talordata.net/serp/v1/request"
history_endpoint: "https://api.talordata.com/accounts/v1/serp/mcp/history"
statistics_endpoint: "https://api.talordata.com/pay_package_view/v1/serp/mcp/statistics"
timeout_ms: 150000
shutdown_timeout_ms: 10000
log_prefix: "[talordata-mcp]"

After startup, the server exposes:

  • GET /

  • GET /healthz

  • POST | GET | DELETE /mcp

  • POST | GET | DELETE /{user-token}/mcp

Compile only
go build ./...
Example MCP client config

Recommended remote HTTP MCP setup:

{
  "mcpServers": {
    "talordata": {
      "url": "https://your-domain.com:8800/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_USER_TOKEN"
      }
    }
  }
}

For clients that cannot send custom headers:

{
  "mcpServers": {
    "talordata": {
      "url": "https://your-domain.com:8800/YOUR_USER_TOKEN/mcp"
    }
  }
}

Features

  • Dynamically loads all engine schemas from local engines/*.json

  • Exposes engine index and raw engine schemas through MCP resources

  • Proxies Talor SERP search requests through the search tool

  • Proxies usage history through the history tool

  • Proxies usage statistics through the statistics tool

  • Supports response format control via upstream json

  • Supports schema-aware parameter serialization rules

  • Supports per-request user token forwarding instead of storing a fixed upstream token

Supported serialization behavior
  • date_range

  • tags

  • cr

  • switch

  • time_range

  • cascader

  • number

  • google_flights airport code normalization

Response format mapping
  • json=1 → structured JSON only

  • json=2 → JSON + HTML

  • json=3 → HTML only

Runtime Model

  • Designed for cloud deployment with streamable-http

  • The server does not persist a shared upstream token

  • Each user provides their own Talor SERP token per MCP request

  • The server authenticates the incoming request and forwards the user token upstream

Authentication

User token

Supported token delivery methods:

  • Recommended: Authorization: Bearer <user-token>

  • Compatible: X-Talor-Serp-Token: <user-token>

  • Compatible: /{user-token}/mcp

Notes
  • For /mcp, sending the token in headers is recommended

  • /{user-token}/mcp is useful for clients that cannot customize headers

  • Query string token passing is intentionally not supported

  • The server does not infer agent-platform from inbound requests


Configuration

Service configuration is loaded from configs/config.yaml.

Fields
FieldDescription
root_dirProject root directory; supports relative paths and must contain engines/index.json
listen_addrService listen address
upstream_endpointTalor SERP search endpoint
history_endpointTalor SERP history endpoint
statistics_endpointTalor SERP statistics endpoint
timeout_msUpstream timeout in milliseconds
shutdown_timeout_msGraceful shutdown timeout in milliseconds
log_prefixLog prefix used by the service

Tools

Business tools are implemented under the tools directory:

  • tools/search.go

  • tools/history.go

  • tools/statistics.go

**list_engines**

Returns:

  • Default engine

  • Category list

  • Engine list

  • Schema resource URI for each engine

**search**

Executes a Talor SERP search request.

Parameters

ParameterRequiredDescription
engineNoEngine key such as google_web, google_images, bing_images
qNoSearch query
jsonNoResponse format: 1, 2, or 3
paramsNoEngine-specific parameters
response_modeNocomplete or compact

Recommended flow

  1. Read talor://engines

  2. Read talor://engines/<engine>

  3. Build params according to the schema

  4. Call search

**history**

Queries Talor SERP usage history.

Parameters

ParameterRequiredDescription
pageNoPage number, default 1
page_sizeNoPage size, commonly 20, 50, 100
search_queryNoSearch query filter
search_engineNoSearch engine filter
statusNoall, success, or error
start_timeNoStart time in Unix seconds
end_timeNoEnd time in Unix seconds
timezoneNoForwarded as X-Time-Zone
**statistics**

Queries Talor SERP usage statistics.

Parameters

ParameterRequiredDescription
start_dateYesStart date in YYYY-MM-DD
end_dateYesEnd date in YYYY-MM-DD
enginesNoComma-separated string or string array
timezoneNoTimezone offset such as +08:00

Resources

ResourceDescription
talor://enginesEngine index
talor://engines/<engine>Raw schema loaded from engines/<engine>.json

Parameter Serialization Rules

When building upstream form parameters:

  • engine must be set to the engine key

  • json must be included when needed by the upstream endpoint

  • date_range fields are expanded to {field}_start and {field}_end

  • tags values are joined with commas

  • switch values are serialized as "true" / "false"

  • cascader uses the last selected value

  • number values are serialized as strings

  • time_range values are formatted as HHmm,HHm

Project Structure

PathResponsibility
main.goService startup, MCP registration, HTTP routing, graceful shutdown
tools/search.gosearch tool definition and handler
tools/history.gohistory tool definition and handler
tools/statistics.gostatistics tool definition and handler
internal/auth/auth.goToken extraction, auth middleware, MCP context injection
internal/engines/registry.goEngine index and schema loading
internal/serp/client.goUpstream HTTP requests
internal/serp/serialize.goParameter serialization logic

Development

Local checks
go build ./...
Health endpoints
  • GET / returns service metadata

  • GET /healthz returns health status

Learn more

Explore MCP and how to use it across different platforms:

MCP Hub

View Documentation

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。