Mantic
A structural code search engine for Al agents.
What is Mantic?
Mantic is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to structural code search engine for al agents.
A structural code search engine for Al agents.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A structural code search engine for Al agents.
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mantic-shConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Mantic
Mantic.sh is a structural code search engine built for AI agents and developer tools. It goes beyond simple text grep by understanding code structure — resolving symbol definitions, tracking references across a codebase, and reranking results using semantic neural search. Developers integrate it into Claude, Cursor, or VS Code to give AI assistants precise, context-aware code retrieval instead of feeding entire files into context windows.
Prerequisites
- Node.js 16 or later with npx available
- An MCP client such as Claude Desktop, Cursor, or VS Code with MCP support
- A local codebase to index (Mantic scans from the working directory)
Try Mantic.sh via npx (no install needed)
Run a one-off search directly from the command line to verify Mantic works on your codebase.
npx mantic.sh@latest "stripe payment integration"Configure as an MCP server in Claude Desktop
Add the mantic block to your Claude Desktop configuration file. The 'server' argument tells the CLI to run in MCP server mode.
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": ["-y", "mantic.sh@latest", "server"]
}
}
}Configure environment variables (optional)
Customize Mantic behavior using environment variables in your MCP config or shell.
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": ["-y", "mantic.sh@latest", "server"],
"env": {
"MANTIC_MAX_FILES": "10000",
"MANTIC_TIMEOUT": "30000"
}
}
}
}Search for code using natural language
Ask Claude to search your codebase for a concept. Mantic uses search_files with optional semantic neural reranking to return the most relevant files and code blocks.
Navigate to symbol definitions and find references
Use get_definition to find where a class, function, or variable is defined, and find_references to see all places it is used across the codebase.
Use sessions for multi-step tasks
Start a named session with an intent description to maintain context across multiple searches. Mantic boosts results for files you have already viewed in the session.
npx mantic.sh@latest session start my-feature --intent "implement payment webhook"Mantic Examples
Client configuration
Claude Desktop config block for Mantic.sh MCP server mode.
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": ["-y", "mantic.sh@latest", "server"]
}
}
}Prompts to try
Example queries once Mantic is connected as an MCP server.
- "Search my codebase for how authentication middleware is implemented"
- "Find the definition of the UserService class"
- "Show all references to handleLogin across the project"
- "What files are most relevant to the payment processing flow?"
- "Search for test files that cover the order checkout logic"Troubleshooting Mantic
Search returns no results for a concept that clearly exists in the codebase
Check that MANTIC_MAX_FILES is high enough (default 5000). For large monorepos, set it to 20000 or more. Also verify the MCP server is running with the correct working directory pointing to your project root.
npx takes a long time to start on every request
Install mantic.sh globally to avoid the npx bootstrap overhead: 'npm install -g mantic.sh'. Then use 'mantic.sh' as the command instead of npx in your MCP config.
Semantic search gives worse results than expected
Semantic (neural) reranking is opt-in via the --semantic flag in CLI mode. In MCP mode, Claude invokes search_files and Mantic applies its default ranking. If results are poor, try more specific queries or use get_context to let Mantic proactively discover relevant files.
Frequently Asked Questions about Mantic
What is Mantic?
Mantic is a Model Context Protocol (MCP) server that structural code search engine for al agents. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Mantic?
Follow the installation instructions on the Mantic GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Mantic?
Mantic works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Mantic free to use?
Yes, Mantic is open source and available under the NOASSERTION license. You can use it freely in both personal and commercial projects.
Mantic Alternatives — Similar Developer Tools Servers
Looking for alternatives to Mantic? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Mantic in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Mantic?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.