Mantic.sh
by marcoaapfortes·★ 547·Score 50
A context-aware code search engine for AI agents with semantic understanding of code structure.
Overview
Mantic is a structural code search engine designed specifically for AI agents. It prioritizes relevance over raw speed, combining semantic understanding with heuristic search to find conceptually relevant code. The tool supports advanced features like CamelCase detection, path sequence matching, and can perform code intelligence tasks like 'go to definition' and 'find references' across monorepos. It runs entirely locally with zero data egress, making it both efficient and private.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose Mantic when you need context-aware code search for AI agents, require understanding code structure beyond simple text matching, and prioritize result quality over raw search speed.
When NOT to choose this
Avoid Mantic for very large repos (100K+ files) where maximum speed is critical, or for simple exact string searches where faster tools like ripgrep are sufficient.
Tools this server exposes
10 tools extracted from the READMEsearch_filesSearch code files by intent with optional semantic reranking
get_definitionGo to definition of a symbol across the codebase
find_referencesFind all usages of a symbol in the codebase
get_contextZero-query mode for proactive context about modified files and dependencies
session_startStart a named coding session with intent context
session_endEnd an active coding session
session_record_viewTrack viewed files in the current session
session_listList all active sessions
session_infoGet detailed information about a specific session
analyze_intentUnderstand query intent to improve search results
Comparable tools
Installation
MCP Server Installation
Mantic works as an MCP (Model Context Protocol) server for Claude Desktop, Cursor, VS Code, and other MCP-compatible tools.
**One-Click Install:**
- [Install in Cursor](https://cursor.com/en/install-mcp?name=mantic&config=eyJ0eXBlIjogInN0ZGlvIiwgImNvbW1hbmQiOiAibnB4IiwgImFyZ3MiOiBbIi15IiwgIm1hbnRpYy5zaEBsYXRlc3QiLCAic2VydmVyIl19)
- [Install in VS Code](https://vscode.dev/redirect/mcp/install?name=mantic&config=%7B%22type%22%3A%20%22stdio%22%2C%20%22command%22%3A%20%22npx%22%2C%20%22args%22%3A%20%5B%22-y%22%2C%20%22mantic.sh%40latest%22%2C%20%22server%22%5D%7D)
**Manual Configuration** (for Claude Desktop or other MCP clients):
Add this to your MCP settings file:
- **macOS**:
~/Library/Application Support/Claude/claude_desktop_config.json - **Windows**:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": ["-y", "mantic.sh@latest", "server"]
}
}
}FAQ
- How does Mantic compare to ripgrep?
- Mantic is slower than ripgrep on raw speed but provides superior relevance ranking, context-aware search, and code intelligence features like 'go to definition' and 'find references'.
- Is Mantic suitable for very large repositories?
- Mantic can handle large repositories (tested on Chromium with 481K files) but has a speed tradeoff. For very large repos (100K+ files), ripgrep may be faster for simple text searches.
On Hacker News
Recent discussion from the developer community.
- Story by marcoaapfortes · 2026-01-06
Compare Mantic.sh with
Last updated · Auto-generated from public README + GitHub signals.