list_filesLABSCO SUMMARY
A controlled opening, rather than a shell.
Handing an assistant a general shell is one decision; handing it five named commands, each restricted to a directory with a timeout and a rate limit, is a very different one. This is the second, which makes tools.json a permission list and not a convenience file.
What it is
A TypeScript MCP server that turns entries in a tools.json file into MCP tools — you declare the command, its parameters and its limits, without writing code.
What you get
- Tools defined in JSON: the command, its parameters, their types and patterns, required or optional
- Execution restricted to directories you name, so a tool cannot wander outside its scope
- Command allowlisting and parameter sanitization before anything runs
- Rate limiting per tool, and a configurable timeout on each
- Output size limits and structured results, rather than an unbounded dump
- A starting tools.json with working examples: list_files, grep_search, word_count, git_status and find_files
Requirements
npm install and npm run build, then start it with an environment variable pointing at your tools.json. No account or key — commands run as you, inside the directories you allow.
Setup effort
Build from source — git clone https://github.com/realmindsai/generic_mcp.git
USE CASES
Letting an assistant look around a project safely
Give it directory listing and file finding, scoped to the paths you allow.
Searching for a pattern across a codebase
Expose grep as a parameterised tool with a timeout instead of a shell call.
Checking what is uncommitted
Run git status through the allowlist rather than granting git wholesale.
Sizing a file before opening it
Count lines, words or characters first when the file might be enormous.
Adding a command your team uses constantly
Add an entry to tools.json with its parameters and limits — no code, no rebuild of the tool logic.
5 tools
Listed in project docs. Your client may show a different list.
grep_searchword_countgit_statusfind_filesBEFORE YOU INSTALL
What to know first
Tools you get
5 tools named in the project's documentation. The five are examples in tools.json; the real tool set is whatever commands you define there.
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
git clone https://github.com/realmindsai/generic_mcp.git
cd generic_mcp
npm install
npm run buildEdit the tools.json file to define your command-line tools.
MCP Clients
Claude Desktop
{
"mcpServers": {
"command-executor": {
"command": "node",
"args": [
"/Users/dewoller/code/generic_mcp/dist/index.js"
],
"env": {
"CONFIG_PATH": "/Users/dewoller/code/generic_mcp/tools.json"
}
}
}
}The path /Users/dewoller in the block above is on the machine of whoever wrote it, not on yours.