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.Recommended: run via npx
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.
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.Environment variable
SHARC needs a single environment variable. Every client config below sets it for you.| Variable | Required | Description |
|---|---|---|
SHARC_API_KEY | Yes | Your 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_codebasesearch_codeclear_indexget_indexing_statusstart_watchstop_watchget_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
- Restart your client after editing config
- Check the client’s MCP logs for a startup error
- Verify Node.js 18+ is on your PATH:
node --version