Skip to navigation

MCP Server

Connect to the hosted server at https://mcp.captain.dev/mcp: nothing to install, nothing to keep updated.

Connect

Pick your coding agent below and add the server to it. The first time the agent connects, it opens a browser window where you sign in to Captain. On the approval page you choose which organization the connection belongs to and what it is allowed to reach: the environments it can use (development, staging, and production) and whether it is allowed to write. Once you approve, the agent is connected and ready to use.

claude mcp add --transport http captain https://mcp.captain.dev/mcp claude mcp login captain

Every tool accepts an optional environment argument, so a single connection can work across all of the environments you approved without reconnecting. If you want to change the organization or the scope later, simply reauthenticate.

Try it

Once the server is connected, talk to your agent normally:

> List my collections in production
> Search finance-docs for the Q3 revenue figures
> Index https://example.com/reports/q4.pdf into finance-docs and tell me when the job finishes
> Which documents in finance-docs failed to index?
> Read page 3 of the Q4 report
> Save this to project-notes: chose Lambda over a Worker because NCBI does not rate-limit by IP
> What did we decide about PubMed proxying?

What you get

70 tools, grouped below by what they do. Every tool name is clickable in most MCP clients’ tool pickers; this table is the same information laid out for scanning.

Search and collections

ToolWhat it does
captain_searchDeterministic File Search over a collection.
captain_search_v3Multimodal search with metadata filters, boosts, regions, relations, and max_chunks_per_document for one-chunk-per-document results.
captain_list_collectionsList collections in the organization.
captain_create_collectionCreate a collection.
captain_delete_collectionDelete a collection.
captain_copy_collectionClone a collection with its vectors branched server-side; returns immediately no matter how large the collection is.
captain_list_documentsList documents in a collection, with indexing status; filter by custom metadata.
captain_get_documentRead one document: metadata, every chunk with page or timestamp, optional layout regions.
captain_get_document_pageRead one page of a parsed document in reading order.
captain_create_asset_urlsMint short-lived viewable URLs for figure regions.
captain_set_document_metadataReplace a document’s custom metadata.
captain_update_document_metadataMerge keys into a document’s custom metadata.
captain_batch_document_metadataMerge or replace custom metadata on up to 100 documents in one request, with a result per item.
captain_delete_documentDelete a single document.
captain_wipe_documentsDelete every document in a collection.

Indexing

ToolSource
captain_index_urlA web URL
captain_index_youtubeA YouTube video: its captions by default (timestamped transcript), or with mode the audio or the full video; on_missing_transcript picks the fallback when there are no captions
captain_index_textInline plain text
captain_index_fileAn uploaded file
captain_index_s3AWS S3
captain_index_gcsGoogle Cloud Storage
captain_index_azureAzure Blob Storage
captain_index_r2Cloudflare R2
captain_index_dropboxDropbox
captain_index_supabaseSupabase Storage
captain_index_backblazeBackblaze B2
captain_index_sharepointSharePoint
captain_index_onedriveOneDrive
captain_index_gdriveGoogle Drive

Every indexing tool also takes custom_metadata, mask_pii (mask detected personal data before embedding; a report is kept on the job), max_files, skip_existing, overwrite_existing, transcription_language, and parsing_script where the endpoint supports them. captain_index_r2 takes the bucket’s jurisdiction, including us for US data residency, and captain_index_s3 accepts a cross-account IAM role instead of keys. In single-file mode, the S3, GCS, Azure, R2 and Dropbox tools also take source_identity: a stable identity for the document that is independent of where the object is read from, so indexing the same content from another location updates the same document instead of creating a second one.

Syncs

A sync keeps a collection aligned with a cloud-storage bucket: it backfills, reconciles on a schedule, can listen for real-time events, and propagates deletions.

ToolWhat it does
captain_create_s3_syncCreate an S3 sync
captain_create_r2_syncCreate an R2 sync
captain_create_supabase_syncCreate a Supabase sync
captain_create_backblaze_syncCreate a Backblaze sync
captain_create_azure_syncCreate an Azure Blob Storage sync (account name + account key; 60-minute default cadence)
captain_create_gcs_syncCreate a Google Cloud Storage sync (service-account JSON)
captain_validate_syncDry-run a sync’s credentials and bucket before creating it
captain_list_syncsList syncs, across all storage types
captain_get_syncGet one sync’s details
captain_update_syncUpdate a sync’s config
captain_delete_syncDelete a sync
captain_reconcile_syncRun an on-demand diff and index
captain_subscribe_sync_webhookEnable real-time change events (SNS/SQS for S3, a signed ingest URL for other providers); rotate the secret after a leak

