Vectara MCP Server


What is this?

The Vectara MCP Server is an open-source, turnkey solution designed to power knowledge-centric workflows by seamlessly combining semantic search with retrieval-augmented generation (RAG). Built on the Model Communication Protocol standard, it enriches large language models with relevance-ranked embeddings drawn from custom or public content stores. Whether you’re building an enterprise search portal, a document Q&A service, or an AI chatbot with up-to-date references, Vectara MCP Server streamlines integration with a single, consistent API.

Under the hood, it implements the MCP protocol over HTTP/1.1 or HTTP/2 with a standardized JSON envelope, making it easy to orchestrate alongside other MCP-compliant servers. Its modular design separates ingestion, search, and RAG services, allowing you to scale and customize each component independently.

Quick Start

Install the server using npm:

npm install @vectara/mcp-server

Then add it to your MCP client configuration:

{
  "mcpServers": {
    "vectara-mcp-server": {
      "command": "npx",
      "args": ["-y", "@vectara/mcp-server"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
  }
}

Key Features

Feature 1: End-to-end semantic search pipeline with automated embedding generation for real-time relevance-ranked results.

Feature 2: On-the-fly ranking that fuses vector similarity and keyword heuristics for accurate result ordering.

Feature 3: Ready-to-use RAG context assembly endpoint to feed chatbots and Q&A services with dynamic, token-budgeted context payloads.

Example Usage

You can invoke the semantic search tool through your MCP client to retrieve the most relevant document chunks for any query.

// Example code
const result = await client.callTool({
  name: "vectara-mcp-server.search",
  arguments: {
    request_id: "search-001",
    payload: {
      query_text: "What is semantic search?",
      top_k: 5
    }
  }
});

This code sends a semantic search request and returns an array of up to 5 relevant chunks with scores and source IDs.

Configuration

The server accepts the following environment variables:

API_KEY – Your Vectara API key, available from your Vectara account dashboard.

TLS_ENABLED (optional) – Set to true to enable HTTPS with provided certificates.

Available Tools/Resources

/mcp/v1/ingest: Ingest or update documents via HTTP endpoint.

/mcp/v1/search: Perform semantic search requests and receive ranked results.

VectaraMCP: LangChain connector class for seamless integration in Python or JavaScript workflows.

Who Should Use This?

This server is perfect for:

Use case 1: Enterprises needing a semantic search portal over proprietary documents.

Use case 2: Developers building Q&A services or AI chatbots with real-time context.

Use case 3: Teams requiring a modular RAG pipeline that adheres to a standard protocol.

Conclusion

Vectara MCP Server provides a powerful, MCP-compliant platform for semantic search and RAG, making it easy to integrate relevant knowledge into any AI workflow. Its open-source code, multi-language support, and seamless embedding pipeline help you build intelligent applications faster. Give it a try today!

Check out the GitHub repository for more information and to contribute.