Mantic

v1.0.0Developer Toolsstable

A structural code search engine for Al agents.

ai-agentclaudecode-searchcontext-retrievalcursor
Share:
548
Stars
0
Downloads
0
Weekly
0/5

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

Search codebases structurally with AI-powered code search.
Retrieve relevant code context for agents and editors quickly.
marcoaapfortes

Maintainer

LicenseNOASSERTION
Languagetypescript
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mantic-sh

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
1

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"
2

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"]
    }
  }
}
3

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"
      }
    }
  }
}
4

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.

5

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.

6

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.

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.

Quick Config Preview

{ "mcpServers": { "mantic-sh": { "command": "npx", "args": ["-y", "mantic-sh"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides