MCP Hub
Back to servers

MCP Server

A modular MCP server providing file operations, web search, URL scraping, and sandboxed command execution for LLM interactions.

glama
Stars
1
Updated
May 2, 2026
Validated
May 9, 2026

MCP Server

A modular Model Context Protocol (MCP) server built with FastAPI, providing tools for LLM interactions.

Features

  • Modular Architecture - Each tool is easily maintainable
  • File Operations - Read, write, append, replace, and insert text in files
  • Web Search - Search the live web using DDGS
  • URL Fetching - Scrape and summarize web content
  • Command Execution - Run shell commands in a sandboxed environment
  • Strict Isolation - Bubblewrap sandbox with disposable /tmp

Tools

ToolDescription
todayGet today's date and time
addAdd two numbers together
web_searchSearch the live web for information
fetch_contentScrape a URL and extract content
list_filesList files and directories
read_fileRead files with line-based windowing
write_fileWrite text to files
append_to_fileAppend text to existing files
replace_in_fileFind and replace text in files
insert_after_markerInsert text after a marker line
run_commandExecute shell commands in sandbox

Installation

# Clone the repository
git clone <repository-url>
cd mcp_server

# Install dependencies using uv
uv sync

Usage

# Start the server
python main.py

The server will start on http://0.0.0.0:8000.

Architecture

mcp_server/
├── main.py              # FastAPI application entry point
├── tools.json           # Tool definitions (JSON schema)
└── tools/               # Tool implementations
    ├── __init__.py      # Exports all handlers
    ├── add.py           # Math operations
    ├── today.py         # Date/time
    ├── web_search.py    # Web search
    ├── fetch_content.py # URL scraping
    ├── files.py         # All file operations
    └── run_command.py   # Shell command execution

Sandbox Configuration

The run_command tool uses bubblewrap for isolation:

  • Read-only root filesystem (--ro-bind / /)
  • Disposable temp directory (--tmpfs /tmp)
  • Writable resources directory (--bind resources resources)
  • DNS resolution enabled (no /etc restriction)

Disclaimer

This project was developed with assistance from Qwen 3.6, a large language model by Alibaba Group's Tongyi Lab. While AI assisted in code generation, documentation, and refactoring, all technical decisions and final implementations were reviewed and validated by the human developer.

License

MIT License

Reviews

No reviews yet

Sign in to write a review

MCP Server — MCP Server | MCP Hub