MCP工具包
模型上下文协议(MCP)的综合工具包,具有自动工具发现和多种传输选项。
](https://pypi.org/project/mcptoolkit/) ](https://pypi.org/project/mcptoolkit/) 
______________________________________________________________________
🚀 建造于 有用AI | 📖 ****
🚀 快速安装-无需Git!
选择您的平台并运行一个命令:
🖥️ Windows(PowerShell)
irm https://raw.githubusercontent.com/getfounded/mcp-tool-kit/main/install.ps1 | iex🍎 macOS(终端)
bash
Manual Download
1. 下载最新版本:
- [Windows:MCP-Tool-Kit-Windows.zip](https://github.com/getfounded/mcp-tool-kit/releases/latest)
- [Mac/Linux:MCP-工具-Kit-Unix.tar.gz](https://github.com/getfounded/mcp-tool-kit/releases/latest)
1. 提取并运行:
- **视窗**:运行 `install.bat`
- **Mac/Linux**:运行 `./install.sh`
Git Installation (for developers)
1. **克隆存储库**
git clone https://github.com/getfounded/mcp-tool-kit.git cd mcp-tool-kit
1. **运行启动器**
- **视窗**:双击 `launch.bat`
- **Mac/Linux**:运行 `./launch.sh`
Docker-Only Installation
docker run -it --name mcp-toolkit ghcr.io/getfounded/mcp-tool-kit:latest
## 🔧 特性
### 动态工具注册
工具会在运行时自动发现和注册,无需手动配置!
### 多种运输方式
- **标准**:用于Claude Desktop集成
- **SSE(服务器发送事件)**:用于基于网络的访问
### 120+可用工具
- 📁 **文件系统**:读取、写入和管理文件
- 🕐 **时间工具**:时区转换和时间操作
- 🌐 **网页搜索**:Brave Search集成
- 🤖 **浏览器自动化**:基于剧作家的浏览器控件
- 📊 **数据分析**:雅虎财经、FRED、世界银行数据
- 📄 **文档工具**:PDF、Excel、PowerPoint操作
- 🎯 **还有更多!**
### 易于配置
通过一个简单的 `config.yaml` 文件:
enabled_tools: filesystem: true time_tools: true brave_search: true # ... more tools
tool_config: filesystem: allowed_directories: ["~/Documents", "~/Downloads"] brave_search: max_results: 10
## 📋 环境设置
1. 复制 `.env.template` 向 `.env`
1. 添加API密钥:BRAVE_SEARCH_API_KEY=your_key_here NEWS_API_KEY=your_key_here FRED_API_KEY=your_key_here # ... other keys
## 💾 存储设置
MCP工具包使用专用存储目录进行文件操作:
- **视窗**: `C:\Users\{Username}\mcp-tool-kit-storage`
- **Mac/Linux**: `~/mcp-tool-kit-storage`
### 自动设置
存储目录是在您第一次运行Docker容器时自动创建的。您还可以手动设置它:
**Windows(PowerShell)**:
.\scripts\setup-storage.ps1
**Mac/Linux**:
./scripts/setup-storage.sh
### 存储结构
mcp-tool-kit-storage/ ├── documents/ # For document files ├── downloads/ # For downloaded files └── workspace/ # For temporary work files
为了安全起见,通过文件系统工具进行的所有文件操作都将限于此目录。
## 🔌 连接到克劳德桌面
1. 使用启动器以stdio模式启动服务器
1. 添加到Claude桌面配置:{ "mcpServers": { "mcp-tool-kit": { "command": "docker", "args": ["exec", "-i", "mcp-server", "python", "mcp_server_v2.py"] } } }
## 🌐 使用SSE模式
1. 使用启动器以SSE模式启动服务器
1. 访问服务器 `http://localhost:8080`
1. 使用SSE端点:
- `/sse` -服务器发送的事件流
- `/messages` -向服务器发送消息
## 🛠️ 创建自定义工具
工具现在使用标准化的基类系统:
from app.tools.base_tool import BaseTool
class MyCustomTool(BaseTool): def get_name(self) -> str: return "My Custom Tool"
def get_tools(self) -> Dict[str, Callable]: return { "my_function": self.my_function }
async def my_function(self, param: str, ctx: Context = None) -> str: return f"Processed: {param}"
请参阅 [开发者文档](https://docs.mcp-tool-kit.com) 获取详细指南。
## 📚 文档
完整文档可在 [https://docs.mcp-tool-kit.com](https://docs.mcp-tool-kit.com).
要在本地运行文档,请执行以下操作:
1. `cd docs`
1. `npm install`
1. `npm start`
## 🐳 Docker命令
### 使用启动器(推荐)
启动器脚本自动处理所有Docker操作。
### 手动命令
Start server
docker-compose up -d
View logs
docker-compose logs -f
Stop server
docker-compose down
Rebuild after changes
docker-compose build --no-cache
## 🤝 贡献
1. 分叉存储库
1. 创建功能分支
1. 将您的工具添加到 `app/tools/`
1. 提交拉取请求
## 📄 许可证
此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。
## 🆘 支持
-
- [文档](https://docs.mcp-tool-kit.com)
- [不和谐社区](#) (即将推出)
