Skip to main content

A Model Context Protocol (MCP) server that provides capabilities using Vectara's RAG

Reason this release was yanked:

not working

Project description

Vectara MCP Server

GitHub Repo stars PyPI version License

🔌 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

Available Tools

  • 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. 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.

  • 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. 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.

Configuration with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "Vectara": {
      "command": "/Users/ofer/.local/bin/uv",
      "args": [
        "--directory",
        "/Users/ofer/dev/vectara-mcp",
        "run",
        "server.py"
      ]
    }
  }
}

Usage in Claude Desktop App

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 detial on the Vectara-search and Vectara-extract tools.

Now claude will have complete access to the Vectara-mcp server, including the ask-vectara and search-vectara tools. When you issue the tools for the first time, Claude will ask you for your Vectara api key and corpus key (or keys if you want to use multiple corpora). After you set those, you will be ready to go. Here are some examples you can try (with the Vectara corpus that includes information from our website:

Vectara RAG Examples

  1. Querying Vectara corpus:
ask-vectara Who is Amr Awadallah?
  1. Searching Vectara corpus:
search-vectara events in NYC?

Acknowledgments ✨

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vectara-mcp-0.1.2.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vectara_mcp-0.1.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file vectara-mcp-0.1.2.tar.gz.

File metadata

  • Download URL: vectara-mcp-0.1.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for vectara-mcp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fe71c8e0e335300c799395bcbdfb3702a49ee8d8c1cacd7c434f94e2a7338436
MD5 fb1259f8e9f7ae1497edada504375618
BLAKE2b-256 212f4e93c588290aed736b43e61dffa205ed1b49ca71edb350d2d76f2842c70e

See more details on using hashes here.

File details

Details for the file vectara_mcp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: vectara_mcp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for vectara_mcp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8d0b579dacc6a1e5b1b50b6aee4c138f552c288ae761d164c6ac5d49497164fb
MD5 3242717e497d97813df55d0f5d7b4316
BLAKE2b-256 e83f8de10e0af1cf3d66528363a357df32aff829a35cc4debf463cde841673f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page