Smart Terminal MCP
> ā” Published on PyPI and compatible with MCP clients that support the stdio transport.
# Smart Terminal MCP
A lightweight **Model Context Protocol (MCP)** server built with **FastMCP** that enables AI assistants to interact with the local machine through terminal, filesystem, and Python execution tools.
The project was built to explore how MCP enables AI clients to securely communicate with external tools and automate local development workflows.
---
## ⨠Features
- Execute terminal commands
- Execute Python code snippets
- Execute Python files
- Read files
- Write files
- Search files using glob patterns
- Search text inside files
- Create folders
- Delete folders
- Lightweight and easy to extend
- Published on PyPI
---
## š ļø Tech Stack
- Python 3.13+
- FastMCP
- MCP
- setuptools
---
## š¦ Installation
### Using uv (Recommended)
```bash
uv add smart_terminal_mcp
```
Or run it directly without installing:
```bash
uvx smart_terminal_mcp
```
### Using pip
```bash
pip install smart_terminal_mcp
```
---
## š MCP Server Configuration
Add the following configuration to your MCP client:
```json
{
"smart_terminal": {
"transport": "stdio",
"command": "uvx",
"args": ["smart_terminal_mcp"]
}
}
```
Once configured, the server can be used by MCP-compatible AI clients.
---
## š Available Tools
| Tool | Description |
|------|-------------|
| bash | Execute terminal commands |
| python_code | Execute Python code |
| python_file | Execute a Python file |
| read_file | Read the contents of a file |
| write_file | Create or overwrite a file |
| glob | Search files using glob patterns |
| grep | Search text inside files |
| create_folder | Create directories |
| delete_folder | Delete directories |
---
## š Project Structure
```
smart_terminal_mcp/
ā
āāā src/
ā āāā smart_terminal_mcp/
ā āāā main.py
ā āāā tools.py
ā
āāā pyproject.toml
āāā README.md
āāā LICENSE
```
---
## šÆ Motivation
The goal of this project was to gain hands-on experience with the **Model Context Protocol (MCP)** by building a practical server that exposes useful local development tools to AI assistants.
It helped me understand:
- MCP architecture
- Tool registration
- Python packaging
- PyPI publishing
- AI tool integration
- Developer workflow automation
---
## š® Roadmap
Future improvements include:
- Workspace sandboxing
- Safe command execution
- File rename and copy operations
- Git integration
- Project scaffolding
- Better error handling
- Cross-platform support
- Tool execution logging
---
## ā ļø Disclaimer
This project is intended for educational and development purposes.
Some tools execute commands or modify files on the local machine. Only use this MCP server in trusted environments.
---
## š License
MIT License
---
## šØāš» Author
**Mohd Bilal**
If you found this project interesting, feel free to star the repository.TDQS
Scored across 9 tools
Most tools have distinct purposes, but 'bash' overlaps with many others (can create files/folders, run python), and 'python_code' vs 'python_file' are similar. Descriptions help, but boundaries are somewhat blurry.
All names use lowercase with underscores, but the pattern is mixed: 'read_file' and 'create_folder' follow verb_noun, while 'bash', 'python_code', 'glob', and 'grep' do not. Consistent style, but not a uniform convention.
9 tools is a well-scoped set for a terminal/file manipulation server, covering core operations without being excessive or too sparse.
The domain is file and terminal operations, and the set covers read/write, directory create/delete, glob, grep, and execution via bash/python. Missing a direct delete_file or list_directory, but bash can handle those, so gaps are minor and workable.