# Using Externa with AI coding tools

Source: https://docs.externa.qiick.io/docs/ai-coding-tools

Give coding agents current Externa docs instead of stale training data. Use [Context7](https://context7.com) for MCP-backed lookup, paste or fetch [`llms.txt`](https://docs.externa.qiick.io/llms.txt) / [`llms-full.txt`](https://docs.externa.qiick.io/llms-full.txt), or ask on this site with **Ask the docs**.

> **API key**
> Context7 recommends a free API key from [context7.com/dashboard](https://context7.com/dashboard) for higher rate limits. Replace `YOUR_API_KEY` in the snippets below. Config below matches Context7’s [MCP Clients](https://context7.com/docs/resources/all-clients) docs.

## Context7

[Context7](https://context7.com) is a service that serves up-to-date library documentation to AI coding assistants through an MCP server. Your agent calls Context7 tools instead of guessing from training data.

Externa is indexed under two library IDs:

| Library ID                                                                                     | Source                                                                                                                           | When to use                                                                                    |
| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [`/qiick-io/externa-core`](https://context7.com/qiick-io/externa-core)                         | externa-core package source and README                                                                                           | Implementing or extending the Laravel app — routes, install, admin features, package internals |
| [`/llmstxt/externa_qiick_io_llms_txt`](https://context7.com/llmstxt/externa_qiick_io_llms_txt) | This docs site, indexed from [`https://docs.externa.qiick.io/llms.txt`](https://docs.externa.qiick.io/llms.txt)                    | Operator and integration guides — Public CMS API, deployment, field types, headless starters   |

Prefer `/qiick-io/externa-core` for app/source questions. Prefer `/llmstxt/externa_qiick_io_llms_txt` for published docs pages and how-tos. Either works for many tasks; pin an ID when you already know which corpus you want.

### Quick setup

Fastest path (Node.js 22.13+):

```bash
npx ctx7 setup
```

Use `--cursor`, `--claude`, or see [Context7 install](https://context7.com/install) for other clients. Manual MCP configs follow.

### Cursor

Go to **Cursor Settings → Tools & MCP → New MCP Server**, or edit `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project).

**Remote server** (recommended):

```json
{
  "mcpServers": {
    "context7": {
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

**Local server:**

```json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
```

### Claude Code

**Local server:**

```bash
claude mcp add --scope user context7 -- npx -y @upstash/context7-mcp --api-key YOUR_API_KEY
```

**Remote server:**

```bash
claude mcp add --scope user --header "Authorization: Bearer YOUR_API_KEY" --transport http context7 https://mcp.context7.com/mcp
```

Drop `--scope user` to install for the current project only. Or run `npx ctx7 setup --claude`.

### VS Code

Add this to `.vscode/mcp.json` (see [VS Code MCP docs](https://code.visualstudio.com/docs/copilot/chat/mcp-servers)).

**Remote server:**

```json
{
  "servers": {
    "context7": {
      "type": "http",
      "url": "https://mcp.context7.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
```

**Local server:**

```json
{
  "servers": {
    "context7": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp", "--api-key", "YOUR_API_KEY"]
    }
  }
}
```

Context7 also ships a [VS Code extension](https://context7.com/docs/resources/all-clients) that registers the server and accepts an API key via `context7.apiKey`.

### Sample prompts

Add `use context7` so the agent fetches docs:

```txt
Create an Externa collection for blog posts and fetch it from Next.js. use context7
```

Pin a library ID to skip resolution:

```txt
Create an Externa collection for blog posts and fetch it from Next.js. use library /qiick-io/externa-core
```

Docs-site corpus:

```txt
How do I grant the public role Read on a collection for the Public CMS API? use library /llmstxt/externa_qiick_io_llms_txt
```

## llms.txt and llms-full.txt

This site publishes LLM-oriented Markdown at build time (`npm run build:llms`):

| File              | URL                                                                                        | Role                                                                                               |
| ----------------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- |
| **llms.txt**      | [https://docs.externa.qiick.io/llms.txt](https://docs.externa.qiick.io/llms.txt)           | Index of every public docs page with title, short description, and link to a per-page `.md` mirror |
| **llms-full.txt** | [https://docs.externa.qiick.io/llms-full.txt](https://docs.externa.qiick.io/llms-full.txt) | Full concatenated docs body — paste into an LLM or feed tools that ingest a single corpus          |

Individual page mirrors live at `https://docs.externa.qiick.io/docs/<slug>.md` (home: [`/index.md`](https://docs.externa.qiick.io/index.md)). Context7’s `/llmstxt/externa_qiick_io_llms_txt` library is built from the `llms.txt` index.

> **Tip**
> Prefer `llms.txt` when the tool can follow links. Use `llms-full.txt` when you need one pasteable dump or a tool that only reads a single file.

## Ask the docs (on this site)

The header includes an **Ask the docs** control next to search (shown on browsers that support on-device generation). It answers from this documentation in the browser — no server-side chat backend. Use it for quick questions while reading; use Context7 or `llms.txt` when your coding agent needs Externa context in the IDE.
