MCP Server
A modular MCP server providing file operations, web search, URL scraping, and sandboxed command execution for LLM interactions.
README
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
| Tool | Description |
|---|---|
today |
Get today's date and time |
add |
Add two numbers together |
web_search |
Search the live web for information |
fetch_content |
Scrape a URL and extract content |
list_files |
List files and directories |
read_file |
Read files with line-based windowing |
write_file |
Write text to files |
append_to_file |
Append text to existing files |
replace_in_file |
Find and replace text in files |
insert_after_marker |
Insert text after a marker line |
run_command |
Execute 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
/etcrestriction)
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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.