Claude Code (CLI)

Prerequisites:

Note: Claude Code CLI requires an active Claude subscription (Claude Pro, Max, Team, or Enterprise) or an Anthropic API key with available credits.

Getting Started - Opening Claude Code in Your Project

Claude Code runs from your terminal inside a project folder. Open a terminal at your project location using the steps below.

  1. Open a terminal (Command Prompt / PowerShell on Windows, Terminal on macOS or Linux).
  2. Navigate to your project folder:
  • Windows: cd C:\path\to\your\project
  • macOS: cd ~/path/to/your/project
  • Linux: cd ~/path/to/your/project
  1. Launch Claude Code:
    claude
    

Tip: Once Claude Code is running, type /help to see available commands or /mcp to view connected MCP servers.

Connection Configuration:

Replace your-server:8443 with SearchBlox server address and your-SB-PKEY with SearchBlox API key.

Option 1 - Configuration file

Add the following to .mcp.json in your project root (or ~/.claude.json for a global config):

{
  "mcpServers": {
    "searchblox": {
      "type": "http",
      "url": "https://your-server:8443/rest/v2/api/mcp",
      "headers": {
        "SB-PKEY": "your-SB-PKEY"
      }
    }
  }
}

Option 2 - CLI command

claude mcp add searchblox --transport http 
https://your-server:8443/rest/v2/api/mcp --header "SB-PKEY: your-SB-PKEY"

Verify the connection

Inside Claude Code, run:

/mcp

You should see searchblox listed as connected.

Fetch the available MCP tools

Once connected, ask Claude to list every tool the SearchBlox MCP server exposes. This confirms the integration is working and shows what capabilities you have access to:

Use curl to list all tools from searchblox MCP server.

Claude will return the full catalog (search, collections, chatbots, analytics, agents, knowledge graph, commerce, and more) - typically 80+ tools depending on your SearchBlox version.

Quick Start Examples

  1. Create a collection and chatbot

You can create a collection and chatbot from scratch using the prompt below:

create a web collection named <--COLLECTION_NAME--> with root URL and allow paths 
as https:<--URLs-->,then create a chatbot named <--CHATBOT_NAME--> for the same 
collection.
  1. View Collection Settings

You can view a collection's settings using the prompt below:

can you show me the settings for <--COLLECTION_NAME-->
  1. Invoke Agent

You can invoke any agent and see the response using the prompt below:

Can you invoke "search-relevance-workflow" agent with query - Give me a relevance 
health check for <--QUERY TERM--> on <--COLLECTION_NAME-->: top 10 hybrid, scores, 
issues, tuning recommendations.

Troubleshooting

Connection not detected: Verify the URL ends with /rest/v2/api/mcp and the API key is correct.
Connection refused: Check that the SearchBlox server is running and accessible from your machine.
Authentication errors: Confirm your SB-PKEY is valid and has not expired.
Timeout errors: Ensure network/firewall rules allow HTTPS traffic to the SearchBlox port.

Useful CLI Commands

claude mcp list                    # List configured MCP servers
claude mcp get searchblox          # Show searchblox server details
claude mcp remove searchblox       # Remove the server.

Claude CLI demo: The following demo illustrates the end-to-end workflow for configuring your search indices.Claude CLI Demo