# MCP

> Connect your AI agent to Link AI with our public MCP server. Today it gives your agent search and read access to every docs page.

Source: https://docs.getlinkai.com/developers/mcp

Link AI has a public [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server. Connect it to your AI agent, such as Claude Code, Cursor, VS Code, or Codex. Today the agent can search and read these docs while it builds with Link AI. You don't need to copy pages into the chat by hand.

| Setting | Value |
|---|---|
| **Server URL** | `https://docs.getlinkai.com/mcp` |
| **Transport** | Streamable HTTP |
| **Auth** | None. The server is public and read-only. |
| **Tools** | `search_docs`, `get_page`, `list_pages` |

## Paste this to your agent

The quickest way to set it up is to let your agent do it. Copy this prompt and paste it into your AI agent:

```text
Add the Link AI MCP server to your MCP config.

- Name: linkai-docs
- URL: https://docs.getlinkai.com/mcp
- Transport: Streamable HTTP (remote, no auth)

Use the setup method your client supports: a CLI
command or its MCP config file. When you're done,
tell me what you changed and whether I need to
restart or reload for the server to load.
```

**Tip:**
After the server loads, ask your agent to use it. For example: "Use linkai-docs to find out how to embed my agent on a Next.js site."

## Set it up by hand

If you'd rather add it yourself, use the setup for your client.

### Claude Code

Run this in your terminal:

```bash
claude mcp add --transport http linkai-docs https://docs.getlinkai.com/mcp
```

Add `--scope user` to make it available in every project.

### Cursor

Add this to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in your project:

```json
{
  "mcpServers": {
    "linkai-docs": {
      "url": "https://docs.getlinkai.com/mcp"
    }
  }
}
```

### VS Code

Add this to `.vscode/mcp.json` in your project:

```json
{
  "servers": {
    "linkai-docs": {
      "type": "http",
      "url": "https://docs.getlinkai.com/mcp"
    }
  }
}
```

### Codex

Add this to `~/.codex/config.toml`:

```toml
[mcp_servers.linkai-docs]
url = "https://docs.getlinkai.com/mcp"
```

### Windsurf

Add this to `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "linkai-docs": {
      "serverUrl": "https://docs.getlinkai.com/mcp"
    }
  }
}
```

### Claude and other chat apps

In Claude, go to **Settings → Connectors**, click **Add custom connector**, and enter `https://docs.getlinkai.com/mcp`. Other apps that support remote MCP servers use the same URL.

## Check that it works

Paste this prompt into your agent:

```text
Use the linkai-docs MCP server to tell me how to add
allowed domains for the Link AI chat widget. List the
steps and name the docs page you used.
```

**Check:**
Your agent calls `search_docs` or `get_page` and answers with steps from the [Embed](https://docs.getlinkai.com/getting-started/embed) page.

## What your agent can do

| Tool | What it does |
|------|--------------|
| `search_docs` | Searches every page and returns the best matches with their URLs. |
| `get_page` | Returns the full Markdown of one page. |
| `list_pages` | Lists every page with its title, section, and description. |

Each page is also available as an MCP resource, so clients that support resources can attach a page to the chat directly.

## Without MCP

If your agent can't use MCP, point it at the plain-text versions of the docs:

| URL | What it returns |
|-----|-----------------|
| `https://docs.getlinkai.com/llms.txt` | An index of every page, following [llms.txt](https://llmstxt.org) |
| `https://docs.getlinkai.com/llms-full.txt` | All pages in one file |
| Any page URL plus `.md` | That page as Markdown, for example `https://docs.getlinkai.com/getting-started/embed.md` |

## Next steps

**[Embed](https://docs.getlinkai.com/getting-started/embed)**:
Put your agent on your website.

**[Custom Connections](https://docs.getlinkai.com/integrations/custom-connections)**:
Connect your agent to any API.
