Skip to main content

Connecting Vectorize MCP Server to Claude Code

This guide shows you how to connect your Vectorize MCP agent to Claude Code, enabling Claude to access your agent's capabilities directly from the command line.

Prerequisites

  • Claude Code installed on your computer (Download Claude Code)
  • A Vectorize MCP agent already created with at least one tool configured
  • An API key for your Vectorize agent

Setup Instructions

Step 1: Get Your Agent Credentials

From your Vectorize agent:

  1. Navigate to your agent's Agent API Keys section
  2. If you don't have an API key yet:
    • Click Create New Key
    • Give it a descriptive name (e.g., "Claude Code Key")
    • Click Create Key
  3. Note down:
    • Your Agent ID from the agent overview page
    • Your API Key - save this securely as you won't be able to see it again!

Step 2: Add MCP Server to Claude Code

Run the following command in your terminal, replacing the placeholders with your actual values:

claude mcp add vectorize-mcp --env VECTORIZE_API_KEY=YOUR_API_KEY \
-- npx -y mcp-remote@latest https://agents.vectorize.io/api/agents/YOUR_AGENT_ID/mcp \
--header "Authorization: Bearer \${VECTORIZE_API_KEY}"

Replace:

  • YOUR_API_KEY with your actual API key
  • YOUR_AGENT_ID with your actual Agent ID

Verification

After running the command:

  1. Claude Code will confirm that the MCP server has been added successfully

  2. You can verify the connection by running:

    claude mcp list

    You should see vectorize-mcp in the list of configured servers

  3. Start a new Claude Code session and your agent's tools will be available

Using Your MCP Tools

Once connected, you can use your Vectorize agent's capabilities in Claude Code:

  • Ask questions that relate to your configured tools and knowledge base
  • Request information from your indexed documents
  • Leverage your agent's specialized capabilities for your tasks

Claude Code will automatically use the appropriate tools based on your queries and the tool descriptions you've configured.

Managing the Connection

View Configuration

claude mcp list

Remove the MCP Server

If you need to remove the connection:

claude mcp remove vectorize-mcp

Using Tools

The tool will be automatically invoked based on your queries. Make sure your tool descriptions clearly explain what each tool does so Claude knows when to use them. Here is what it looks like when you use a tool:

Claude Code tool usage

Was this page helpful?