# vectara/vectara-mcp [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/vectara/vectara-mcp  
**GitHub Stars:** 30  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/vectara-vectara-mcp

## Description
An MCP server for accessing Vectara's trusted RAG-as-a-service platform.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "vectara-mcp": {
    "command": "uvx",
    "args": ["vectara-mcp"],
    "env": {
      "VECTARA_API_KEY": "",
      "VECTARA_AUTHORIZED_TOKENS": "",
      "VECTARA_ALLOWED_ORIGINS": "",
      "VECTARA_TRANSPORT": "",
      "VECTARA_AUTH_REQUIRED": ""
    }
  }
}
```

**Requires environment variables:** `VECTARA_API_KEY`, `VECTARA_AUTHORIZED_TOKENS`, `VECTARA_ALLOWED_ORIGINS`, `VECTARA_TRANSPORT`, `VECTARA_AUTH_REQUIRED` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What vectara/vectara-mcp MCP server does

The vectara/vectara-mcp MCP server gives MCP-compatible applications access to Vectara's retrieval and generation APIs. Agents can submit questions against one or more Vectara corpus keys, receive generated answers with search results, or run retrieval without response generation.

It also exposes analysis operations for checking generated text against supplied source documents. One tool identifies and corrects hallucinations through Vectara's VHC API, while another evaluates factual consistency and returns scoring information. API key tools let an agent configure a key for the session or remove the stored key from server memory.

## How it works

The server is packaged for Python and can be installed from PyPI with `pip install vectara-mcp`. Running `python -m vectara_mcp` starts HTTP transport on the default address and port, with authentication enabled. SSE can be selected for server-sent event streaming and compatibility with legacy MCP clients. STDIO is available with `--stdio` for local development and desktop clients.

HTTP and SSE requests use bearer-token authentication by default, and the API key can also be supplied through an `X-API-Key` header. HTTP mode includes a default rate limit of 100 requests per minute and configurable origin validation. The upstream Vectara key must be available through the environment or configured with the setup tool before the other Vectara operations are used.

## Setup and configuration

Install the package, set `VECTARA_API_KEY`, and start the process using the transport appropriate for the deployment. Host and port can be changed with `--host` and `--port`; SSE also accepts a custom path. Authentication can be disabled with `--no-auth`, but the documentation restricts that option to development use.

For Claude Desktop, configure a command that runs `python -m vectara_mcp --stdio` and pass the API key in the process environment. The server must be enabled with STDIO for this desktop configuration. After changing the Claude Desktop configuration, fully restart the application so the tools become available.

Additional settings include `VECTARA_AUTHORIZED_TOKENS` for extra HTTP/SSE tokens, `VECTARA_ALLOWED_ORIGINS` for CORS origin restrictions, `VECTARA_TRANSPORT` for the transport mode, and `VECTARA_AUTH_REQUIRED` for authentication enforcement. Production deployments should use HTTPS, keep authentication enabled, and avoid exposing STDIO over a network.

## Tools and capabilities

The vectara/vectara-mcp MCP server provides these tool groups:

- `setup_vectara_api_key` validates and stores a session API key; `clear_vectara_api_key` removes it from memory.
- `ask_vectara` accepts a query and corpus keys, then returns a generated answer and matching search results. Options control surrounding context, lexical interpolation, result count, generation preset, and response language.
- `search_vectara` performs semantic retrieval against selected corpora without generation.
- `correct_hallucinations` compares generated text with source documents and returns corrected text plus correction details.
- `eval_factual_consistency` evaluates generated text against source documents and returns factual-consistency results and scores.

## Limitations and notes

STDIO has no transport-layer security and is described as suitable for local development or Claude Desktop rather than network exposure. HTTP and SSE authentication is enabled by default, while disabling it is explicitly marked as unsafe for production. Queries require corpus keys, and the analysis tools require both generated text and source documents.

_Full upstream README: https://allmcps.com/mcp/vectara-vectara-mcp/readme_