Chunks

ToolWhat it does
captain_list_chunksList a document’s chunks
captain_get_chunkGet one chunk
captain_get_chunk_metadataRead a chunk’s custom metadata
captain_set_chunk_metadataOverwrite a chunk’s custom metadata
captain_update_chunk_metadataMerge into a chunk’s custom metadata
captain_delete_chunk_metadataDelete a chunk’s custom metadata
captain_batch_chunk_metadataMerge or replace custom metadata on up to 100 chunks in one request, with a result per item
captain_list_chunk_relationsList relations between chunks
captain_create_chunk_relationCreate a relation between chunks
captain_delete_chunk_relationDelete a relation
captain_batch_chunk_relationsCreate or update up to 100 relations in one request, matched by source chunk, target chunk, and relation type

Jobs

ToolWhat it does
captain_list_jobsList the organization’s indexing jobs, newest first, with status, collection and environment filters
captain_job_statusCheck an indexing job’s status: progress, per-file results, credits billed, PII report pointer
captain_cancel_jobCancel an in-progress job
captain_rollback_jobUndo a finished job by removing the documents it wrote
captain_get_pii_reportRead the PII masking report of a job that ran with mask_pii
captain_delete_pii_reportDelete a retained PII report early
captain_validate_parsing_scriptCheck a JavaScript parsing script in the sandbox before using it

Query history

The queries your agents have run in the environment named on the call. Use them to see what an agent actually asked and what came back.

ToolWhat it does
captain_list_queriesList stored queries, newest first; filter by collection, status, and time window; page by cursor; opt in to include (results, request, response) for each query’s retrieved chunks and exact bodies
captain_get_queryOne stored query by query_id, or by the request_id a query response returns: summary, exact request body, normalised results, optional exact response body

Evaluation

Measure how well a collection retrieves the right documents, and compare query configurations on the same questions. captain_eval runs the questions from the client and scores them in the conversation; the other three hand the set to Captain as a job that keeps every answer.

The Evaluation API accepts API keys only in v1, so its three tools need a connection authenticated with a key rather than by signing in. Point an entry at the same hosted URL with a Captain API key as a bearer token, and the evaluation tools become available on it:

{
"mcpServers": {
"captain-evals": {
"url": "https://mcp.captain.dev/mcp",
"headers": { "Authorization": "Bearer cap_..." }
}
}
}

The key implies its organization and environment, so a key-authenticated entry takes no consent step. The other tools on this page work over either kind of connection.

ToolWhat it does
captain_evalRun a question set through captain_search_v3 under each candidate configuration and score them as a paired test, so a gain between two configurations is reported as real or not
captain_create_eval_uploadSerialise a case set of up to 10,000 questions with the documents each should retrieve, mint a single-use upload for the collection, and upload it; returns the upload_id
captain_run_evalRun an uploaded case set under one to eight named v3 configurations as an asynchronous job, replayable through an idempotency key; returns the eval_id
captain_get_eval_resultsRead an eval’s status, progress, per-configuration scorecards (recall at 1, 3 and 10, MRR, nDCG at 10, latency percentiles), billing, and per-case hits and ranks; optionally the stored answers

Evaluations covers the case-set format, scoring, limits and billing. Compare Query Configs walks through the client-side loop.

Environments

ToolWhat it does
captain_change_environmentMove a collection between development, staging, and production

A moved collection is reachable through the same connection by naming the new environment in the environment argument every tool accepts. Attached syncs do not follow it.

Project notes

ToolWhat it does
captain_saveWrite a short note (a decision, a gotcha, a bug repro, a design constraint) to a per-project collection under a timestamped filename, creating the collection on first use
captain_findSearch those notes; surfaces the timestamps, so a stale note is easy to spot

Integration wizard

captain_wizard writes Captain into your codebase. It reads Captain’s own agent docs at llms.txt as the source of truth for the current API surface, covering indexing calls, search wiring, collection setup, and auth, then applies the changes for a task you describe. The first time you run it, it asks permission to send de-identified feedback about the integration (friction, missing capabilities, confusing docs) to Captain’s feedback endpoint. No API key, no code, no personal data. Decline it if you prefer, and change the answer later at any time.

Local install (deprecated)

The local stdio build (npx @captain-sdk/captain-mcp) is deprecated and no longer maintained. New tools and fixes ship only to the hosted server, so local installs will fall behind. The one thing it still does that the hosted server cannot is let captain_index_file read local filesystem paths. The hosted server takes urls or inline base64 files instead.

If you still need it, your client launches it with npx and it reads CAPTAIN_API_KEY from the environment:

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