Skip to main content

Claude Code Integration

Connect your Vectorize MCP agent to Claude Code for terminal-based AI assistance with access to your private data.

Prerequisites

  • Claude Code installed (Download here)
  • MCP agent created in Vectorize
  • At least one function configured
  • API key generated for your agent

Quick Setup

1. Get Your Credentials

  1. Open your MCP agent in Vectorize
  2. Go to Agent API Keys
  3. Click Create New Key and name it (e.g., "Claude Code")
  4. Save your API key securely
  5. Note your Agent ID from the agent overview

2. Add to Claude Code

Run this command with your credentials:

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 and YOUR_AGENT_ID with your actual values.

Verify Connection

  1. Claude Code confirms the server was added
  2. Verify with:
    claude mcp list
  3. vectorize-mcp appears in the list
  4. Start a new session to use your functions

Usage Tips

Example Commands

# Search your documentation
claude "Find information about our API authentication"

# Query specific data
claude "What are the latest customer feedback items?"

# Get code examples
claude "Show me examples of our payment integration"

Function Invocation

Claude Code automatically selects the right function based on your query. Functions appear inline as they're called:

Claude Code tool usage

Managing Connections

List All MCP Servers

claude mcp list

Remove Connection

claude mcp remove vectorize-mcp

Update Connection

Remove and re-add with new credentials:

claude mcp remove vectorize-mcp
# Then run the add command again with new values

Troubleshooting

Connection Failed

  • Verify API key and Agent ID are correct
  • Check internet connectivity
  • Ensure agent has at least one function

Functions Not Working

  • Check function descriptions are clear
  • Verify pipeline has indexed data
  • Test functions in Vectorize UI first

Authentication Errors

  • Confirm API key hasn't expired
  • Validate Agent ID matches your agent
  • Try creating a new API key

Next Steps

Was this page helpful?