Mantic.sh
A structural code search engine for Al agents.
claude mcp add --transport stdio marcoaapfortes-mantic.sh npx -y mantic.sh@latest server
How to use
Mantic.sh is a context-aware code search engine designed to help AI agents and developers quickly locate relevant code across large repositories. It prioritizes semantic relevance and structural understanding (via Tree-sitter) over raw text matching, delivering precise results and cross-repo references such as go-to-definition and reference finding. Once running, you can interact with it using the MCP tools exposed by the package, including semantic searches, code navigation, and local memory of previously solved queries. For example, you can perform a semantic search with phrases like verify user, or use Go to Definition and Find References to explore an entire monorepo across languages. In team settings, Mantic.sh remembers solved patterns locally (stored at .mantic/search-patterns.json) and can share those patterns if you commit the file to your repository.
How to install
Prerequisites:
- Node.js (LTS version recommended)
- npm (comes with Node.js) or yarn
Option A: Install and run with npx (no global install)
- Open your terminal
- Run:
npx -y mantic.sh@latest server
- Follow any on-screen prompts to start the MCP server. The server will be accessible to your MCP-enabled tooling.
Option B: Install globally and run a local server
- Install globally:
npm install -g mantic.sh
- Start the server (the exact command may depend on your setup; if a CLI entry is provided, use it, otherwise use npx as in Option A):
mantic.sh server
Option C: Use via Yarn PnP or other package managers as appropriate to your environment. Ensure the command resolves to the MCP server entry point.
Prerequisites recap:
- Node.js installed
- Access to npm or yarn
- Optional: familiarity with npx or global npm packages
Additional notes
Notes and tips:
- The MCP config above uses npx with the latest mantic.sh package and invokes the server command. If you prefer a fixed version, replace latest with a specific version like v1.0.25.
- The server runs locally and keeps its memory of prior queries in .mantic/search-patterns.json. Commit this file to your repo if you want to share patterns across teammates.
- For security, Mantic.sh includes input sanitization and safe fallback behavior for non-Git directories. If you run into performance issues on very large repos, try indexing smaller subsets first to validate results.
- Environment variables are optional and depend on your deployment. The default setup typically requires no additional env vars, but you may want to configure logging level, storage paths, or network access controls in a production context.
Related MCP Servers
mcp
Browser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
mcp-local-rag
Local-first RAG server for developers using MCP. Semantic + keyword search for code and technical docs. Fully private, zero setup.
code-memory
MCP server with local vector search for your codebase. Smart indexing, semantic search, Git history — all offline.
mongo
MCP server that provide tools to LLMs such as claude in cursor to interact with MongoDB
shodan
Shodan MCP server for Claude, Cursor & VS Code. 20 tools for passive reconnaissance, CVE/CPE intelligence, DNS analysis, and device search. 4 tools work free without an API key. OSINT and vulnerability research from your IDE.
zip
An MCP tool that provides AI with the ability to compress and decompress local files.