Get the FREE Ultimate OpenClaw Setup Guide →

Mantic.sh

A structural code search engine for Al agents.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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)

  1. Open your terminal
  2. Run:
npx -y mantic.sh@latest server
  1. 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

  1. Install globally:
npm install -g mantic.sh
  1. 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

Sponsor this space

Reach thousands of developers