MCP Server Toolkit
README.md
<div align="center">
# ๐ MCP Server Toolkit
**The fastest way to connect AI agents to the real world.**
[](https://python.org)
[](LICENSE)
[](https://modelcontextprotocol.io)
[](https://github.com/fzs356113-oss/mcp-server-toolkit)
[](https://github.com/fzs356113-oss/mcp-server-toolkit/fork)
*A production-ready [Model Context Protocol](https://modelcontextprotocol.io) server toolkit that gives your AI agents superpowers.*
[Quick Start](#-quick-start) ยท [Features](#-features) ยท [Architecture](#-architecture) ยท [Documentation](#-documentation)
</div>
---
## ๐ฏ Why MCP Server Toolkit?
> Every AI agent needs tools. MCP Server Toolkit gives them **file system access**, **web fetching**, **database queries**, and **shell commands** โ all through a single, standardized protocol.
```mermaid
graph LR
A[๐ค AI Agent] -->|MCP Protocol| B[๐ MCP Server Toolkit]
B --> C[๐ File System]
B --> D[๐ Web Fetch]
B --> E[๐๏ธ Database]
B --> F[๐ป Shell]
```
## โจ Features
| Tool | Description | Status |
|------|-------------|--------|
| ๐ **File System** | Read, write, search, and manage files | โ
Production Ready |
| ๐ **Web Fetch** | Fetch web pages, APIs, and download files | โ
Production Ready |
| ๐๏ธ **Database** | Query PostgreSQL, MySQL, SQLite, MongoDB | โ
Production Ready |
| ๐ป **Shell** | Execute commands with sandboxing | โ
Production Ready |
| ๐ **Auth** | OAuth2 / API Key / JWT authentication | ๐ง Coming Soon |
| ๐ **Metrics** | Prometheus-compatible metrics endpoint | ๐ง Coming Soon |
## ๐ Quick Start
### Installation
```bash
pip install mcp-server-toolkit
```
### Run in 30 seconds
```python
from mcp_server import MCPServer, tools
# Create server with default tools
server = MCPServer(
name="my-agent-tools",
tools=[tools.FileSystem(), tools.WebFetch(), tools.Database(), tools.Shell()]
)
# Start serving
server.run(port=8080)
```
### Configuration (YAML)
```yaml
# config.yaml
server:
name: my-mcp-server
port: 8080
auth: none
tools:
filesystem:
root: /workspace
allowed_extensions: [.py, .js, .ts, .md]
web_fetch:
timeout: 30
user_agent: "MCP-Toolkit/1.0"
database:
url: postgresql://user:pass@localhost:5432/mydb
shell:
allowed_commands: [ls, cat, grep, python]
sandbox: true
```
```bash
mcp-server --config config.yaml
```
## ๐๏ธ Architecture
```
mcp-server-toolkit/
โโโ mcp_server/
โ โโโ __init__.py # Public API
โ โโโ server.py # Core MCP server
โ โโโ protocol.py # MCP protocol handler
โ โโโ tools/
โ โโโ filesystem.py # File operations
โ โโโ web_fetch.py # HTTP client
โ โโโ database.py # DB connectors
โ โโโ shell.py # Command executor
โโโ config.yaml.example # Example config
โโโ pyproject.toml
โโโ README.md
```
## ๐ Documentation
<details>
<summary><b>๐ File System Tool</b></summary>
```python
from mcp_server.tools import FileSystem
fs = FileSystem(root="/workspace")
# Read file
content = await fs.read("src/main.py")
# Write file
await fs.write("output.txt", "Hello, World!")
# Search files
results = await fs.search("**/*.py", pattern="import asyncio")
# List directory
files = await fs.listdir("src/", recursive=True)
```
</details>
<details>
<summary><b>๐ Web Fetch Tool</b></summary>
```python
from mcp_server.tools import WebFetch
web = WebFetch(timeout=30)
# Fetch page
page = await web.fetch("https://api.github.com/user")
# Download file
await web.download("https://example.com/data.csv", "local.csv")
# Parse HTML
text = await web.extract_text("https://news.ycombinator.com")
```
</details>
<details>
<summary><b>๐๏ธ Database Tool</b></summary>
```python
from mcp_server.tools import Database
db = Database(url="postgresql://localhost/mydb")
# Query
rows = await db.query("SELECT * FROM users WHERE active = true")
# Insert
await db.insert("users", {"name": "Alice", "role": "admin"})
# Transaction
async with db.transaction() as tx:
await tx.execute("UPDATE accounts SET balance = balance - 100 WHERE id = 1")
await tx.execute("UPDATE accounts SET balance = balance + 100 WHERE id = 2")
```
</details>
## ๐ค Contributing
We love contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
```bash
git clone https://github.com/fzs356113-oss/mcp-server-toolkit.git
cd mcp-server-toolkit
pip install -e ".[dev]"
pytest
```
## ๐ License
MIT License - see [LICENSE](LICENSE) for details.
---
<div align="center">
**โญ Star this repo if you find it useful! โญ**
Made with โค๏ธ by [fzs356113-oss](https://github.com/fzs356113-oss)
</div>
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues