Skip to main content
SHARC runs as an MCP (Model Context Protocol) server that connects to your AI assistant. Most users never need to install it manually — your client downloads it on demand via npx.

Requirements

  • Node.js 18+ (required — the SHARC MCP server runs on Node)
  • SHARC API key — sign in at sharc.sh with Google or GitHub, then create a key at Dashboard → API Keys
  • An MCP-compatible client — Claude Code, Codex, Droid, OpenCode, Cursor, etc.
Bun is not supported. Bun blocks postinstall scripts by default, which prevents the AST splitter’s native parsers from installing correctly. Use npx (npm) or pnpm dlx instead.
Almost every MCP client wraps SHARC as npx -y @sharc-code/mcp@latest. This downloads and runs the latest version on demand — no global install required.
npx -y @sharc-code/mcp@latest
The first run takes a few seconds to fetch dependencies; subsequent runs are cached. If you prefer pnpm:
pnpm dlx @sharc-code/mcp@latest

Client setup

Pick your MCP client for a one-command install:

Claude Code

claude mcp add — single-command setup.

Codex

codex mcp add for the CLI/TUI, or use the Codex GUI.

Droid

droid mcp add — Factory’s terminal agent.

OpenCode

Drop a snippet into opencode.json.
For Cursor, Windsurf, VS Code, Zed, Claude Desktop, and other clients, see Other MCP clients.

Environment variable

SHARC needs a single environment variable. Every client config below sets it for you.
VariableRequiredDescription
SHARC_API_KEYYesYour authentication key (format sk_mcp_...)

Verify the install

After configuring your client, ask the assistant to list available tools. You should see seven SHARC tools:
  • index_codebase
  • search_code
  • clear_index
  • get_indexing_status
  • start_watch
  • stop_watch
  • get_watch_status

Troubleshooting

”Invalid API key”

  • Ensure the key starts with sk_mcp_
  • Confirm it is set on the SHARC server entry (not a different MCP server)
  • Check the key is still active in Dashboard → API Keys

Tools not appearing

  1. Restart your client after editing config
  2. Check the client’s MCP logs for a startup error
  3. Verify Node.js 18+ is on your PATH: node --version