> For a complete page index of the Captain API documentation, fetch https://docs.runcaptain.com/llms.txt?excludeSpec=true

# Plugins

> Use Captain from Claude Code, Cursor, any MCP-aware client, or OpenClaw. Search indexed docs and persist project notes directly from your coding or agent environment.

## Agent Quick Reference - Plugins

* **MCP plugin** (`@captain-sdk/captain-mcp` on npm): 19 tools for Claude Code, Cursor, Windsurf, and any MCP client.
  * Install: add a `mcpServers.captain` block to the client's MCP config (stdio via `npx -y @captain-sdk/captain-mcp`).
  * Env: `CAPTAIN_API_KEY` (required). `CAPTAIN_ORGANIZATION_ID` is optional (derived from the API key if omitted).
  * Tools include `captain_search`, `captain_list_collections`, `captain_index_*` (url, youtube, text, file, s3, gcs, azure, r2), `captain_save`, `captain_find`.
* **OpenClaw plugin** (`@captain-sdk/openclaw-captain` on npm): 16 tools for OpenClaw runtimes.
* Both wrap the same Captain v2 API. feature parity is intentional.

Captain ships plugins so agents can search and index collections directly from their runtime. Pick the one that matches where your agent lives.

The Captain MCP server exposes 19 tools to any [Model Context Protocol](https://modelcontextprotocol.io) client. Claude Code, Cursor, Windsurf, and others.

## What you get

**Search & collections:** `captain_search`, `captain_list_collections`, `captain_create_collection`, `captain_delete_collection`, `captain_list_documents`, `captain_delete_document`, `captain_wipe_documents`

**Indexing:** `captain_index_url`, `captain_index_youtube`, `captain_index_text`, `captain_index_file` (local paths, multipart upload), `captain_index_s3`, `captain_index_gcs`, `captain_index_azure`, `captain_index_r2`

**Jobs:** `captain_job_status`, `captain_cancel_job`

**Live project search:**

* `captain_save`. save a short note (decision, gotcha, bug repro, design constraint) to a per-project collection with a timestamped filename. Auto-creates the collection on first use.
* `captain_find`. semantic search over saved notes; timestamps are surfaced so stale notes are obvious.

## Credentials

Set these once in your shell (every client reads them the same way):

```bash
export CAPTAIN_API_KEY=cap_...
```

Get an API key at [runcaptain.com/studio](https://runcaptain.com/studio).

## Install. Claude Code

Add to `~/.claude.json` (user scope) or a project `.claude.json`:

```json
{
  "mcpServers": {
    "captain": {
      "command": "npx",
      "args": ["-y", "@captain-sdk/captain-mcp@latest"],
      "env": {
        "CAPTAIN_API_KEY": "${CAPTAIN_API_KEY}"
      }
    }
  }
}
```

Restart Claude Code. `/mcp` shows `captain` connected.

## Install. Cursor

Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):

```json
{
  "mcpServers": {
    "captain": {
      "command": "npx",
      "args": ["-y", "@captain-sdk/captain-mcp@latest"],
      "type": "stdio",
      "env": {
        "CAPTAIN_API_KEY": "${env:CAPTAIN_API_KEY}"
      }
    }
  }
}
```

Or use Settings → Tools & MCP → New MCP Server and paste the inner object.

## Install. any other MCP client

```json
{
  "mcpServers": {
    "captain": {
      "command": "npx",
      "args": ["-y", "@captain-sdk/captain-mcp@latest"],
      "env": {
        "CAPTAIN_API_KEY": "cap_..."
      }
    }
  }
}
```

## Usage

```
> Search runcaptain-docs for how scientific/medical/ask streaming works
> Index c:\Users\me\reports\q4.pdf into finance-docs
> Index this YouTube video into training: https://youtube.com/watch?v=...
> Save this to runcaptain-notes: Decided Lambda over CF Worker. NCBI doesn't IP-rate-limit
> What did we decide about PubMed proxying?
```

## Optional: agent guidance

Drop a rule file in your repo so the agent reaches for Captain automatically:

**Cursor**. `.cursor/rules/captain.mdc`:

```markdown
---
description: Prefer Captain MCP tools (captain_search over grep/WebFetch for indexed material, captain_save/captain_find for cross-session notes).
alwaysApply: false
---

When searching docs or recalling past decisions, prefer captain_search, captain_save, and captain_find over grep/WebFetch. Use the repo basename as the collection; captain_save auto-creates it.
```

**Claude Code**. add the same text to `CLAUDE.md` in the repo root.

## Links

* [npm package](https://www.npmjs.com/package/@captain-sdk/captain-mcp)
* [Source on GitHub](https://github.com/runcaptain/captain-mcp)
* [Model Context Protocol](https://modelcontextprotocol.io)

The Captain plugin for [OpenClaw](https://openclaw.ai) exposes the Captain v2 API to OpenClaw runtimes. full-fidelity multimodal search across text, images, video, and audio. 16 tools covering search, collection management, job tracking, and indexing from URLs, YouTube, raw text, S3, GCS, Azure, and R2.

## Install

```bash
openclaw plugins install @captain-sdk/openclaw-captain
```

## Configure

Add to your OpenClaw config:

```json
{
  "plugins": {
    "entries": {
      "captain": {
        "apiKey": "cap_...",
        "organizationId": "019a..."
      }
    }
  }
}
```

Get an API key at [runcaptain.com/studio](https://runcaptain.com/studio).

## What you get

**Always available:**

* `captain_search`. natural-language search across any collection (text, images, video, audio).
* `captain_list_collections`. list available collections.

**Opt-in** (add to `tools.allow`):

| Category    | Tools                                                                                                                                                  |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Collections | `captain_create_collection`, `captain_delete_collection`                                                                                               |
| Documents   | `captain_list_documents`, `captain_delete_document`, `captain_wipe_documents`                                                                          |
| Jobs        | `captain_job_status`, `captain_cancel_job`                                                                                                             |
| Indexing    | `captain_index_url`, `captain_index_youtube`, `captain_index_text`, `captain_index_s3`, `captain_index_gcs`, `captain_index_azure`, `captain_index_r2` |

```json
{
  "tools": {
    "allow": [
      "captain_create_collection",
      "captain_list_documents",
      "captain_job_status",
      "captain_index_url",
      "captain_index_youtube",
      "captain_index_text",
      "captain_index_s3",
      "captain_index_gcs",
      "captain_index_azure",
      "captain_index_r2"
    ]
  }
}
```

## Usage

```
> Search my-docs for "quarterly revenue trends"
> Index https://example.com/report.pdf into my-docs
> Index this YouTube video into training-videos: https://youtube.com/watch?v=abc123
> List my collections
```

## Supported file types (via `captain_index_url` / cloud storage)

* **Documents:** PDF, DOCX, DOC, TXT, MD, JSON, YAML, CSV, XLSX
* **Images:** PNG, JPEG, GIF, BMP, TIFF, WEBP
* **Video:** MP4, MOV, AVI, MKV, WEBM
* **Audio:** MP3, WAV, AAC, FLAC, M4A, OGG

## Links

* [npm package](https://www.npmjs.com/package/@captain-sdk/openclaw-captain)
* [Source on GitHub](https://github.com/runcaptain/openclaw-plugin-captain)
* [OpenClaw](https://openclaw.ai)

***

## Feature comparison

|                                                          | MCP plugin                                    | OpenClaw plugin                                 |
| -------------------------------------------------------- | --------------------------------------------- | ----------------------------------------------- |
| **Runtime targets**                                      | Claude Code, Cursor, Windsurf, any MCP client | OpenClaw                                        |
| **npm package**                                          | `@captain-sdk/captain-mcp`                    | `@captain-sdk/openclaw-captain`                 |
| **Tool count**                                           | 19                                            | 16                                              |
| **Natural-language search** (text, images, video, audio) | ✓                                             | ✓                                               |
| **Save/find project notes across sessions**              | ✓ (`captain_save` / `captain_find`)           | ✓ (via `captain_index_text` + `captain_search`) |
| **Local-file upload**                                    | ✓ (`captain_index_file`)                      | ✓ (via `captain_index_url` or cloud storage)    |
| **Cloud-storage indexing** (S3 / GCS / Azure / R2)       | ✓                                             | ✓                                               |
| **URL, YouTube, raw-text indexing**                      | ✓                                             | ✓                                               |
| **Collection & job management**                          | ✓                                             | ✓                                               |

Both plugins wrap the same Captain v2 API. results from either are indistinguishable. Pick the plugin that matches your agent runtime.