> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/build/building-from-your-ai-agent/mcp-gateway/cline.md).

# Cline

Add fastn to Cline in VS Code as a remote MCP server, sign in, and build integrations from a Cline task.

Cline adds fastn from its **MCP** settings as a remote server. Sign in once, then ask for the integration in a Cline task.

{% hint style="info" %}
**Before you start:** set Cline up with a model first (Cline's own sign-in, or your API key). fastn exposes more than 128 tools, so pick a model that accepts that many; see [Troubleshooting](#troubleshooting).
{% endhint %}

## Add fastn

{% stepper %}
{% step %}

#### Open Add Remote Server

In the Cline panel, click the MCP icon at the top. On the **MCP** tab under **Installed**, click **Add Remote Server**.
{% endstep %}

{% step %}

#### Enter fastn's URL

Enter **Server Name** `fastn` and **Server URL** `https://mcp.fastn.dev/fastn-workspace`, leave **Transport Type** on **Streamable HTTP**, and click **Add Server**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-00d948277ac20e8232264a5d6afc326d7c4b83af%2Fmcp-cline-add-remote.webp?alt=media" alt="Cline&#x27;s Add a remote MCP server form with Server Name, Server URL, Transport Type set to Streamable HTTP with SSE (Legacy) as the other option, and Add Server and Cancel buttons"><figcaption><p>Keep <strong>Streamable HTTP</strong>. fastn does not serve the legacy SSE transport.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Authenticate

fastn shows *This MCP server requires authentication to get started.* Click **Authenticate**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-fbd0d6d2286d5388cd25ec967a535e928132c6fa%2Fmcp-cline-needs-auth.webp?alt=media" alt="Cline&#x27;s MCP list with fastn, a status dot, the message This MCP server requires authentication to get started, and Authenticate and Delete Server buttons"><figcaption><p>Cline signs in with OAuth, so no token is needed.</p></figcaption></figure>

fastn opens in your browser. Sign in if asked. If you belong to more than one fastn org, pick the workspace Cline works in and click **Connect**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-2400760e643b0958a7e011bff44b05fe01634b3c%2Fmcp-cline-choose-workspace.webp?alt=media" alt="fastn&#x27;s page titled Which workspace should Cline use?, with The org selected in fastn chosen, a list of orgs and a Connect button"><figcaption><p><strong>The org selected in fastn</strong> follows whichever org you have open in the fastn dashboard; picking a named org pins Cline to it.</p></figcaption></figure>

The browser shows *Authentication Successful* and closes itself. Back in VS Code, fastn's dot turns green in Cline's list.
{% endstep %}
{% endstepper %}

## Use it

Start a new Cline task and ask for the outcome in one sentence. To check the connection first, ask *Who am I in fastn?* Cline asks before it runs a fastn tool; approve it, and it answers with the org you picked when signing in.

From here Cline works through the same steps as every agent: see [Building from your AI agent](https://docs.fastn.ai/build/building-from-your-ai-agent.md).

## Add it by hand

Click **Edit Configuration** in Cline's **MCP** tab and add fastn under `mcpServers`. The `type` must be `streamableHttp`, written exactly so:

```json
{
  "mcpServers": {
    "fastn": {
      "url": "https://mcp.fastn.dev/fastn-workspace",
      "type": "streamableHttp"
    }
  }
}
```

Then click **Authenticate** on fastn's row, as in step 3.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-eeb45a6ade18cce363c74541a2bdbb050e5d82f5%2Fmcp-fastn-tab-cline.webp?alt=media" alt="fastn&#x27;s MCP server page with the Cline tile selected, showing a cline_mcp_settings.json snippet with a fastn entry of type streamableHttp and a note that the type must be camelCase"><figcaption><p>The Cline tile under <strong>Connect AI tools</strong> in fastn has the same snippet.</p></figcaption></figure>

## Troubleshooting

* **`Invalid value for 'tools': maximum number of items is 128`.** The model Cline is using accepts at most 128 tools, and fastn exposes more. Pick a different model in Cline's settings; the error comes from the model provider, not from fastn.
* **fastn fails with a 405 error.** The `type` is wrong. Use `streamableHttp` (camelCase), not `sse` or `streamable-http`.
* **Cline works on the wrong org.** Delete fastn from Cline's **MCP** list, add it again and pick the workspace when you authenticate.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/build/building-from-your-ai-agent/mcp-gateway/cline.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
