Shell Server
by schajii
README.md
# Shell Server
A simple MCP server that exposes a `terminal` tool, allowing AI agents to execute shell commands.
## Requirements
- Python 3.10+
- [uv](https://docs.astral.sh/uv/)
## Setup
```bash
uv venv
uv sync
```
## Running
```bash
uv run server.py
```
Or during development with the MCP inspector:
```bash
uv run mcp dev server.py
```
## Tool
### `terminal`
Executes a shell command and returns its output.
**Input**
| Parameter | Type | Description |
|-----------|--------|------------------------------|
| `command` | string | The shell command to execute |
**Output**
```json
{
"stdout": "...",
"stderr": "...",
"return_code": 0
}
```
## Connecting to Cursor
Add the following to `~/.cursor/mcp.json`:
```json
{
"mcpServers": {
"shellserver": {
"command": "uv",
"args": [
"--directory",
"/Users/sami/Documents/MCP/mcp-servers/shellserver",
"run",
"server.py"
]
}
}
}
```
Then restart Cursor. The `terminal` tool will be available to the Agent.
## Security
This server executes arbitrary shell commands. Only run it locally and never expose it over a network.
TDQS
A3.5/5.0
Scored across 1 tool
Disambiguation5/5
With only one tool, there is no possibility for confusion or overlap. The tool is clearly distinct.
Naming Consistency5/5
A single tool's name cannot be inconsistent. There is no pattern to evaluate, but no conflicting conventions exist.
Tool Count2/5
A single tool is too few for typical usage. The server would benefit from additional tools like file operations or environment variable management to be more useful.
Completeness2/5
The server only provides command execution. For a shell server, missing essential operations like reading files, managing directories, or handling processes limits its usefulness and may cause agent failures.
Maintenance
ActivityInactive
ResponsivenessNo issues