Skip to main content
Claude Code ships with a first-class MCP CLI. One command and you’re done.

Quick install

Restart Claude Code and the seven SHARC tools become available.
Use -s user to install for your user (available across all projects) or -s project to commit a .mcp.json to the repo so teammates get it automatically. Default is local (this project, your machine).

Verify

Look for a sharc entry. From inside Claude Code, ask:
You should see index_codebase, search_code, clear_index, get_indexing_status, start_watch, stop_watch, get_watch_status.

Manual configuration (alternative)

If you’d rather edit JSON directly, add this to your Claude Code MCP config:

Usage examples

Indexing a codebase

Searching code

Incremental updates

After the initial index, SHARC watches the working tree and re-indexes changed files automatically:

Best practices

Index before deep dives

For the best experience, index before asking complex questions:

Use natural language queries

SHARC understands semantic meaning, not just keywords:

Adjust result limits

For broad exploration, increase the limit:
For specific answers, keep it low (default 3).

Troubleshooting

Tools not available

  1. Restart Claude Code
  2. Run claude mcp list and confirm sharc is listed
  3. Verify the API key is correct: claude mcp get sharc

Slow indexing

Initial indexing time depends on codebase size. The Hono repo takes ~30-45 seconds; large repos like Next.js can take 3-4 minutes. Subsequent runs use Merkle diff for near-instant updates.

Search returns unexpected results

  • Try rephrasing your query semantically
  • Use extensionFilter to narrow to specific file types
  • Check if the codebase is fully indexed with get_indexing_status