Vectara MCP Server
About
Vectara MCP Server provides any agentic application with access to fast, reliable RAG (Retrieval-Augmented Generation) with reduced hallucination, powered by Vectara’s Trusted RAG platform, through the Model Context Protocol (MCP). It is compatible with Claude Desktop and any…
Details
- License
- Apache-2.0
Explore
- RAG query with generated answers via ask_vectara
- Semantic search without generation via search_vectara
- Hallucination detection and correction via correct_hallucinations
- Factual consistency evaluation via eval_factual_consistency
- Secure transport modes: HTTP, SSE, and STDIO
- API key management with one-time setup
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Vectara MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
You can install the package directly from PyPI:
pip install vectara-mcp
python -m vectara_mcp --no-auth
bash
To use with Claude Desktop, update your configuration to use STDIO transport:
{
"mcpServers": {
"Vectara": {
"command": "python",
"args": ["-m", "vectara_mcp", "--stdio"],
"env": {
"VECTARA_API_KEY": "your-api-key"
}
}
}
}
Or using uv:
{
"mcpServers": {
"Vectara": {
"command": "uv",
"args": ["tool", "run", "vectara-mcp", "--stdio"]
}
}
}
Note: Claude Desktop requires STDIO transport. While less secure than HTTP, it's acceptable for local desktop use.
Once the installation is complete, and the Claude desktop app is configured, you must completely close and re-open the Claude desktop app to see the Vectara-mcp server. You should see a hammer icon in the bottom left of the app, indicating available MCP tools, you can click on the hammer icon to see more detail on the Vectara-search and Vectara-extract tools.
Now claude will have complete access to the Vectara-mcp server, including all six Vectara tools.
First-time setup (one-time per session):
1. Configure your API key securely:
setup-vectara-api-key
API key: [your-vectara-api-key]
After setup, use any tools without exposing your API key:
- ask_vectara:
Run a RAG query using Vectara, returning search results with a generated response.
Args:
- query: str, The user query to run - required.
- corpus_keys: list[str], List of Vectara corpus keys to use for the search - required.
- n_sentences_before: int, Number of sentences before the answer to include in the context - optional, default is 2.
- n_sentences_after: int, Number of sentences after the answer to include in the context - optional, default is 2.
- lexical_interpolation: float, The amount of lexical interpolation to use - optional, default is 0.005.
- max_used_search_results: int, The maximum number of search results to use - optional, default is 10.
- generation_preset_name: str, The name of the generation preset to use - optional, default is "vectara-summary-table-md-query-ext-jan-2025-gpt-4o".
- response_language: str, The language of the response - optional, default is "eng".
Returns:
- The response from Vectara, including the generated answer and the search results.
- search_vectara:
Run a semantic search query using Vectara, without generation.
Args:
- query: str, The user query to run - required.
- corpus_keys: list[str], List of Vectara corpus keys to use for the search - required.
- n_sentences_before: int, Number of sentences before the answer to include in the context - optional, default is 2.
- n_sentences_after: int, Number of sentences after the answer to include in the context - optional, default is 2.
- lexical_interpolation: float, The amount of lexical interpolation to use - optional, default is 0.005.
Returns:
- The response from Vectara, including the matching search results.
- correct_hallucinations:
Identify and correct hallucinations in generated text using Vectara's VHC (Vectara Hallucination Correction) API.
Args:
- generated_text: str, The generated text to analyze for hallucinations - required.
- documents: list[str], List of source documents to compare against - required.
- query: str, The original user query that led to the generated text - optional.
Returns:
- JSON-formatted string containing corrected text and detailed correction information.
- eval_factual_consistency:
Evaluate the factual consistency of generated text against source documents using Vectara's dedicated factual consistency evaluation API.
Args:
- generated_text: str, The generated text to evaluate for factual consistency - required.
- documents: list[str], List of source documents to compare against - required.
- query: str, The original user query that led to the generated text - optional.
Returns:
- JSON-formatted string containing factual consistency evaluation results and scoring.
Note: API key must be configured first using setup_vectara_api_key tool or VECTARA_API_KEY environment variable.
1. RAG Query with Generation:
ask-vectara
Query: Who is Amr Awadallah?
Corpus keys: ["your-corpus-key"]
2. Semantic Search Only:
search-vectara
Query: events in NYC?
Corpus keys: ["your-corpus-key"]
3. Hallucination Detection & Correction:
correct-hallucinations
Generated text: [text to check]
Documents: ["source1", "source2"]
4. Factual Consistency Evaluation:
eval-factual-consistency
Generated text: [text to evaluate]
Documents: ["reference1", "reference2"]
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"vectara mcp server": {
"vectara": {
"command": "/Users/ofer/.local/bin/uv",
"args": [
"--directory",
"/Users/ofer/dev/vectara-mcp",
"run",
"server.py"
]
}
}
}
}
McpServers
{
"vectara": {
"command": "/Users/ofer/.local/bin/uv",
"args": [
"--directory",
"/Users/ofer/dev/vectara-mcp",
"run",
"server.py"
]
}
}
> 🔌 Compatible with Claude Desktop, and any other MCP Client!
>
> Vectara MCP is also compatible with any MCP client
>
The Model Context Protocol (MCP) is an open standard that enables AI systems to interact seamlessly with various data sources and tools, facilitating secure, two-way connections.
Vectara-MCP provides any agentic application with access to fast, reliable RAG with reduced hallucination, powered by Vectara's Trusted RAG platform, through the MCP protocol.
Installation
You can install the package directly from PyPI:
pip install vectara-mcp
Quick Start
Secure by Default (HTTP/SSE with Authentication)
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



