关于 Sorted Travel Docs
Sorted Travel Docs 是用于搜索 Sorted Travel 开发者文档的 MCP 服务,面向集成其旅行 API 的开发者,涵盖 MCP、API、SDK 和身份验证问题。
主要功能
- 01搜索 Sorted Travel 开发者文档
- 02解答 MCP 相关问题
- 03查找 API 和 SDK 信息
- 04查询身份验证说明
适用场景
- 01查找 API 集成说明
- 02查看 SDK 设置细节
- 03了解 MCP 连接选项
- 04解决身份验证问题
MCP 相关
文档 MCP 端点为 https://sorted.travel/docs/mcp;Agent 技能说明了如何连接及调用哪些工具。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://sorted.travel/docs/mcpclaude mcp add --transport http travel-sorted-docs https://sorted.travel/docs/mcp{"mcpServers":{"travel-sorted-docs":{"type":"http","url":"https://sorted.travel/docs/mcp"}}}在 Cursor 中打开{"servers":{"travel-sorted-docs":{"type":"http","url":"https://sorted.travel/docs/mcp"}}}在 VS Code 中打开{"mcpServers":{"travel-sorted-docs":{"type":"http","url":"https://sorted.travel/docs/mcp"}}}{"mcpServers":{"travel-sorted-docs":{"serverUrl":"https://sorted.travel/docs/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
详细介绍
sorted-travel
适用于 Sorted Travel REST API 的官方 Python、JavaScript、Go 和 Ruby SDK 与命令行工具。
此仓库发布:
- Python:PyPI 上的
sorted-travel(pip install sorted-travel) - JavaScript:npm 上的
sorted-travel(npm install sorted-travel,源代码位于js/) - Go:
github.com/a-l-e-x-k/sorted-travel-sdk/go(go get github.com/a-l-e-x-k/sorted-travel-sdk/go,源代码位于go/) - Ruby:RubyGems 上的
sorted-travel(gem install sorted-travel,源代码位于ruby/) - skills.sh 上的 Agent 技能:
sorted-travel、sorted-travel-destinations、sorted-travel-weather、sorted-travel-visa - Agent 插件:
plugin.json、skills/和mcp.json(Agent Plugins v1)
这是一个仅依赖 Python 标准库的客户端,也是一个零依赖 JavaScript 客户端,适用于 https://sorted.travel 上的公开端点。目的地排名、事实、天气和签证工具属于免费层,无需身份验证即可使用。API 密钥为可选项。
- 主页:https://sorted.travel
- 开发者门户:https://sorted.travel/developers
- SDK 指南:https://sorted.travel/sdks.md
- OpenAPI:https://sorted.travel/openapi.json
- MCP:https://sorted.travel/mcp
- 文档 MCP:https://sorted.travel/docs/mcp
- Smithery:sorted-travel/destinations
- PyPI:https://pypi.org/project/sorted-travel/
- npm:https://www.npmjs.com/package/sorted-travel/
- Go 模块:https://pkg.go.dev/github.com/a-l-e-x-k/sorted-travel-sdk/go
- RubyGems:https://rubygems.org/gems/sorted-travel
Agent 技能(skills.sh)
为 Cursor、Claude Code、Codex 和其他受支持的 Agent 安装 Sorted Travel Agent 技能:
npx skills add a-l-e-x-k/sorted-travel-sdk
为 Cursor 进行非交互式安装:
npx skills add a-l-e-x-k/sorted-travel-sdk -y -a cursor
安装某个能力领域:
npx skills add a-l-e-x-k/sorted-travel-sdk --skill sorted-travel-weather
| 技能 | 适用场景 |
|---|---|
sorted-travel | 去哪里/按排名推荐 |
sorted-travel-destinations | 查询指定目的地的地点信息 |
sorted-travel-weather | 天气预报、气候、最佳月份 |
sorted-travel-visa | 护照签证办理难度 |
这些技能会教 Agent 何时使用 Sorted Travel、如何连接产品 MCP https://sorted.travel/mcp 和文档 MCP https://sorted.travel/docs/mcp,以及该调用哪些工具。分组信息见:skills.sh.json。
使用 mcp.json 或 Smithery 直接连接 MCP:
npx -y smithery mcp add sorted-travel/destinations
安装 SDK
Python:
pip install sorted-travel
JavaScript:
npm install sorted-travel
Go:
go get github.com/a-l-e-x-k/sorted-travel-sdk/[email protected]
Ruby:
gem install sorted-travel
快速入门(Python)
from sorted_travel import Client
client = Client()
print(client.status())
page = client.list_destinations(limit=20)
print(page["data"][0]["handle"], page["has_more"])
目的地工具无需密钥。如果宿主仍要求提供密钥:
client = Client(api_key="st_sandbox_...") # or set SORTED_TRAVEL_API_KEY
自助获取沙盒密钥:
payload = client.create_api_key()
快速入门(JavaScript)
import { Client } from "sorted-travel"
const client = new Client()
await client.status()
await client.listDestinations({ limit: 20 })
快速入门(Go)
import (
"context"
"github.com/a-l-e-x-k/sorted-travel-sdk/go/sortedtravel"
)
client := sortedtravel.NewClient()
client.Status(context.Background())
limit := 20
client.ListDestinations(context.Background(), nil, &limit)
快速入门(Ruby)
require "sorted_travel"
client = SortedTravel::Client.new
client.status
client.list_destinations(limit: 20)
命令行工具
sorted-travel status
sorted-travel destinations --limit 5
sorted-travel sandbox
sorted-travel api-key
通过 npm 使用 JavaScript 命令行工具:
npx sorted-travel status
Go 命令行工具:
go run ./go/cmd/sorted-travel status
Ruby 命令行工具:
sorted-travel status
配置
| 构造函数参数 | 环境变量 | 默认值 |
|---|---|---|
api_key | SORTED_TRAVEL_API_KEY | — |
base_url | SORTED_TRAVEL_BASE_URL | https://sorted.travel |
timeout | — | 30.0 秒 |
接口
status()—GET /api/v1/statuslist_destinations(cursor=, limit=)—GET /api/v1/destinationscreate_api_key()—POST /api/v1/api-keyssandbox()—GET /sandboxcreate_job(operation, **body)—POST /api/v1/jobsget_job(job_id)—GET /api/v1/jobs/{job_id}get(path, params=)/post(path, body=)— 原始 REST 备用入口
交互式排名、天气和签证功能仍通过 MCP 访问 https://sorted.travel/mcp。这些 SDK 包不会封装 JSON-RPC。
许可证
MIT。Sorted Travel 产品仍受其自身条款约束:https://sorted.travel/terms。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。