MCP Command Server
A secure server for executing pre-approved system commands via an environment variable.
MCP Command Server
A secure Model Context Protocol (MCP) server for executing system commands through LLM applications like Claude.
Quick Start
- Install the package:
uv pip install mcp-command-server
- Configure allowed commands:
export ALLOWED_COMMANDS="ls,pwd,echo"
- Add to Claude Desktop configuration:
{
"mcpServers": {
"command-server": {
"command": "uv",
"args": ["run", "python", "-m", "mcp_command_server"],
"env": {
"ALLOWED_COMMANDS": "ls,pwd,echo"
}
}
}
}
Features
- 🔒 Secure command execution with whitelist
- ✅ User confirmation for all commands
- 📝 Comprehensive audit logging
- 🔍 Input validation and sanitization
- 🤖 Claude Desktop integration
Documentation
For complete documentation, see the docs/ directory:
Development
Setup
# Clone repository
git clone https://github.com/yourusername/mcp-command-server.git
cd mcp-command-server
# Create virtual environment
uv venv
source .venv/bin/activate # On Unix/macOS
.venv\Scripts\activate # On Windows
# Install development dependencies
uv pip install -e ".[dev]"
Testing
# Run all tests
pytest
# Run specific test file
pytest tests/unit/security/test_validator.py
# Run with coverage
pytest --cov=mcp_command_server
Contributing
- Fork the repository
- Create your feature branch
- Run tests and linting
- Submit a pull request
License
MIT License - see LICENSE for details.
Похожие серверы
Scout Monitoring MCP
спонсорPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
спонсорAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
MCP Sourcify Server
Verify and retrieve smart contract source code using the Sourcify API.
Local Code Indexing for Cursor
A Python-based server that locally indexes codebases using ChromaDB to provide semantic search for tools like Cursor.
Autodocument
Automatically generates documentation for code repositories by analyzing directory structures and code files using the OpenRouter API.
TMUX
Lets agents create sessions, split panes, run commands, and capture output with TMUX
Terminal MCP Server
Execute commands on local or remote hosts via SSH. Supports session persistence and environment variables.
Unreal-Blender MCP
A unified server to control Blender and Unreal Engine via AI agents.
Unity-MCP
A bridge between the Unity game engine and AI assistants using the Model Context Protocol (MCP).
UntitledUI MCP
An MCP server for UntitledUI components
Unity3d Game Engine
MCP Server to control and interact with Unity3d Game Engine for game development
Swift MCP Server - JavaScript Version
Answers Swift and SwiftUI questions based on the '100 Days of SwiftUI' course using a local SQLite database.