MCP

SainadhAmul/MCP

3.2

If you are the rightful owner of MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

A simple Model Context Protocol (MCP) server implementation that provides shell execution, file operations, and system monitoring capabilities.

Tools
3
Resources
0
Prompts
0

Custom MCP Server

A simple Model Context Protocol (MCP) server implementation that provides shell execution, file operations, and system monitoring capabilities.

Features

  • Shell Command Execution: Execute system commands with timeout protection
  • File Operations: Read and write files in allowed directories
  • System Information: Get CPU, memory, and disk usage stats
  • Directory Listing: Browse directory contents
  • Docker Support: Containerized deployment

Quick Start

Local Development

  1. Clone and Setup
git clone <your-repo-url>
cd custom-mcp-server
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt
  1. Run the Server
python server.py

Docker Deployment

  1. Build and Run
# Build container
docker-compose build

# Start server
docker-compose up -d

# Check logs
docker-compose logs -f mcp-server
  1. Stop Server
docker-compose down

Integration

Claude Desktop

  1. Copy claude-config.json to ~/.claude/config.json
  2. Update the file path to your server location
  3. Restart Claude Desktop

Cursor IDE

  1. Copy cursor-config.json to your Cursor MCP settings
  2. Update the file path to your server location
  3. Restart Cursor

Available Tools

  • execute_shell_command(command, timeout) - Execute shell commands
  • read_file_content(file_path) - Read file contents
  • write_file_content(file_path, content, overwrite) - Write to files

Available Resources

  • system://info - Get system performance metrics
  • files://directory/{path} - List directory contents

Security

The server restricts file operations to these directories:

  • ~/Documents
  • ~/Desktop
  • /tmp

Commands have a 30-second timeout by default.

Example Usage

Once connected to Claude Desktop or Cursor, you can ask:

  • "What's my current CPU and memory usage?"
  • "List the files in my Documents folder"
  • "Run 'ps aux | head -10' to show top processes"
  • "Read the content of ~/Documents/notes.txt"
  • "Create a file with today's system stats"

File Structure

custom-mcp-server/
├── server.py              # Main MCP server implementation
├── requirements.txt        # Python dependencies
├── Dockerfile             # Container configuration
├── docker-compose.yml     # Docker deployment
├── claude-config.json     # Claude Desktop configuration
├── cursor-config.json     # Cursor IDE configuration
└── README.md             # This file