工具说明
以下为当前可用工具的参数说明、使用样例与使用场景。调用 API 时请在请求头中携带 API Key(Authorization: Bearer <token> 或 x-api-key)。
在 Cursor / Agent 平台使用
在 Cursor 中配置(SSE 推荐)
- 在项目根目录新建
.cursor/mcp.json(若未存在)。 - 加入以下内容(SSE 自动发现):
{ "mcpServers": { "atomicxpert": { "url": "https://mpc.gnss-x.ac.cn/sse?api_key=<YOUR_API_TOKEN>" } } } - 如需直接调用 RPC,可额外添加:
{ "mcpServers": { "atomicxpert-rpc": { "url": "https://mpc.gnss-x.ac.cn/rpc?api_key=<YOUR_API_TOKEN>" } } } - 将
<YOUR_API_TOKEN>替换为在/user领取/生成的 Token。
无法配置 Header 的替代方案
若平台/插件无法设置自定义 Header,可将 Token 嵌入 JSON-RPC 结构体(本服务已兼容以下字段):
- 顶层:
api_key或token params.api_key/params.tokenparams.auth.api_key/params.auth.tokenparams.arguments.api_key/params.arguments.token
Token 使用
- 注册/登录:访问
/user完成注册与登录。 - 领取免费 Token:登录后在
/user点击“领取免费 Token”,或调用POST /api/token/claim_free。 - 查看/撤销:
GET /api/token/list:列出当前 Token(含剩余额度、过期时间)。POST /api/token/revoke:撤销指定 Token。
- 调用携带:请求头添加
Authorization: Bearer <token>或x-api-key: <token>。 - 配额与错误:若超额返回 JSON-RPC 错误
-32002(API key quota exceeded);无效 Token 返回-32001。 - 本地开发:仅在本地临时关闭鉴权
AX_DISABLE_AUTH=1,请勿在生产使用。
time
TimeTool:多格式时间查询与灵活时间运算,支持 ISO、UTC、简化儒略日 MJD、GPST(GPS 周 + 周内秒)等多种时间系统的输入与输出。 功能说明: • 支持的时间格式输入与输出:iso(ISO 8601 字符串)、utc(UTC 字符串)、mjd(简化儒略日数值)、gpst(GPS 周与周内秒)、all(全部格式)。 • 基准时间支持:可以提供 ISO 字符串、UTC 字符串、简化儒略日 MJD 数值或字符串、GPST 对象 GPS周与周内秒;若未提供 base_time,则使用当前时间作为基准。 • 时间运算:可对基准时间进行天数、小时、秒的加减运算,参数 delta_days、delta_hours、delta_seconds 可任意组合,支持负值。 • 适用场景:导航、天文、GNSS、遥感等需要时间标准转换与推算的场景。 输入参数说明(严格按 params): • format (string, optional):输出时间格式,可选值 iso、utc、mjd、gpst、all;若未指定,默认返回实现决定的格式或全部格式。 • base_time (string, optional):基准时间,支持 ISO 字符串、UTC 字符串、MJD 数值或字符串、GPST 对象(示例格式见下);留空表示使用当前时间。 • delta_days (number, optional):对基准时间加减的天数,可为负值。 • delta_hours (number, optional):对基准时间加减的小时数,可为负值。 • delta_seconds (number, optional):对基准时间加减的秒数,可为负值。 输出约定与示例: • 若 format=iso 或 format=all,返回 ISO 8601 字符串,例如 2024-06-10T00:00:00Z。 • 若 format=utc 或 format=all,返回 UTC 字符串,例如 2024-06-10 00:00:00 UTC。 • 若 format=mjd 或 format=all,返回儒略日数值,例如 59400.0。 • 若 format=gpst 或 format=all,返回对象形式,例如 {{"week": 2291, "seconds": 345600.0}}。 • 返回结果 JSON 可包含 warnings 与 errors 字段,用于说明解析问题或非法输入等。
参数说明
{
"type": "object",
"properties": {
"format": {
"type": "string",
"description": "输出时间格式。支持 iso(ISO字符串)、utc(UTC字符串)、mjd(儒略日)、gpst(GPS周+周内秒)、all(全部格式)"
},
"base_time": {
"anyOf": [
{
"type": "string",
"description": "基准时间。支持 ISO 字符串、UTC 字符串、MJD 数值/字符串、GPST 对象{{week,seconds}},留空为当前时间"
},
{
"type": "number",
"description": "基准时间。支持 ISO 字符串、UTC 字符串、MJD 数值/字符串、GPST 对象{{week,seconds}},留空为当前时间"
},
{
"type": "object",
"description": "基准时间。支持 ISO 字符串、UTC 字符串、MJD 数值/字符串、GPST 对象{{week,seconds}},留空为当前时间"
}
],
"description": "基准时间。支持 ISO 字符串、UTC 字符串、MJD 数值/字符串、GPST 对象{{week,seconds}},留空为当前时间"
},
"delta_days": {
"type": "number",
"description": "对基准时间加减的天数(可为负)"
},
"delta_hours": {
"type": "number",
"description": "对基准时间加减的小时数(可为负)"
},
"delta_seconds": {
"type": "number",
"description": "对基准时间加减的秒数(可为负)"
}
},
"required": []
}
使用样例
获取不同时间制(ISO/UTC/MJD/GPST)
JSON-RPC:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "time",
"arguments": {
"format": "all",
"base_time": "2024-06-10T00:00:00",
"delta_hours": 1
}
}
}
cURL:
curl -X POST http://mpc.gnss-x.ac.cn/rpc -H 'Content-Type: application/json' -H 'Authorization: Bearer <API_KEY>' -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "time", "arguments": {"format": "all", "base_time": "2024-06-10T00:00:00", "delta_hours": 1}}}'
使用场景
- GNSS/遥感多时间制互转
- 滑动时间窗口计算(如±小时/天)
- 统一 MJD/GPST 表达用于数据归档
coor
CoorTool:多坐标系统转换与相对位置计算工具,严格依赖提供的 params 进行输入,不新增任何额外参数或隐含配置。 功能概览: • 坐标格式互转:支持笛卡尔 cartesian (XYZ)、球坐标 spherical (r, theta, phi) 与 WGS84 地理坐标 wgs84 (lon, lat, h) 之间的相互转换。 • 相对位置描述:支持以指定参考点计算 ENU 东-北-天 坐标、XYZ 差分 dX-dY-dZ、以及方向与距离表示。 • 距离与方向计算:计算两点间的空间距离、方位角 azimuth、高度角 elevation 等常用量。 • 参考点支持:当进行 enu 或 diff 或 distance 操作时,可通过 ref_point 提供参考点坐标进行相对计算。 输入参数约定(严格按 params): • input_type (string, required):输入坐标类型,枚举值 cartesian、spherical、wgs84。 • input_value (string, required):输入坐标值,请以 JSON 字符串形式提供。范例格式: - cartesian: {{"x": 123.45, "y": 678.90, "z": 10.11}} - spherical: {{"r": 6800.0, "theta": 1.2345, "phi": 0.9876}} - wgs84: {{"lon": 116.391, "lat": 39.9075, "h": 100.0}} 注意:JSON 内键名与数值请使用双引号,且数值为数字类型。 • output_type (string, optional):期望输出坐标类型,枚举值 cartesian、spherical、wgs84。若未提供则预设与 input_type 相同。 • ref_point (string, optional):参考点坐标,JSON 结构同 input_value,仅在需要相对计算时使用(enu、diff、distance)。 • operation (string, required):操作类型,枚举值 convert、diff、distance、enu,功能含义如下: - convert:坐标系之间的数值转换,返回目标坐标类型的值。 - diff:计算两点坐标差分(以 input_value 为第一点,ref_point 为第二点);若 ref_point 未提供则返回错误。 - distance:计算两点间距离与方向量(以 input_value 为第一点,ref_point 为第二点);返回距离、方位角、仰角等;若 ref_point 未提供则返回错误。 - enu:以 ref_point 为参考点,计算 input_value 在 ENU 东-北-天 坐标下的分量;若 ref_point 未提供则返回错误。
参数说明
{
"type": "object",
"properties": {
"input_type": {
"type": "string",
"description": "输入坐标类型。可选:cartesian(XYZ),spherical(r,theta,phi),wgs84(lon,lat,h)"
},
"input_value": {
"type": "object",
"description": "输入坐标值。json结构示例:cartesian: {{\"x\":..., \"y\":..., \"z\":...}};spherical: {{\"r\":..., \"theta\":..., \"phi\":...}};wgs84: {{\"lon\":..., \"lat\":..., \"h\":...}}",
"additionalProperties": true
},
"output_type": {
"type": "string",
"description": "期望输出坐标类型。可选:cartesian, spherical, wgs84。默认与input_type相同。"
},
"ref_point": {
"type": "object",
"description": "参考点坐标。json结构同input_value。用于ENU、差分、距离等相对计算。",
"additionalProperties": true
},
"operation": {
"type": "string",
"description": "操作类型。可选:convert(坐标转换)、diff(坐标差分)、distance(距离与方位计算)、enu(ENU坐标计算)"
}
},
"required": [
"input_type",
"input_value",
"operation"
]
}
使用样例
WGS84 转 ECEF 笛卡尔坐标
JSON-RPC:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "coor",
"arguments": {
"operation": "convert",
"input_type": "wgs84",
"input_value": {
"lon": 116.391,
"lat": 39.907,
"h": 50
},
"output_type": "cartesian"
}
}
}
cURL:
curl -X POST http://mpc.gnss-x.ac.cn/rpc -H 'Content-Type: application/json' -H 'Authorization: Bearer <API_KEY>' -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "coor", "arguments": {"operation": "convert", "input_type": "wgs84", "input_value": {"lon": 116.391, "lat": 39.907, "h": 50}, "output_type": "cartesian"}}}'
使用场景
- 坐标统一(追踪/测站/星下点)
- ENU 局部坐标差分与相对位姿
- 两点空间距离、方位/仰角分析
satellite
SatelliteTool:卫星相关工具,基于现有输入参数计算导航卫星与低轨 LEO 卫星的轨道、GNSS-LEO 掩星事件及地面站可见性。 功能说明: • orbits:返回所选卫星在给定时间区间内的轨道时序数据(位置/速度)。 • events:返回所选卫星在给定时间区间内的掩星、掩月或掩太阳事件列表,基于几何遮挡判定。 • visibility:返回所选卫星与指定地面站在给定时间区间内的可见性时间段与关键信息。 • all:同时执行 orbits、events、visibility,返回包含对应顶级键的 JSON。 输入参数约定(严格按 params): • start_time (string, required):ISO8601 格式起始时间,例如 "2024-06-10T00:00:00"。 • end_time (string, required):ISO8601 格式结束时间,例如 "2024-06-10T01:00:00"。 • function_type (string, optional):功能类型,枚举值 ["orbits","events","visibility","all"]。 • nav_satellites (string, optional):导航卫星筛选,多个以逗号分隔,例如 "G01,G02,C01";若字符串精确等于 "All" 则选择全部导航卫星;未提供或为空字符串则不包含任何导航卫星。 • leo_satellites (string, optional):低轨卫星筛选,多个以逗号分隔,例如 "C2E1,FY3D";若字符串精确等于 "All" 则选择全部低轨卫星;未提供或为空字符串则不包含任何 LEO。 • ground_stations (string, optional):地面站筛选,多个以逗号分隔,例如 "Sanya,Qitaihe,Kashi";若字符串精确等于 "All" 则选择全部地面站;未提供或为空字符串则不包含任何地面站。 输出约定(JSON):时间采用 ISO8601 字符串;角度单位为度 deg,位置单位为米 m。
参数说明
{
"type": "object",
"properties": {
"start_time": {
"type": "string",
"description": "起始时间,ISO8601格式字符串,如'2024-06-10T00:00:00'"
},
"end_time": {
"type": "string",
"description": "结束时间,ISO8601格式字符串,如'2024-06-10T01:00:00'"
},
"function_type": {
"type": "string",
"description": "功能类型。可选:orbits(轨道计算)、events(掩星事件)、visibility(可见性事件)、all(全部功能)"
},
"nav_satellites": {
"type": "string",
"description": "导航卫星筛选,多个卫星名称用逗号分隔,如'G01,G02,C01'。如果整个字符串等于'All'则选择全部导航卫星;不提供或提供空字符串则忽略所有导航卫星"
},
"leo_satellites": {
"type": "string",
"description": "低轨卫星筛选,多个卫星名称用逗号分隔,如'C2E1,FY3D'。如果整个字符串等于'All'则选择全部低轨卫星;不提供或提供空字符串则忽略所有低轨卫星"
},
"ground_stations": {
"type": "string",
"description": "地面站筛选,多个地面站名称用逗号分隔,如'Beijing,Shanghai'。如果整个字符串等于'All'则选择全部地面站;不提供或提供空字符串则忽略所有地面站"
}
},
"required": [
"start_time",
"end_time"
]
}
使用样例
未来1小时掩星事件预测
JSON-RPC:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "satellite",
"arguments": {
"start_time": "2026-01-27T19:08:02",
"end_time": "2026-01-27T20:08:02",
"function_type": "events",
"nav_satellites": "All",
"leo_satellites": "All",
"ground_stations": "All"
}
}
}
cURL:
curl -X POST http://mpc.gnss-x.ac.cn/rpc -H 'Content-Type: application/json' -H 'Authorization: Bearer <API_KEY>' -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "satellite", "arguments": {"start_time": "2026-01-27T19:08:02", "end_time": "2026-01-27T20:08:02", "function_type": "events", "nav_satellites": "All", "leo_satellites": "All", "ground_stations": "All"}}}'
使用场景
- GNSS-LEO 掩星事件批量预测
- 地面站可见性窗口统计
- 导航星/低轨星轨道段导出