Skip to main content
Glama
README.md
> ⚔ 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

B3.2/5.0

Scored across 9 tools

Disambiguation3/5

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.

Naming Consistency3/5

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.

Tool Count5/5

9 tools is a well-scoped set for a terminal/file manipulation server, covering core operations without being excessive or too sparse.

Completeness4/5

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.

Maintenance

ActivitySlowing
ResponsivenessNo issues