> ## Documentation Index
> Fetch the complete documentation index at: https://agnt.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Linear

> Use Linear's native MCP tools through agntdata, with GraphQL available as an advanced fallback.

## Overview

The Linear connection gives deployed agents two ways to work with your Linear workspace:

* **Native MCP tools for agents**: agntdata re-exports Linear's official MCP tools through the deployed agent's agntdata MCP gateway, so agents can call tools such as `linear_list_issues`, `linear_get_issue`, `linear_save_issue`, `linear_save_comment`, `linear_create_attachment`, `linear_create_document`, `linear_list_milestones`, `linear_save_milestone`, `linear_list_initiatives`, `linear_save_initiative`, `linear_save_status_update`, `linear_list_projects`, and `linear_list_teams`.

* **GraphQL fallback for advanced API clients**: direct HTTP callers can still proxy GraphQL requests to `https://api.linear.app/graphql` when they need custom queries or mutations.

* **Base URL**: `https://api.agntdata.dev/v1/connections/linear/graphql`

* **Linear auth**: via OAuth 2.0 (preferred — `Authorization: Bearer <token>`) or via a Linear personal API key (raw `Authorization: <key>`, no `Bearer` prefix)

* **Body**: standard GraphQL envelope — `{ "query": "...", "variables": { ... }, "operationName": "..." }`

## Setup

### Connect with Linear (recommended)

<Steps>
  <Step title="Click Connect with Linear">
    In the agntdata dashboard open **Integrations**, pick **Linear**, and click **Connect with Linear**. You'll be redirected to Linear to authorize the connection.
  </Step>

  <Step title="Approve access">
    Linear asks whether to grant `read` and `write` scopes. Approve and you're redirected back.
  </Step>

  <Step title="Pick Linear MCP tools">
    In an agent's Tools panel, choose **Linear MCP** tools such as `list_issues`, `save_issue`, and `create_comment`. The deployed agent receives them through its agntdata MCP server with names prefixed by `linear_`.
  </Step>
</Steps>

### Paste an API key (fallback)

If OAuth isn't available, click **Use API key instead** and paste a Linear personal API key. Create one under **Linear Settings → Account → Security & access → Personal API keys** (starts with `lin_api_`). Unlike OAuth tokens, personal keys use a raw `Authorization: <key>` header — agntdata handles that automatically.

## Examples

### Configure an agent with Linear MCP tools

In the Agent Builder, search for Linear in the tool picker and select the native MCP tools the agent needs. For example:

* `linear_list_issues` — find issues with filters.
* `linear_get_issue` — inspect a specific issue.
* `linear_save_issue` — create or update an issue.
* `linear_save_comment` / `linear_create_comment` — comment on an issue, depending on the current Linear tool list.
* `linear_get_attachment`, `linear_create_attachment`, `linear_delete_attachment`, and `linear_extract_images` — work with attached files and images.
* `linear_create_document`, `linear_update_document`, and `linear_get_document` — manage Linear documents.
* `linear_list_milestones`, `linear_get_milestone`, and `linear_save_milestone` — manage project milestones.
* `linear_list_initiatives`, `linear_get_initiative`, `linear_save_initiative`, and `linear_save_status_update` — manage initiatives and status updates.
* `linear_list_projects`, `linear_get_project`, `linear_save_project`, and `linear_list_project_labels` — manage project context.
* `linear_list_teams`, `linear_get_team`, `linear_list_users`, and `linear_get_user` — look up people and team context.

agntdata resolves your Linear credential server-side and forwards the call to Linear's official MCP endpoint.

### Call GraphQL directly

The GraphQL endpoint remains available for custom workflows outside the deployed-agent MCP gateway.

#### Sanity check the connection

```bash theme={null}
curl -X POST "https://api.agntdata.dev/v1/connections/linear/graphql" \
  -H "Authorization: Bearer $AGNTDATA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"query { viewer { id name email } }"}'
```

#### List recent issues for a team

```bash theme={null}
curl -X POST "https://api.agntdata.dev/v1/connections/linear/graphql" \
  -H "Authorization: Bearer $AGNTDATA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query ($teamKey: String!) { team(id: $teamKey) { id name issues(first: 10) { nodes { id title state { name } assignee { name } } } } }",
    "variables": { "teamKey": "ENG" }
  }'
```

#### Create an issue

```bash theme={null}
curl -X POST "https://api.agntdata.dev/v1/connections/linear/graphql" \
  -H "Authorization: Bearer $AGNTDATA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation ($input: IssueCreateInput!) { issueCreate(input: $input) { success issue { id url identifier } } }",
    "variables": {
      "input": {
        "teamId": "team_xxx",
        "title": "Investigate flaky deploy",
        "description": "See the #ops thread from earlier today."
      }
    }
  }'
```

## Why native MCP tools?

Linear's GraphQL API is powerful, but it asks agents to invent query documents and know the right IDs and fields. Linear's MCP tools are already shaped for agents and are maintained by Linear, so agntdata exposes those tools through the deployed agent's single MCP gateway. GraphQL remains available when you need full schema control.

## Receiving Linear webhooks

This connection covers **outbound** GraphQL calls. To receive **inbound** Linear webhooks, mint an agntdata webhook endpoint and configure a Linear webhook to POST to it.
