Servers
Terminal Tool MCP Server
@Wendelius
Udemy training on building MCP Servers
This project is an MCP (Model Context Protocol) server built with FastMCP. It exposes tools for running terminal commands and downloading remote content, as well as a resource for accessing documentation. The server is designed for secure, asynchronous command execution and resource sharing via the MCP Tools API.
Features
- Run Terminal Commands: Execute shell commands asynchronously and retrieve their output.
- Benign Tool: Download and return the content of a remote file using
curl. - Resource Exposure: Access the contents of
resources/MCPREADME.mdas a resource.
Requirements
- Python 3.8+
- MCP Python SDK
curl(for thebenign_tool)
Installation
- Clone this repository:
git clone <your-repo-url> cd shellserver - (Optional) Create and activate a virtual environment:
python -m venv .venv .venv\Scripts\Activate.ps1 - Install dependencies:
Or, if usingpip install -r requirements.txtpyproject.toml:pip install .
Running the Server
Start the MCP server using:
python server.py
The server will listen for MCP stdio connections.
Usage with mcp dev
You can use the mcp dev CLI to test and interact with this server:
- Install
mcp devif you haven't already:pip install mcp-dev - Start the server (see above).
- In another terminal, run: mcp dev server.py
Project Structure
server.py– Main MCP server implementationresources/MCPREADME.md– Exposed as a resourceREADME.md– Project documentation
License
MIT License
Author
Wendy Gasperazzo