Overview
@modelcontextprotocol/server-terminal is a terminal server implementation for the Model Context Protocol (MCP) that provides secure and controlled access to terminal commands and npm operations.
To use the server-terminal, install it via npm and configure it in your MCP settings. You can then execute shell commands, manage npm operations, and control the working environment through TypeScript.
- Execute shell commands with full control - Built-in npm operations (install, run scripts) - Timeout handling for commands - Security through an allowed commands list - Management of environment variables - Control over the working directory - Support for TypeScript
- Securely executing shell commands in a controlled environment.
- Managing npm packages and scripts within a project.
- Automating development workflows with TypeScript support.
Add to your AI client
Use these steps to connect @modelcontextprotocol/server-terminal in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"richardtheuws-mcp-terminal-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-richardtheuws-mcp-terminal-server-mcp-mirror"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"richardtheuws-mcp-terminal-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-richardtheuws-mcp-terminal-server-mcp-mirror"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"richardtheuws-mcp-terminal-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-richardtheuws-mcp-terminal-server-mcp-mirror"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"richardtheuws-mcp-terminal-server-mcp-mirror": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-richardtheuws-mcp-terminal-server-mcp-mirror"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"richardtheuws-mcp-terminal-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-richardtheuws-mcp-terminal-server-mcp-mirror"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"richardtheuws-mcp-terminal-server-mcp-mirror": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-richardtheuws-mcp-terminal-server-mcp-mirror"
]
}
}
}FAQ
Can I execute any shell command?
No, only commands listed in the allowed commands configuration can be executed for security reasons.
How do I install the server-terminal?
You can install it using npm with the command: `npm install @modelcontextprotocol/server-terminal`.
Is there support for TypeScript?
Yes, the server-terminal supports TypeScript, allowing for type-safe command execution.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":712,"uuid":"73cf3cde-8219-4c9c-9fbe-3db466c032e9","name":"RichardTheuws_mcp-terminal-server","title":"@modelcontextprotocol/server-terminal","description":"Mirror of","avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","created_at":"2024-12-30T03:27:18.909Z","updated_at":"2025-02-23T07:16:02.535Z","status":"created","author_name":"MCP-Mirror","author_avatar_url":"https://avatars.githubusercontent.com/u/192820360?v=4","tags":"mcp-terminal,terminal-server,model-context-protocol","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/MCP-Mirror/RichardTheuws_mcp-terminal-server","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":null,"user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]