Hasty Briefsbeta

Show HN: Sourcerer – MCP for semantic code search that reduces token waste

11 days ago
  • #code-indexing
  • #AI-agents
  • #semantic-code-search
  • MCP server for semantic code search & navigation helps AI agents work efficiently by reducing token usage.
  • Requires OpenAI API Key for generating embeddings and Git for repository management.
  • Installation options include `go install`, `brew install`, and adding to `claude mcp`.
  • Sourcerer builds a semantic search index using Tree-sitter to parse source files into ASTs.
  • Extracts meaningful chunks (functions, classes, methods) with stable IDs and contextual summaries.
  • Automatically watches for file changes, respects `.gitignore`, and re-indexes changed files.
  • Uses chromem-go for persistent vector storage and OpenAI's API for semantic similarity.
  • Provides functions like `semantic_search`, `get_chunk_code`, `find_similar_chunks`, and `index_workspace`.
  • Currently supports Go, JavaScript, Markdown, Python, TypeScript; planned support for C, C++, Java, Ruby, Rust.
  • Open for contributions; see CONTRIBUTING.md.