mcp-server-toolkit
A production-ready MCP server providing 8 tools for file operations, shell command execution, web search and fetching, plus AI-powered code review and text summarization, with built-in security controls.
README
<p align="center"> <img src="https://capsule-render.vercel.app/api?type=waving&height=220&text=MCP+Server+Toolkit&fontAlign=50&fontAlignY=40&color=timeGradient&customColorList=6,8,12,14,20&fontColor=ffffff&fontSize=36&animation=fadeIn" width="100%" /> </p>
<p align="center"> <img src="https://readme-typing-svg.demolab.com?font=JetBrains+Mono&weight=600&size=22&pause=1000&color=9333EA¢er=true&vCenter=true&multiline=true&repeat=true&width=700&height=120&lines=Production+MCP+Server+for+Claude+Desktop;8+Powerful+Tools+%7C+File+%2B+Shell+%2B+Web+%2B+AI;Drop-In+Config+for+Any+MCP+Client" alt="Typing SVG" /> </p>
<p align="center"> <img src="https://img.shields.io/badge/Python-3.11+-9333ea?style=for-the-badge&logo=python&logoColor=white" /> <img src="https://img.shields.io/badge/MCP-Model+Context+Protocol-9333ea?style=for-the-badge&logo=anthropic&logoColor=white" /> <img src="https://img.shields.io/badge/Anthropic-Claude+Sonnet-9333ea?style=for-the-badge&logo=anthropic&logoColor=white" /> <img src="https://img.shields.io/badge/aiohttp-Async+Web-9333ea?style=for-the-badge&logo=aiohttp&logoColor=white" /> <img src="https://img.shields.io/badge/DuckDuckGo-Search-9333ea?style=for-the-badge&logo=duckduckgo&logoColor=white" /> <img src="https://img.shields.io/badge/License-MIT-9333ea?style=for-the-badge" /> </p>
Overview
MCP Server Toolkit is a production-ready Model Context Protocol server that exposes 8 powerful tools to Claude Desktop and any MCP-compatible client. With a single config entry, Claude gains the ability to read and write files, run shell commands, search the web, fetch URLs, and perform AI-powered code reviews and text summarisation — all with built-in security controls.
Features
| Tool | Description |
|---|---|
read_file |
Read file contents with size guard (10 MB limit) and encoding detection |
write_file |
Write / create files, restricted to CWD with auto parent-dir creation |
list_directory |
List directory with file types, sizes, and modified timestamps |
execute_shell |
Run shell commands against a strict allowlist with dangerous-pattern blocking |
web_search |
DuckDuckGo Instant Answer API — returns structured results with snippets and URLs |
fetch_url |
Fetch and parse any web page, strips nav/ads/scripts, returns clean text + links |
code_review |
Claude-powered code review with issues, severity ratings, security analysis, verdict |
summarise_text |
Claude-powered summarisation with key points, structured paragraphs, takeaway |
Security Model
- Path sanitisation: Blocks
..traversal, symlink abuse, and access to sensitive system files (~/.ssh,~/.aws/credentials,/etc/shadow, etc.) - Write isolation:
write_fileis restricted to the current working directory - Command allowlist:
execute_shellonly permits a curated set of safe commands (ls,grep,git,python,curl, etc.) - Pattern blocking: Chains like
; rm,| sh, fork bombs, and decode-and-exec patterns are rejected before execution - Output truncation: Shell stdout/stderr capped at 512 KB; web content at 256 KB
Architecture
mcp-server-toolkit/
│
├── server/
│ ├── main.py # MCP server — tool registration & dispatch
│ ├── security.py # Path sanitisation + command allowlist
│ └── tools/
│ ├── __init__.py # Re-exports all tool functions
│ ├── file_tools.py # read_file, write_file, list_directory
│ ├── shell_tools.py # execute_shell (with validation)
│ ├── web_tools.py # web_search (DuckDuckGo), fetch_url (aiohttp + BS4)
│ └── ai_tools.py # code_review, summarise_text (Claude API)
│
├── claude_desktop_config.json # Drop-in config for Claude Desktop
├── requirements.txt
└── README.md
Request flow:
Claude Desktop → stdio transport → server/main.py (MCP Server)
↓ dispatch
tools/file_tools.py ← local filesystem
tools/shell_tools.py ← subprocess (allowlisted)
tools/web_tools.py ← aiohttp / DuckDuckGo
tools/ai_tools.py ← Anthropic Claude API
Quick Start
1. Clone & Install
git clone https://github.com/isamkhan1809/mcp-server-toolkit
cd mcp-server-toolkit
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
2. Set Environment Variables
export ANTHROPIC_API_KEY="sk-ant-..." # required for code_review + summarise_text
3. Test the Server
python -m server.main
The server communicates over stdio and is ready for MCP client connections.
4. Connect to Claude Desktop
Copy the following into your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"mcp-server-toolkit": {
"command": "python",
"args": ["-m", "server.main"],
"cwd": "/absolute/path/to/mcp-server-toolkit",
"env": {
"ANTHROPIC_API_KEY": "sk-ant-your-key-here",
"PYTHONPATH": "/absolute/path/to/mcp-server-toolkit"
}
}
}
}
Restart Claude Desktop. You will see the toolkit listed under available tools.
Project Structure
server/main.py — MCP server, tool registration, call dispatcher
server/security.py — sanitise_path(), validate_command(), blocked prefixes & patterns
server/tools/
file_tools.py — read_file, write_file, list_directory
shell_tools.py — execute_shell (subprocess + security gate)
web_tools.py — web_search (DuckDuckGo API), fetch_url (aiohttp + BeautifulSoup)
ai_tools.py — code_review, summarise_text (Claude claude-sonnet-4-5)
claude_desktop_config.json — Ready-to-paste Claude Desktop config
requirements.txt
Usage Examples
Once connected to Claude Desktop, you can ask Claude:
"Read the file ./src/main.py and review it for bugs"
→ calls read_file, then code_review
"Search for 'MCP protocol specification' and summarise the top result"
→ calls web_search, then fetch_url, then summarise_text
"List my project directory and show me what's in the src folder"
→ calls list_directory
"Run git status in my project"
→ calls execute_shell("git status")
"Write a new file called notes.md with today's meeting notes"
→ calls write_file
Configuration
Environment Variables
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY |
For AI tools | API key for code_review and summarise_text |
Allowed Shell Commands
The following base commands are permitted by execute_shell:
ls find cat head tail wc file stat du df
grep awk sed sort uniq cut tr jq diff
git python python3 pip pip3 node npm
pytest ruff mypy black
echo pwd whoami date uname env
curl wget
To add a command, append it to ALLOWED_COMMANDS in server/security.py.
Extending with New Tools
- Add your function to the appropriate
server/tools/*.pyfile - Export it from
server/tools/__init__.py - Register a new
types.Toolentry inserver/main.py'slist_tools() - Add a dispatch branch in
call_tool()
<p align="center"> <img src="https://capsule-render.vercel.app/api?type=waving&height=120§ion=footer&color=timeGradient&customColorList=6,8,12,14,20&animation=fadeIn" width="100%" /> </p>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。