Skip to main content

MCP Server Guide

vai includes a Model Context Protocol (MCP) server that exposes 22 tools to AI-powered editors like Claude Desktop, Cursor, Windsurf, and VS Code — covering retrieval, embeddings (text and multimodal), ingestion, workspace indexing, a dedicated semantic code index, cost estimation, and workflow authoring.

vai pixel robot thinking

Editors and agents

MCP is how assistants reach Atlas and Voyage through vai

Tools are grouped by job: retrieval, embeddings, ingest, workspace and code-index search, authoring. Pick the install path for your editor, then use the tool list when you need exact parameter shapes.

Automatic setup walkthrough

What is MCP?

The Model Context Protocol is a standard for connecting AI assistants to external tools. When you install vai as an MCP server, your AI editor can:

  • Search your knowledge base with natural language (vai_query, vai_search)
  • Rerank candidate texts (vai_rerank)
  • Embed text or multimodal inputs (vai_embed, vai_multimodal_embed)
  • Index and search code via either the workspace tools or the dedicated code-index pipeline
  • Chunk, embed, and store documents (vai_ingest)
  • Explain RAG concepts and estimate costs (vai_explain, vai_estimate)
  • Generate or validate vai workflows (vai_generate_workflow, vai_validate_workflow)

Quick Setup

# Install into all supported AI tools
vai mcp install all

# Verify installation
vai mcp status

Restart your AI tool after installing. All 22 tools should appear in the MCP tool list.

Supported tools

Workspace vs code index

vai_search_code searches data indexed with vai_index_workspace. vai_code_search searches data indexed with vai_code_index (same pipeline as vai code-search). Use the pair that matches how the collection was built.

Retrieval

ToolWhat it does
vai_queryEmbed → MongoDB $vectorSearch → optional rerank
vai_searchVector search only (no rerank)
vai_rerankRerank provided strings against a query

Embedding

ToolWhat it does
vai_embedText embedding vector
vai_similarityCosine similarity between two texts
vai_multimodal_embedEmbeddings for text and/or image/video payloads

Management

ToolWhat it does
vai_collectionsList collections and vector index info
vai_modelsList Voyage models

Utility

ToolWhat it does
vai_topicsList explainer topics
vai_explainLong-form topic explanation
vai_estimateCost estimate for embed/query scale

Ingest

ToolWhat it does
vai_ingestChunk, embed, store one document

Workspace

ToolWhat it does
vai_index_workspaceIndex a local tree (code / docs / config / all)
vai_search_codeSemantic search on workspace index
vai_explain_codeExplain snippet using retrieved workspace context

Code search (MongoDB code index)

ToolWhat it does
vai_code_indexIndex path or GitHub repo for semantic code search
vai_code_searchQuery indexed code by meaning
vai_code_queryRAG-style Q&A over indexed code
vai_code_find_similarNearest neighbors for a code snippet
vai_code_statusIndex stats and vector index status

Authoring

ToolWhat it does
vai_generate_workflowNL → vai workflow JSON
vai_validate_workflowValidate workflow structure and dependencies

How it works

Next steps