Spaces, maps, and MCP tools for AI coding agents, straight from your terminal.
Docs · npm · Get an API key · Issues
Mantis is a spatial data workspace. It embeds records (dataset rows, documents, code files, anything with text) into a 2D semantic map where proximity means similarity, then auto-groups them into labelled clusters so the shape of a dataset is visible at a glance.
This CLI puts the whole workspace in your terminal. Every Mantis MCP tool is reachable through mantis use <tool> (no editor plugin required), so AI coding agents (Claude Code, OpenCode, Codex, Cursor, and more) can inspect, search, and reshape spatial data directly.
| 🧰 Full MCP surface | Every Mantis tool via mantis use <tool>: inspect, search, compare, set algebra, bags, pages, export. JSON in, JSON out. No MCP plugin needed. |
| 🤖 Agent skill sync | One command installs editor skills for Claude Code, OpenCode, Codex, Cursor, Windsurf, Copilot, and Antigravity. |
| 🔗 URI substrate | Every entity has a stable mantis:// URI you pipe from one tool into the next: spaces, maps, clusters, bags, points, dimensions. |
| 📦 Build maps locally | Turn a CSV/XLSX into a Mantis map, or index an entire codebase into a searchable semantic map in one call. |
| ⚡ Fast cold start | Ships as a single bundled artifact, ~2.5× faster startup than an unbundled install. Bundled with Bun, runs on plain Node. |
| 🔍 Scriptable | Spaces, threads, and tools all emit JSON. Drop it straight into jq, pipelines, or agent loops. |
npm install -g mantisai-cli # Node ≥18, no Bun needed
mantis setup # API key + space + thread
mantis setup claude # optional: install Claude Code skills
mantis use get_space_context # confirm you're connectedConfig lives at ~/.mantis/config.json. Grab a developer key at mantis.csail.mit.edu/developer.
Naming: repo
KellisLab/mantis-cli· npm packagemantisai-cli· binarymantis.
Using with Claude Code
Run mantis setup claude once to install the Mantis skills, then drive your spaces and maps straight from a Claude Code session, no MCP plugin required.
See the Claude Code guide for the full workflow.
| Command | Description |
|---|---|
mantis setup [editor] |
API + space/thread, or sync skills for claude/opencode/codex/cursor/windsurf/copilot/antigravity |
mantis status |
Show current space, thread, and config |
mantis select [space|thread|both] |
Switch the active space and/or thread |
mantis spaces list|resolve|set |
Scriptable space ops (JSON) |
mantis threads list|new|set |
Scriptable thread ops (JSON) |
mantis tools |
List every MCP tool and its arguments |
mantis use <tool> |
Call any MCP tool (JSON output) |
mantis create map <file> |
Build a map from a local CSV/XLSX |
mantis create codebase [root] |
Index a repo into CSV; add --create-map to embed it |
Reach for these through mantis use <tool> (run mantis tools for full argument schemas):
| Tier | Tools |
|---|---|
| Orient | get_space_context, inspect |
| Reason | search, compare, intersect, diff, union, export |
| Act | create_bag, add_to_bag, remove_from_bag, rename_bag, delete_bag, filter_to_bag, set_plot_variables, legend_command, create_page |
# Orient: what's in this space?
mantis use get_space_context
# Reason: semantically search a map
mantis use search --args '{"query":"memory systems","kind":"point","scope":["mantis://map/<id>"]}'
# Act: save a cluster as a reusable bag
mantis use create_bag --from-uri "mantis://map/<id>/cluster/<cid>" --name "My Bag"- Node.js 18+ (the only runtime dependency; Bun is used to build, never to run)
- A Mantis API + Developer key → mantis.csail.mit.edu/developer
git clone https://github.com/KellisLab/mantis-cli.git
cd mantis-cli
bun install # or: npm install
bun run build # bundles bin/mantis.js -> dist/mantis.js
node dist/mantis.js --versionPublishing is automated: push a v* tag and the GitHub Actions workflow builds the bundle and publishes to npm.
Built at MIT CSAIL · MIT License


