Skip to main content
Glama
vectara

Vectara MCP server

Official
by vectara

Vectara MCP 服务器

GitHub Repo 星标PyPI 版本执照

🔌Claude Desktop以及任何其他 MCP 客户端兼容!

Vectara MCP 也与任何 MCP 客户端兼容

模型上下文协议 (MCP) 是一种开放标准,使 AI 系统能够与各种数据源和工具无缝交互,促进安全的双向连接。

Vectara-MCP 通过 MCP 协议为任何代理应用程序提供对快速、可靠且幻觉较少的 RAG 的访问,该 RAG 由 Vectara 的 Trusted RAG 平台提供支持。

安装

您可以直接从 PyPI 安装该包:

pip install vectara-mcp

Related MCP server: mcp-rag-server

可用工具

  • **ask_vectara:**使用 Vectara 运行 RAG 查询,返回带有生成响应的搜索结果。

    参数:

    • query:str,要运行的用户查询 - 必需。

    • corpus_keys:list[str],用于搜索的 Vectara 语料库关键词列表 - 必填。请要求用户提供一个或多个语料库关键词。

    • api_key:str,Vectara API 密钥 - 必需。

    • n_sentences_before:int,包含在上下文中的答案之前的句子数 - 可选,默认为 2。

    • n_sentences_after:int,答案后包含在上下文中的句子数 - 可选,默认为 2。

    • lexical_interpolation:浮点数,要使用的词汇插值量 - 可选,默认值为 0.005。

    • max_used_search_results:int,要使用的最大搜索结果数 - 可选,默认为 10。

    • generation_preset_name:str,要使用的生成预设的名称 - 可选,默认为“vectara-summary-table-md-query-ext-jan-2025-gpt-4o”。

    • respond_language:str,响应的语言 - 可选,默认为“eng”。

    返回:

    • Vectara 的回应,包括生成的答案和搜索结果。

  • **search_vectara:**使用 Vectara 运行语义搜索查询,无需生成。

    参数:

    • query:str,要运行的用户查询 - 必需。

    • corpus_keys:list[str],用于搜索的 Vectara 语料库关键词列表 - 必填。请要求用户提供一个或多个语料库关键词。

    • api_key:str,Vectara API 密钥 - 必需。

    • n_sentences_before:int,包含在上下文中的答案之前的句子数 - 可选,默认为 2。

    • n_sentences_after:int,答案后包含在上下文中的句子数 - 可选,默认为 2。

    • lexical_interpolation:浮点数,要使用的词汇插值量 - 可选,默认值为 0.005。

    返回:

    • Vectara 的回应,包括匹配的搜索结果。

使用 Claude Desktop 进行配置

添加到您的 claude_desktop_config.json:

{
  "mcpServers": {
    "Vectara": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "vectara-mcp"
      ]
    }
  }
}

在 Claude 桌面应用程序中的使用

安装完成并配置好 Claude 桌面应用程序后,您必须完全关闭并重新打开 Claude 桌面应用程序才能查看 Vectara-mcp 服务器。您应该会在应用程序左下角看到一个锤子图标,表示可用的 MCP 工具,您可以点击该锤子图标查看有关 Vectara-search 和 Vectara-extract 工具的更多详细信息。

现在,Claude 将拥有 Vectara-mcp 服务器的完整访问权限,包括 ask-vectara 和 search-vectara 工具。首次使用这些工具时,Claude 会要求您提供 Vectara API 密钥和语料库密钥(如果您想使用多个语料库,则需要提供多个密钥)。设置完成后,您就可以开始了。以下是一些您可以尝试的示例(使用包含我们网站信息的 Vectara 语料库):

Vectara RAG 示例

  1. 查询Vectara语料库

ask-vectara Who is Amr Awadallah?
  1. 搜索 Vectara 语料库

search-vectara events in NYC?

致谢✨

Available Tools

2 tools
ask_vectaraA
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. Please ask the user to provide one or more corpus keys. 
    api_key: str, The Vectara API key - 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.
ParametersJSON Schema
NameRequiredDescriptionDefault
api_keyNo
corpus_keysNo
generation_preset_nameNovectara-summary-table-md-query-ext-jan-2025-gpt-4o
lexical_interpolationNo
max_used_search_resultsNo
n_sentences_afterNo
n_sentences_beforeNo
queryYes
response_languageNoeng

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool's function (RAG query with response generation) and mentions required parameters, but lacks details on authentication needs (though 'api_key' is implied), rate limits, error handling, or what happens if corpus keys are invalid. It adds some context but falls short of comprehensive behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear opening sentence, followed by an 'Args:' section detailing parameters and a 'Returns:' section. It is appropriately sized for a complex tool with many parameters, though some sentences could be more concise (e.g., the parameter explanations are verbose but necessary).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (9 parameters, no annotations, no output schema), the description is partially complete. It covers the purpose, parameters, and return statement, but lacks information on output format, error cases, or dependencies. Without an output schema, more detail on the response structure would improve completeness for such a multifaceted tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains each parameter's purpose, required status, and default values (e.g., 'query: str, The user query to run - required'), compensating fully for the schema's lack of descriptions. This is essential given the 9 parameters with only 1 required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('Run a RAG query using Vectara') and resources ('returning search results with a generated response'). It distinguishes from the sibling tool 'search_vectara' by emphasizing the generation of a response alongside search results, which suggests 'search_vectara' might only return raw search results without generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool (for RAG queries with Vectara) and includes guidance on required parameters like asking the user for corpus keys. However, it does not explicitly state when NOT to use it or mention alternatives like 'search_vectara' for non-generation searches, which would be needed for a perfect score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_vectaraA
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. Please ask the user to provide one or more corpus keys. 
    api_key: str, The Vectara API key - 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.
ParametersJSON Schema
NameRequiredDescriptionDefault
api_keyNo
corpus_keysNo
lexical_interpolationNo
n_sentences_afterNo
n_sentences_beforeNo
queryYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that the tool performs a semantic search and returns matching results, but lacks details on behavioral traits like authentication needs (though 'api_key' is a parameter), rate limits, error handling, or what 'without generation' entails operationally. The description doesn't contradict annotations (none provided), but offers minimal behavioral context beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose statement followed by 'Args:' and 'Returns:' sections. It's appropriately sized, with each sentence adding value (e.g., explaining parameters and returns). However, it could be more front-loaded by integrating key parameter details into the initial statement, and some phrasing is slightly verbose (e.g., 'Please ask the user to provide').

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, 0% schema coverage, no annotations, and no output schema, the description is moderately complete. It covers parameter semantics well but lacks behavioral transparency (e.g., auth, limits) and detailed return value explanation beyond 'including the matching search results.' For a search tool with multiple parameters and no structured support, more context on outputs and behavior would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds significant meaning beyond the schema by explaining all 6 parameters: purpose (e.g., 'query' is 'The user query to run'), requirements (e.g., 'corpus_keys' and 'api_key' are 'required'), defaults (e.g., 'n_sentences_before' default is 2), and user guidance (e.g., 'Please ask the user to provide one or more corpus keys'). This fully documents parameter semantics not covered by the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Run a semantic search query using Vectara, without generation.' It specifies the verb ('search'), resource ('Vectara'), and distinguishes it from sibling 'ask_vectara' by noting 'without generation.' However, it doesn't explicitly contrast with the sibling tool beyond this implicit distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating 'without generation,' suggesting this is for pure search versus generative queries. It mentions 'Please ask the user to provide one or more corpus keys' for the 'corpus_keys' parameter, offering some guidance. However, it lacks explicit when-to-use versus 'ask_vectara' or other alternatives, and no exclusions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.0
    • First observedask_vectara
    • First observedsearch_vectara

TDQS

A3.6/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: ask_vectara performs RAG queries with generated responses, while search_vectara performs semantic search without generation. Their descriptions explicitly differentiate between these functions, leaving no room for confusion or overlap in intended use.

Naming Consistency5/5

Both tools follow a perfect verb_noun pattern with 'vectara' as the consistent noun component. The naming is completely uniform across the tool set, using snake_case consistently without any deviations or mixed conventions.

Tool Count2/5

With only 2 tools, this server feels significantly under-scoped for a Vectara integration. A comprehensive MCP server for a search/RAG platform would typically include tools for corpus management, document operations, configuration settings, and additional query types beyond just these two basic search functions.

Completeness2/5

The tool surface is severely incomplete for a Vectara integration. While it covers basic querying, it lacks essential operations like creating/updating/deleting corpora, managing documents within corpora, configuring search parameters, handling authentication more robustly, or providing administrative functions. This creates significant gaps that will limit agent capabilities.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Local MCP server that provides semantic search (RAG) over code repositories, enabling AI clients like Claude and Gemini to access project context without manual re-upload.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that indexes documents and serves relevant context to LLMs via Retrieval Augmented Generation (RAG).
    28
    37
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that exposes document retrieval as tools (semantic search and source listing) for any LLM, using a vector index built from DocPilot's ingestion pipeline.
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vectara/vectara-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server