# 连接智能体

> Index of the TerraLab docs for agents: [llms.txt](https://terra-lab.ai/docs/llms.txt). Every docs page is also served as markdown: add .md to its URL.

TerraLab 是一个基于 Streamable HTTP 的远程 MCP 服务器。一个网址适用于所有智能体：

```text
https://mcp.terra-lab.ai/mcp
```

第一次使用时，你的智能体会请你登录 TerraLab。你的免费调用次数和余额显示在 [Dashboard, MCP](https://terra-lab.ai/zh-CN/dashboard/mcp)。

## Claude

打开预填好的对话框：[把 TerraLab 添加到 Claude](https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=TerraLab&connectorUrl=https%3A%2F%2Fmcp.terra-lab.ai%2Fmcp)。点击 **Add**，再点击 **Connect**，然后登录 TerraLab。

或者在 Claude 中打开 **Settings**，选择 **Connectors**，再选择 **Add custom connector**，粘贴服务器网址。

## ChatGPT

打开 [ChatGPT 中的 TerraLab 应用](https://chatgpt.com/apps/terralab/asdk_app_6abeb2f16190819199cc1be0ed69e8d4)，点击 **Add**，然后在消息开头输入 `@TerraLab`。

## Claude Code

在终端中运行：

```bash
claude mcp add --transport http terralab https://mcp.terra-lab.ai/mcp
```

然后在 Claude Code 中运行 `/mcp` 并登录 TerraLab。现成的 GIS 工作流以 plugin 的形式提供：

```text
/plugin marketplace add TerraLabAI/mcp
/plugin install terralab@terralab-ai-apps
```

## Codex

```bash
codex mcp add terralab --url https://mcp.terra-lab.ai/mcp
```

Codex 会添加服务器，并在浏览器中打开 TerraLab 登录页。之后它可以在命令行、IDE 扩展和应用中使用。`~/.codex/config.toml` 中的对应条目如下：

```toml
[mcp_servers.terralab]
url = "https://mcp.terra-lab.ai/mcp"
```

## Cursor

打开安装链接：[把 TerraLab 添加到 Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=terralab&config=eyJ1cmwiOiJodHRwczovL21jcC50ZXJyYS1sYWIuYWkvbWNwIn0%3D)。Cursor 会显示该服务器：点击 **Install**，在提示时登录。

或者在 Cursor 的 MCP 设置中，于 `.cursor/mcp.json` 里添加一个远程服务器：

```json
{
  "mcpServers": {
    "terralab": { "url": "https://mcp.terra-lab.ai/mcp" }
  }
}
```

## VS Code

打开安装链接：[把 TerraLab 添加到 VS Code](vscode:mcp/install?%7B%22name%22%3A%22terralab%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.terra-lab.ai%2Fmcp%22%7D)。点击 **Install**，登录 TerraLab，然后在 agent 模式下向 Copilot 提问。

或者在 `.vscode/mcp.json` 中添加：

```json
{
  "servers": {
    "terralab": { "type": "http", "url": "https://mcp.terra-lab.ai/mcp" }
  }
}
```

## 其他智能体

在任何支持远程 MCP 服务器的智能体中，用上面的网址添加即可；它会打开 TerraLab 登录页。Gemini CLI 的命令如下：

```bash
gemini mcp add --transport http -s user terralab https://mcp.terra-lab.ai/mcp
```

## 工具

服务器提供 29 个工具。每个工具的参数和请求示例都记录在 [API 参考](https://terra-lab.ai/docs/api)中：MCP 工具和 REST endpoint 使用相同的名称和参数。

- **Places**: [Find places and addresses](https://terra-lab.ai/docs/api/find_places), [Convert coordinates](https://terra-lab.ai/docs/api/convert_coordinates), [Measure distance, area, radius or buffer](https://terra-lab.ai/docs/api/measure)
- **Map data**: [Extract open map data for an area](https://terra-lab.ai/docs/api/extract_open_data), [Open, map and convert GIS data](https://terra-lab.ai/docs/api/open_gis_file), [Buffer, merge, clip or simplify features](https://terra-lab.ai/docs/api/process_geometry)
- **Terrain and routes**: [Elevation, profile and contour lines](https://terra-lab.ai/docs/api/get_elevation), [Road route between places](https://terra-lab.ai/docs/api/get_route), [Area reachable in a travel time](https://terra-lab.ai/docs/api/get_travel_area)
- **Imagery and land**: [Satellite image of an area](https://terra-lab.ai/docs/api/get_satellite_image), [Forest type (natural, planted, plantation)](https://terra-lab.ai/docs/api/get_forest_type), [Estimate the population of an area](https://terra-lab.ai/docs/api/estimate_population)
- **France**: [French cadastral parcel and zoning](https://terra-lab.ai/docs/api/french_parcel), [French building heights](https://terra-lab.ai/docs/api/french_building_heights), [Natural risks at an address or a point](https://terra-lab.ai/docs/api/get_natural_risks)
- **Data catalog**: [Find a dataset in the TerraLab catalogue](https://terra-lab.ai/docs/api/find_datasets), [Extract a hosted dataset for an area](https://terra-lab.ai/docs/api/extract_dataset), [Ask TerraLab to add data it does not have](https://terra-lab.ai/docs/api/request_data)

## 可以问什么

- “找出这 40 个地址的坐标，并给我一个可用于 QGIS 的 CSV。”
- “把安纳西火车站周围 1 km 内的建筑和道路提取为 GeoPackage。”
- “从霞慕尼到南针峰的高程剖面。”
- “安纳西 rue de la Paix 12 号有哪些自然风险？”

如果智能体支持，答案会在聊天中显示地图，并提供可在 QGIS、ArcGIS 或 Google Earth 中打开的文件。

## 故障排查

- **TerraLab 在 Claude 中显示已连接，但没有工具。** 如果你是在 2026 年 10 月 26 日之前添加的，请删除该 connector 并重新添加：Claude 随后会提供 TerraLab 登录。
- **智能体说免费调用已用完。** 在 [Dashboard, MCP](https://terra-lab.ai/zh-CN/dashboard/mcp) 充值，或等到下个月 1 日。参见[定价与免费调用](https://terra-lab.ai/zh-CN/docs/pricing)。
- **工具返回错误。** 其中的 `message` 和 `hint` 会说明该改什么。参见[错误与速率限制](https://terra-lab.ai/zh-CN/docs/errors)。

Source: https://terra-lab.ai/zh-CN/docs/mcp · Updated 2026-10-27
