When should you use this server
Use Vectara MCP when you want an agent to:
- Run semantic search over enterprise documents.
- Perform RAG queries that return both search results and a synthesized answer.
- Ground responses in organization-specific data with minimal setup.
ask_vectara
Run a RAG query using Vectara. Returns search results along with a generated response.
Arguments
query (string, required) โ the user query to run.
corpus_keys (list[string], required) โ corpus keys to search; the user must provide one or more.
api_key (string, required) โ the Vectara API key.
n_sentences_before (int, optional, default=2) โ sentences before a hit to include in context.
n_sentences_after (int, optional, default=2) โ sentences after a hit to include in context.
lexical_interpolation (float, optional, default=0.005) โ balance between semantic and lexical match.
max_used_search_results (int, optional, default=10) โ max number of search results to use.
generation_preset_name (string, optional, default=vectara-summary-table-md-query-ext-jan-2025-gpt-4o) โ generation preset.
response_language (string, optional, default=eng) โ language of the generated response.
Returns
- Generated answer (string)
- Supporting search results (list of documents/snippets)
Example usage
- โSummarize the refund policy from the Finance corpus.โ
- โAnswer FAQs about GDPR using the Compliance corpus.โ
search_vectara
Run a semantic search query without generation. Returns only the most relevant search results.
Arguments
query (string, required) โ the user query to run.
corpus_keys (list[string], required) โ corpus keys to search.
api_key (string, required) โ the Vectara API key.
n_sentences_before (int, optional, default=2) โ sentences before a hit to include.
n_sentences_after (int, optional, default=2) โ sentences after a hit to include.
lexical_interpolation (float, optional, default=0.005) โ balance between semantic and lexical match.
Returns
- Matching search results with context snippets.
Example usage
- โFind all product docs mentioning SAML login.โ
- โSearch engineering notes for โdistributed caching.โโ
SourceLast modified on March 9, 2026