MCP server for terminal command execution
## Terminal MCP Server: Command Line Interface Integration The **Terminal MCP Server** provides secure terminal access within Google Antigravity, enabling AI-assisted command execution, script running, and system administration with proper sandboxing and safety controls. ### Why Terminal MCP? - **Secure Execution**: Sandboxed command execution with configurable permissions and restrictions - **Multi-Shell Support**: Support for bash, zsh, PowerShell, and other shell environments - **Output Streaming**: Real-time streaming of command output for interactive workflows - **Environment Management**: Configure environment variables and working directories - **Command History**: Track command history for audit and replay capabilities ### Key Features #### 1. Command Execution ```python from anthropic import Anthropic client = Anthropic() response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Run npm install and show the output with any warnings or errors" }] ) ``` #### 2. Script Running ```python # Execute scripts response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Run the deployment script and monitor its progress" }] ) ``` #### 3. Environment Setup ```python # Configure environment response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Set up development environment variables and verify configuration" }] ) ``` #### 4. System Operations ```python # Manage system response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Check disk usage, running processes, and system resource utilization" }] ) ``` ### Configuration ```json { "mcpServers": { "terminal": { "command": "npx", "args": ["-y", "@anthropic/mcp-server-terminal"], "env": { "TERMINAL_SHELL": "/bin/bash", "TERMINAL_WORKING_DIR": "/home/user/project", "TERMINAL_ALLOWED_COMMANDS": "npm,yarn,git,docker" } } } } ``` ### Use Cases **Development Tasks**: Run build commands, tests, and development servers. **System Administration**: Execute system commands for administration and monitoring. **Deployment**: Run deployment scripts and manage infrastructure. **Automation**: Automate repetitive command-line tasks through AI assistance. The Terminal MCP Server brings safe command-line access to your AI-assisted workflow, enabling powerful system operations with appropriate controls.
{
"mcpServers": {
"terminal": {
"mcpServers": {
"terminal": {
"args": [
"-y",
"terminal-mcp-server"
],
"command": "npx"
}
}
}
}
}