generic_mcp
Configurable Command MCP Server
Documentation
Configurable Command MCP Server
A flexible Model Context Protocol (MCP) server that allows you to define and execute arbitrary command-line tools through configuration files. Perfect for giving Claude Desktop access to specific command-line utilities in a secure, controlled manner.
Features
- 🛠️ Configuration-driven: Define tools via JSON without modifying code
- 🔒 Secure execution: Parameter sanitization, directory restrictions, and command allowlisting
- ⚡ Rate limiting: Prevent abuse with configurable execution limits
- 📝 Parameter validation: Type checking, patterns, and required/optional parameters
- 🎯 Directory scoping: Restrict tool execution to specific directories
- ⏱️ Timeout control: Configurable execution timeouts per tool
- 📊 Output management: Size limits and structured result formatting
Setup Instructions
1. Create the project directory and install dependencies
cd /Users/dewoller/code/generic_mcp
npm install2. Build the TypeScript code
npm run build3. Configure your tools
Edit the `tools.json` file to define your command-line tools. The file is already configured with useful examples like:
- `list_files`: List directory contents
- `grep_search`: Search for patterns in files
- `word_count`: Count lines/words/characters
- `git_status`: Check git repository status
- `find_files`: Find files by pattern
- And more!
4. Configure Claude Desktop
Add the following to your Claude Desktop configuration file:
macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
{
"mcpServers": {
"command-executor": {
"command": "node",
"args": ["/Users/dewoller/code/generic_mcp/dist/index.js"],
"env": {
"CONFIG_PATH": "/Users/dewoller/code/generic_mcp/tools.json"
}
}
}
}5. Restart Claude Desktop
After saving the configuration, restart Claude Desktop to load the MCP server.
Testing the Installation
Run Integration Tests
npm run test:integrationThis will test several tools and show you their output.
Manual Testing in Development Mode
# Run in development mode (with TypeScript)
npm run dev
# Or run the built version
npm startUsage Examples
Once configured, you can ask Claude to use these tools:
- "List all JavaScript files in my code directory"
- "Search for TODO comments in the project"
- "Show me the git status"
- "Count lines in all Python files"
- "Find all markdown files"
Adding Custom Tools
To add a new tool, edit `tools.json`:
{
"name": "my_tool",
"description": "Description for Claude",
"command": "actual-command",
"args": ["-flag", "{parameter}"],
"parametersFrequently asked questions
What is generic_mcp?
generic_mcp is Configurable Command MCP Server
How do I install generic_mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is generic_mcp open source?
Yes — it is hosted on GitHub at https://github.com/realmindsai/generic_mcp and has 1 stars.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
Enhanced MCP server for interactive user feedback and command execution in AI-assisted development, featuring dual interface support (Web UI and Desktop Application) with intelligent environment detection and cross-platform compatibility.
A powerful Zotero AI and MCP plugin with ChatGPT, Gemini 3.7, Claude Fable 5, Claude Opus 5, DeepSeek V4, Grok, OpenRouter, Kimi k3, GLM 5.3, SiliconFlow, GPT-oss, Gemma 4, Qwen 3.8
Connect your browser to AI models. Just use Dia on Chrome, Arc or Firefox.
文颜 MCP Server 可以让 AI 自动将 Markdown 文章排版后发布至微信公众号。
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP