Skip to main content
SHARC provides semantic code search capabilities through the Model Context Protocol (MCP). This guide will help you set up SHARC with your preferred AI assistant.

Prerequisites

Before you begin, ensure you have:
  • Node.js 18+ installed
  • A SHARC API key — sign in at sharc.sh with Google or GitHub, then create one at Dashboard → API Keys
  • An MCP-compatible AI assistant (Claude Code, Codex, Droid, OpenCode, Cursor, etc.)

Quick Start

The fastest way to get started is with Claude Code:
claude mcp add sharc -e SHARC_API_KEY=sk_mcp_... -- npx -y @sharc-code/mcp@latest
That’s it! Now you can index and search your codebases:
> Index this codebase for semantic search

● index_codebase (MCP)
  ⎿ Indexed 2,450 chunks from 342 files in 18.3s

> How does authentication work?

● search_code (MCP)
  ⎿ Found 3 results with scores 0.94-0.98

What’s Next?

Installation

Detailed installation instructions and requirements.

Claude Code

Single-command setup with claude mcp add.

Codex

CLI/TUI and desktop GUI walkthroughs.

Droid

Set up SHARC in Factory’s Droid CLI.

OpenCode

Drop a snippet into opencode.json.

Other Clients

Cursor, VS Code, Windsurf, Zed, Claude Desktop, and more.

How It Works

  1. Index your codebase - SHARC analyzes your code, splits it into semantic chunks, and creates embeddings
  2. Ask questions - Use natural language to search for code functionality
  3. Get precise results - Receive ranked code snippets with relevance scores
  4. Stay updated - File watching keeps your index current as you code