Labsco
MCP SERVER

Moatless MCP Server

by TwT23333

Code search and editing for an assistant — grep and file tools plus semantic search over a vector index.

Code Intelligence & Repository Indexing
Summary
Grep for when you know the name; semantic search for when you do not.

Most code servers give you text search and stop there, which fails exactly when you are new to a codebase and cannot name the thing you want. Building the vector index is opt-in rather than automatic, so you pay that cost only on the repositories where it earns its keep — and the path and extension whitelist means pointing it at a working directory does not also hand over your `.git` or your virtualenv.

What it is

A code analysis and editing server built on the Moatless tooling. Alongside ordinary file reads, writes and grep, it can build a vector index of the codebase and answer questions about it by meaning rather than by string match. The README is in Chinese, with English reference pages under `docs/`.

What you get
  • `read_file` with `start_line` and `end_line`, plus `write_file` and `string_replace` for edits
  • `list_files` and `find_files` for navigation, `grep` for text search, `workspace_info` for project state
  • `semantic_search` takes a plain-language `query` — "user authentication and login validation" — and returns matching code
  • `find_class` and `find_function` locate definitions by name, narrowed with a `file_pattern`
  • `build_vector_index` builds the index only when you ask, so startup stays fast
  • Tree-sitter parsing behind the structural tools, and FAISS behind the similarity search
  • A whitelist security model: only known code, config and documentation extensions are readable, `../` traversal is blocked, and `node_modules`, `.venv`, `__pycache__` and `.git` are off limits
Requirements

Python 3.10+, run through the `Industrial_Software_MCP` entry point against a workspace directory. Semantic search needs embeddings — Jina AI's 1024-dimension model is the recommended path, and OpenAI embeddings are supported but deprecated — so that half of the feature set needs an embedding key while the file and grep tools do not. Limits are tunable: `MOATLESS_MAX_FILE_SIZE` defaults to a 10MB ceiling, `MOATLESS_MAX_SEARCH_RESULTS` and `MOATLESS_SEARCH_TIMEOUT` bound searches. MIT licensed, version 0.1.0.