Mantic.sh
A structural code search MCP server for agents: finds the right file by query intent and runs locally
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Reads and indexes your code locally during search
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/mantic-shDetects the agents on your machine, checks the risk and pins the version.
Other ways to install
Run in a terminal
claude mcp add --transport stdio mantic -- npx -y mantic.sh@latest serverOr add to the file .mcp.json, in the project
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": [
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Add to the file ~/.cursor/mcp.json, for all projects
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": [
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the mcpServers key. For a single project, put the same block into .cursor/mcp.json.
The button opens the agent and offers to add the server. If nothing happens, copy the config below.
Run in a terminal
code --add-mcp '{"name":"mantic","type":"stdio","command":"npx","args":["-y","mantic.sh@latest","server"]}'Or add to the file .vscode/mcp.json, in the project
{
"servers": {
"mantic": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the servers key.
Run in a terminal
codex mcp add mantic -- npx -y mantic.sh@latest serverOr add to the file ~/.codex/config.toml, for all projects
[mcp_servers.mantic]
command = "npx"
args = ["-y", "mantic.sh@latest", "server"]If the file already exists, append the block to the end.
Add to the file ~/.gemini/settings.json, for all projects
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": [
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
Add to the file ~/.config/devin/mcp_config.json, for all projects
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": [
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the mcpServers key. Legacy Cascade keeps the MCP config in ~/.codeium/windsurf/mcp_config.json.
Formerly Windsurf.
Add to the file cline_mcp_settings.json, for all projects
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": [
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the mcpServers key. Open the settings file in Cline: MCP Servers tab, Configure MCP Servers.
Add to the file .roo/mcp.json, in the project
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": [
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
A fork of Roo Code, same .roo folders.
Add to the file opencode.json, in the project
{
"mcp": {
"mantic": {
"type": "local",
"command": [
"npx",
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the mcp key.
Add to the file ~/.config/zed/settings.json, for all projects
{
"context_servers": {
"mantic": {
"command": "npx",
"args": [
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the context_servers key.
Add to the file .codeassistant/mcp.json, in the project
{
"mcpServers": {
"mantic": {
"command": "npx",
"args": [
"-y",
"mantic.sh@latest",
"server"
]
}
}
}If the file already exists, add the server inside the mcpServers key.
Add an MCP server named mantic to the config with command npx and args -y, mantic.sh@latest, server. No keys are needed and everything runs locally.
Other ways from the author
npx -y mantic.sh@latest serverRuns the MCP server over stdio. For the CLI use npx mantic.sh with a query.
This is third-party code. Review the repository files before installing.
What it does
Mantic is a code search engine that bets on result relevance rather than raw speed. It infers intent from project structure and metadata, filtering out irrelevant files before reading content, which cuts tokens spent on noise. It offers go-to-definition and finding all uses of a symbol across a monorepo while respecting gitignore. Optional semantic reranking on local embeddings finds conceptually close code without an exact keyword match. It works as a CLI and as an MCP server for agents, all locally and with no data egress.
Who it is for. For developers who need accurate search over a large codebase straight from an agent with no cloud upload.
Good fit when
- You need to find a file by the query's intent rather than exact words
- You need go-to-definition or all uses of a symbol across a monorepo
- You want to cut tokens on irrelevant files during search
Not a fit when
- You need top raw speed on a very large repo rather than ranking
- A plain grep on exact string match is enough
Example request
Find where payment handling is implemented in the project and show the exact fileLimitations
On very large repos it is slower than grep and ripgrep on raw speed, since the bet is on result quality. Semantic reranking is enabled by a flag and pulls in local embeddings. The stated benchmarks and savings figures were measured by the author and are worth verifying on your own code.
How to disable. Remove the mantic block from your MCP client config. Uninstall the globally installed package via your package manager.
MCP
- Transport
- stdio
- Authentication
- not required
Security check
- Reads and indexes your code locally during search
README in short
The README describes Mantic as a structural code search engine for agents that puts relevance above raw speed. It infers intent from structure and metadata, drops irrelevant files before reading and thus saves tokens, and it also does go-to-definition and reference search across a monorepo. There is optional semantic reranking on local embeddings and code parsing via Tree-sitter. Everything runs locally with no data egress, installs as a CLI or connects as an MCP server over stdio via npx. MIT licensed.
FAQ
Does data go to the cloud?
No, search runs fully locally with no data egress, including the optional local embeddings.
Is it only an MCP server?
No, there is a CLI and an MCP server, plus an editor extension; the server mode is started with the server argument.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything