> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/introduction/ai-coding-agents.md).

# AI coding agents

Terra provides two ways to give AI coding agents like Claude Code, Cursor, Codex, and GitHub Copilot accurate knowledge of the Terra API:

* **Agent skills**: best-practice guides your agent applies automatically as you code
* **Docs MCP server**: lets your agent search the live Terra documentation while it works

You can use either on its own, but they work best together. Skills teach your agent how to build with Terra correctly, and the MCP server lets it look up exact endpoints, fields, and guides on demand.

## Agent skills

[Terra agent skills](https://github.com/tryterra/agent-skills) follow the [Agent Skills](https://agentskills.io) open standard and work with any agent that supports it, including Claude Code, Cursor, GitHub Copilot, and Gemini CLI.

To install them, paste this into your terminal:

```bash
npx skills add tryterra/agent-skills
```

The command detects your installed tools and configures the skills for each of them. No further setup is needed.

### Included skills

| Skill                    | What it covers                                                                                                     |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `terra-api`              | API best practices: webhooks and signature verification, data idempotency, connection lifecycle, and testing       |
| `terra-mobile-sdk`       | Mobile integration for Apple Health, Samsung Health, and Health Connect on iOS, Android, React Native, and Flutter |
| `terra-streaming`        | Realtime websocket data and the Live Sensor SDK                                                                    |
| `terra-planned-workouts` | Pushing structured interval workouts to wearables (pre-release)                                                    |
| `terra-routes`           | Pushing GPS courses with waypoints to devices like Garmin, COROS, and Wahoo (pre-release)                          |
| `terra-lab-reports`      | Parsing lab report PDFs into standardised biomarkers (pre-release)                                                 |
| `terra-vantage`          | Blood and DNA test kit ordering with FHIR result delivery                                                          |

To install a single skill instead of the full set:

```bash
npx skills add tryterra/agent-skills --skill terra-api
```

{% hint style="info" %}
Claude Code users can alternatively install the skills as a plugin:

```
/plugin marketplace add tryterra/agent-skills
/plugin install terra@terra-agent-skills
```

{% endhint %}

## Docs MCP server

The Terra docs MCP server connects your agent to the live documentation, including integration guides, API references, SDKs, and schemas. Your agent can search it directly instead of relying on training data that may be out of date.

The server is available at:

```
https://docs.tryterra.co/~gitbook/mcp
```

### Installation

{% tabs %}
{% tab title="Claude Code" %}
Paste this into your terminal:

```bash
claude mcp add terra-docs --scope user --transport http https://docs.tryterra.co/~gitbook/mcp
```

{% endtab %}

{% tab title="Codex" %}
Paste this into your terminal:

```bash
codex mcp add terra-docs --url https://docs.tryterra.co/~gitbook/mcp
```

{% endtab %}

{% tab title="VS Code" %}
Click to [install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22Terra%20Docs%22%2C%22url%22%3A%22https%3A%2F%2Fdocs.tryterra.co%2F~gitbook%2Fmcp%22%7D), or add the server to your `mcp.json` manually:

```json
{
  "servers": {
    "terra-docs": {
      "url": "https://docs.tryterra.co/~gitbook/mcp"
    }
  }
}
```

{% endtab %}

{% tab title="Cursor" %}
Click to [install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=terra-docs\&config=eyJ1cmwiOiJodHRwczovL2RvY3MudHJ5dGVycmEuY28vfmdpdGJvb2svbWNwIn0=), or add the server to your `mcp.json` manually:

```json
{
  "mcpServers": {
    "terra-docs": {
      "url": "https://docs.tryterra.co/~gitbook/mcp"
    }
  }
}
```

{% endtab %}
{% endtabs %}

Once connected, your agent can query the docs whenever it needs to check an endpoint, payload field, or setup step.
