MCP Guide

Introduction

The Model Context Protocol (MCP) 🔌 is a protocol for communicating with LLMs, primarily used for exchanging information (context) or performing actions. [MCP Introduction]

enVector supports MCP to be used with Claude or other LLMs. 🚀

enVector MCP Architecture

Prerequisites

  • Python version >= 3.9

  • A running enVector instance (Docker or enVector Cloud)

Supporting tools

  1. get_index_list : Get the list of indexes in enVector.

  2. get_index_info : Get information about a specific index in enVector.

  3. create_index : Create an index in enVector.

  4. insert : Insert vectors and the corresponding metadata into enVector index.

  5. search : Perform vector search and Retrieve Metadata from enVector.

Getting Started

  1. Run enVector server (Docker or enVector Cloud)

  2. Set up MCP server by cloning the envector-mcp-server GitHub Repo and setting up the Python environment.

  3. Run MCP server with the following example command:

    python srcs/server.py \
        --mode "http" \                                   # MCP server mode
        --envector-address "enVectorHOST:enVectorPORT" \  # envector address to connect
        --envector-key-path "/path/to/keys"               # FHE key path to use envector

    See more details in Run MCP Server or envector-mcp-server.

  4. Connect your AI application (e.g. Claude) to the MCP server by configuring settings and Chat with enVector 🚀

    Configure your MCP settings .some-mcp-config.json in your application as follows:

Connect to Remote MCP Server

{
    "mcpServers": {
        "envector-mcp-server": {
            "url": "http://MCPHOST:MCPPORT/mcp",
            "description": "enVector MCP Server"
        }
    }
}

Run MCP Server

{
    "mcpServers": {
        "enVectorMCP": {
            "command": "/path/to/envector-mcp-server/.venv/bin/python3",
            "args": [ 
                "/path/to/envector-mcp-server/srcs/server.py",
                "--mode",
                "http", 
                "--envector-address",
                "enVectorHOST:enVectorPORT",
                "--envector-key-path",
                "/path/to/envector-mcp-server/keys",
                "--envector-access-token",
                "ENVECTOR-ACCESS-TOKEN"
            ],
            "cwd": "/path/to/envector-mcp-server",
            "description": "enVector MCP Server"
        },
    }
}

⚠️ Note: MCP server holds the key for homomorphic encryption as MCP server is a enVector Client.

Examples

Claude

  1. Open Settings in Claude Desktop and click Edit Config in Developer tab.

    enVector MCP Claude Guide 1
  2. Open and onfigure Claude/claude_desktop_config.json file in:

    enVector MCP Claude Guide 2

    as:

    {
        "mcpServers": {
            "enVectorMCP": {
                "command": "/path/to/envector-mcp-server/.venv/bin/python3",
                "args": [
                    "/path/to/envector-mcp-server/srcs/server.py",
                    "--mode",
                    "stdio", 
                    "--envector-address",
                    "enVectorHOST:enVectorPORT",
                    "--envector-key-path",
                    "/path/to/envector-mcp-server/keys",
                    "--envector-cloud-access-token",
                    "ENVECTOR-ACCESS-TOKEN"
                ],
                "cwd": "/path/to/envector-mcp-server",
                "description": "enVector MCP Server"
            }
        }
    }
  3. Quit (cmd+q) and re-open Claude Desktop:

    enVector MCP Claude Guide 3

Claude Integration Example

enVector MCP Claude

Gemini CLI

Configure .gemini/settings.json:

  1. Open terminal: ~/.gemini/settings.json.

  2. Configure settings.json to connect the remote enVector MCP server:

    {
      "ide": {
        "hasSeenNudge": true
      },
      "security": {
        "auth": {
          "selectedType": "oauth-personal"
        }
      },
      "mcpServers": [
        {
          "name": "envector-mcp-server",
          "httpUrl": "http://MCPHOST:MCPPORT/mcp",
          "description": "enVector MCP Server"
        },
      ]
    }
  3. Try Gemini CLI with enVector MCP server:

    enVector MCP gemini

Cursor

Configure .cursor/mcp.json

{
    "mcpServers": {
      "envector-mcp-server": {
        "url": "http://MCPHOST:MCPPORT/mcp",
        "description": "enVector MCP Server"
      }
    }
  }

Codex

Configure .codes/config.toml as following steps:

  1. Open Codex in your IDE and open config.toml in MCP settings. For example, open codex in VSCode and click 'Open config.toml' in MCP settings that can be found in settings.

    enVector MCP codex
  2. Configure ~/.codes/config.toml to connect the remote enVector MCP server:

    [features]
    rmcp_client = true
    
    [mcp_servers.enVector]
    url = "http://MCPHOST:MCPPORT/mcp"
  3. Check whether enVector MCP server iÍs connected successfully.

Cline

Cline is an autonomous AI coding agent. To use the remote enVector MCP server with Cline, configure cline_mcp_settings.json as the following steps:

  1. Open VSCode and Install Cline in Extensions.

  2. Open Cline tab and click setting icon in Manage MCP Servers.

    enVector MCP cline1
  3. Configure cline_mcp_settings.json from 'Configure MCP Servers' in 'Configure'.

    {
      "mcpServers": {
        "envector-mcp-server": {
          "timeout": 60,
          "url": "http://MCPHOST:MCPPORT/mcp",
          "type": "streamableHttp",
          "disabled": false,
        }
      }
    }
    enVector MCP cline2

Last updated