TL;DR
Mantic.sh is an open-source, local-first code search tool built to give AI agents fast, structural context without embeddings or vector databases. The v1.0.13 update fixes ignore-pattern bugs, adds a timeout wrapper, and implements three environment variables for scanning control.
What happened
Mantic.sh, a structural code search layer aimed at reducing context-retrieval cost for AI agents, published a new release (v1.0.13). The update activates three previously non-functional environment variables—MANTIC_IGNORE_PATTERNS for custom glob exclusions, MANTIC_MAX_FILES to cap returned files (default 300), and MANTIC_TIMEOUT to set search timeouts (default 5000 ms). The release also repaired a regex bug that interfered with ignore patterns and added a timeout wrapper to avoid stalls on extremely large repositories. The project advertises sub-500ms retrieval across large monorepos by inferring intent from file paths and metadata rather than scanning all file contents; benchmarks in the repository show sub-second responses on an M1 Pro machine for repositories ranging from ~9.6k files to Chromium’s ~480k files. Mantic runs locally, requires no external APIs or vector stores, and is available via npx, source install, or as an MCP server for MCP-compatible tools.
Why it matters
- Local-first operation preserves repository privacy by avoiding external data egress.
- Faster context retrieval (sub-500ms) can reduce latency in agent-driven coding workflows compared with embedding-based searches.
- Filtering by structure and metadata can cut token usage prior to content reading, claimed to reduce tokens by up to 63%.
- No external dependencies (no API keys or vector DBs) simplifies deployment and lowers third‑party costs.
Key facts
- v1.0.13 implements three environment variables: MANTIC_IGNORE_PATTERNS, MANTIC_MAX_FILES, and MANTIC_TIMEOUT.
- Default MANTIC_MAX_FILES is 300; default MANTIC_TIMEOUT is 5000 ms.
- The release fixed a glob-matching regex that previously blocked ignore patterns and added a timeout wrapper to avoid hanging on very large repos.
- Mantic claims sub-500ms file ranking even on very large repositories, using git-tracked file enumeration and structural scoring instead of embeddings.
- Performance benchmarks on an M1 Pro: Cal.com (~9.6k files, ~500MB) returned in ~0.32s vs a vector-based 0.85s; Chromium (~480k files, ~59GB) returned in ~0.46s vs vector-based 5–10s.
- Features include deterministic scoring, git-native scanning, impact analysis, and native MCP support for tools like Claude Desktop, Cursor, and VS Code.
- Install options include running directly with npx, building from source, or running as an MCP server via a provided configuration snippet.
- Mantic.sh is released under the AGPL-3.0 license and has usage guidance for free internal/open-source use; a license is required for embedding in commercial products or hosting as a service.
What to watch next
- Adoption and integration across MCP-compatible tools and IDEs (Claude Desktop, Cursor, VS Code) and how teams incorporate Agent Rules.
- Performance comparisons on non-M1 hardware and in different CI/production environments — not confirmed in the source.
- How commercial licensing and enforcement will be applied to teams wanting to embed or host Mantic as a service — not confirmed in the source.
Quick glossary
- Structural code search: A search approach that uses file paths, filenames, and metadata to identify relevant files instead of reading or embedding full file contents.
- Model Context Protocol (MCP): A protocol for connecting external tools and services to AI agents so they can request and receive context or tool outputs during generation.
- Embeddings / Vector database: A technique that converts text into numeric vectors stored in a specialized database to enable semantic similarity search.
- git ls-files: A Git command that lists files tracked in a repository; used here to quickly enumerate relevant, versioned files.
- AGPL-3.0: A copyleft open-source license that requires derivative works and network-deployed versions to publish source under the same license.
Reader FAQ
Is Mantic.sh open source?
Yes; the project is published under the AGPL-3.0 license.
Does Mantic use embeddings or a vector database?
No. It ranks files using structural signals and metadata rather than embeddings or vector stores.
Can I run Mantic locally?
Yes. The tool is designed to run locally with no external data egress and can be invoked via npx or installed from source.
Does it work with Claude Desktop or IDEs?
The repo includes MCP configuration for Claude Desktop and mentions integrations for Cursor and VS Code.
Are there usage restrictions for commercial hosting or embedding?
A commercial license is required to embed Mantic in products you sell or to offer it as a hosted service.
Mantic A structural code search engine for AI agents. Provides sub-500ms file ranking across massive codebases without embeddings, vector databases, or external dependencies. What's New in v1.0.13 Environment Variables: Implemented…
Sources
- Show HN: Mantic.sh – A structural code search engine for AI agents
- Mantic.sh – A structural code search engine for AI agents
- DistilHN
- Top 5 Agentic Frameworks to Know in 2025
Related posts
- VaultSandbox: In-VPC production-like email testing for real SMTP services
- Redox OS December 2025: 10th Anniversary, Intel GPU Driver, ARM64 Linking
- Inside V8’s RISC-V Port: Recent Changes, Performance, and Deprecation