MCP Terminal Server
An MCP server that provides secure terminal access for Claude and other LLMs
Overview
MCP Terminal Server is a secure terminal execution server that implements the Model Context Protocol (MCP), providing controlled command execution capabilities with enhanced security features and resource limits.
To use MCP Terminal Server, clone the repository, set up a virtual environment, install dependencies, and configure it with allowed commands. You can then execute shell commands securely through the server.
- Command execution with output capture and error handling - Security controls to restrict allowed commands and prevent command injection - Resource controls including command timeouts and maximum output size limits - Support for the MCP protocol with capability advertisement and streaming output
- Securely executing shell commands in a controlled environment.
- Integrating with applications that require terminal command execution.
- Testing and validating command execution through the MCP Inspector tool.
Add to your AI client
Use these steps to connect MCP Terminal Server 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": {
"mcp-terminal-rinardnick": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-terminal-rinardnick"
]
}
}
}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": {
"mcp-terminal-rinardnick": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-terminal-rinardnick"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-terminal-rinardnick": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-terminal-rinardnick"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-terminal-rinardnick": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-terminal-rinardnick"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-terminal-rinardnick": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-terminal-rinardnick"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-terminal-rinardnick": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-terminal-rinardnick"
]
}
}
}FAQ
What commands can be executed?
Only the commands specified in the allowed commands list can be executed to ensure security.
How does MCP Terminal Server handle errors?
The server captures errors and provides detailed output for troubleshooting.
Is there a limit on command execution time?
Yes, command timeouts can be configured to prevent hanging processes.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":955,"uuid":"bc9f6f2e-62c0-4626-b761-98cdf10756f9","name":"mcp-terminal","title":"MCP Terminal Server","description":"An MCP server that provides secure terminal access for Claude and other LLMs","avatar_url":"https://avatars.githubusercontent.com/u/45054046?v=4","created_at":"2025-01-28T02:20:52.053+00:00","updated_at":"2025-02-23T07:19:23.289+00:00","status":"created","author_name":"RinardNick","author_avatar_url":"https://avatars.githubusercontent.com/u/45054046?v=4","tags":"mcp-terminal,secure-terminal,MCP","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/RinardNick/mcp-terminal","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"}]]}]