https://github.com/MCP-Mirror/RichardTheuws_mcp-terminal-server
Mirror of https://github.com/RichardTheuws/mcp-terminal-server
https://github.com/MCP-Mirror/RichardTheuws_mcp-terminal-server
Last synced: 6 days ago
JSON representation
Mirror of https://github.com/RichardTheuws/mcp-terminal-server
- Host: GitHub
- URL: https://github.com/MCP-Mirror/RichardTheuws_mcp-terminal-server
- Owner: MCP-Mirror
- Created: 2024-12-25T20:04:28.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-12-25T20:04:34.000Z (10 months ago)
- Last Synced: 2024-12-25T20:27:45.981Z (10 months ago)
- Language: TypeScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-mcp-servers - **RichardTheuws_mcp-terminal-server** - Mirror of https://github.com/RichardTheuws/mcp-terminal-server `typescript` `mcp` `server` `http` `npm install MCP-Mirror/RichardTheuws_mcp-terminal-server` (🌐 Web Development)
README
# @modelcontextprotocol/server-terminal
Terminal server implementation for Model Context Protocol (MCP). Provides secure and controlled access to terminal commands and npm operations.
## Features
- Execute shell commands with full control
- Built-in npm operations (install, run scripts)
- Timeout handling
- Security through allowed commands list
- Environment variables management
- Working directory control
- Typescript support
## Installation
```bash
npm install @modelcontextprotocol/server-terminal
```
## Configuration
Add to your MCP config:
```json
{
"terminal": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-terminal"],
"autoApproveScope": ["execute_command", "npm_install", "npm_run"],
"config": {
"allowedCommands": ["npm", "node", "git"],
"defaultTimeout": 30000,
"defaultCwd": "/your/project/path",
"environmentVariables": {
"NODE_ENV": "development"
}
}
}
}
```
## Usage
```typescript
// Execute command
const result = await terminal.executeCommand('ls', ['-la'], {
cwd: '/some/path'
});
// Install npm package
await terminal.install('typescript');
// Run npm script
await terminal.runScript('build');
// Direct npm commands
await terminal.dev(); // npm run dev
await terminal.build(); // npm run build
```