terminal
MCP server for executing terminal commands through Claude Desktop
Documentation
Terminal MCP Server
A Model Context Protocol (MCP) server that enables execution of terminal commands through Claude Desktop.
Features
- Execute any terminal command with arguments and options
- Navigate between directories while maintaining state
- Get terminal environment information
- Full output capture (stdout, stderr, exit codes)
- Proper error handling and formatting
Prerequisites
- Node.js v18 or higher
- TypeScript
- Claude Desktop
Installation
1. Clone the repository:
git clone https://github.com/stat-guy/terminal.git
cd terminal2. Install dependencies:
npm install3. Build the project:
npm run buildLocal Development Setup
1. Create or edit your Claude Desktop configuration file:
Add the following configuration:
{
"mcpServers": {
"terminal": {
"command": "node",
"args": [
"[PATH_TO_REPO]/dist/index.js"
],
"env": {
"PERMISSION_REQUIRED": "true"
}
}
}
}Replace `[PATH_TO_REPO]` with the actual path to your cloned repository.
2. Restart Claude Desktop
Available Tools
execute_command
- Execute any terminal command
- Supports command arguments and options
- Captures full output and exit codes
change_directory
- Change the current working directory
- Maintains state between commands
- Supports relative and absolute paths
get_current_directory
- Get the current working directory path
get_terminal_info
- Get information about the terminal environment
- Shows shell, user, platform, and recent command history
Usage Examples
Ask Claude to execute terminal commands like:
Can you check what's in my current directory?
-> Executes: ls -la
Can you tell me the current directory?
-> Executes: pwd
Can you change to the Downloads folder?
-> Executes: cd ~/DownloadsSecurity Considerations
- The server requires explicit user permission through Claude Desktop for command execution
- Environment variables can be controlled through the configuration
- Command execution includes timeouts and error handling
Development
1. Watch for changes:
npm run watch2. Test changes:
- Make changes to source files in `src/`
- Rebuild using `npm run build`
- Restart Claude Desktop to load changes
Project Structure
/
├── src/
│ └── index.ts # Main server implementation
├── package.json # Project configuration and dependencies
├── tsconfig.json # TypeScript configuration
└── README.md # This fileContributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License
Frequently asked questions
What is terminal?
terminal is MCP server for executing terminal commands through Claude Desktop
How do I install terminal?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is terminal open source?
Yes — it is hosted on GitHub at https://github.com/stat-guy/terminal and has 8 stars.
Related MCP tools
The all-in-one Desktop & Docker AI application with built-in RAG, AI agents, No-code agent builder, MCP compatibility, and more.
An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others. Built for the Model Context Protocol to enhance AI capabiliti
Fay是一个帮助数字人(2.5d、3d、移动、pc、网页)或大语言模型(openai兼容、deepseek)连通业务系统的mcp框架。 JavaScript-based implementation. Trusted by 12000+ developers.
CTTF: MCP integration between Cursor and Figma, allowing Cursor Agentic AI to communicate with Figma for reading designs and modifying them programmatically.
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients. JavaScript-based implementation.
This is MCP server for Claude that gives it terminal control, file system search and diff file editing capabilities JavaScript-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP