Skip to main content
SHARC publishes two packages to NPM for integration into your projects.

@sharc-code/mcp

npm version The MCP server that provides semantic code search to AI assistants.

Run on demand

Most users don’t install this package directly — your MCP client launches it via npx:

Usage with Claude Code

Features

  • 7 MCP tools for indexing and searching code
  • Real-time file watching for incremental updates
  • AST-based code chunking with context injection
  • Merkle-based sync for efficient re-indexing

@sharc-code/splitter

npm version Code chunking library with AST-based splitting and LangChain fallback.

Installation

Usage

Supported Languages (AST)

Features

  • AST-based chunking: Extracts complete semantic units (functions, classes, methods)
  • Context injection: Adds parent class/module context to each chunk
  • Decorator support: Extracts @Decorator, #[attribute], and @Annotation context
  • LangChain fallback: Character-based chunking for unsupported languages
  • Syntax validation: Detects parse errors before chunking

API Reference

AstCodeSplitter

LangChainCodeSplitter


Package Versions