MCP Toolbox

by ai-zerolab

Integrations

  • Enables web search functionality using the DuckDuckGo API

  • Allows access to Figma files, components, styles, and various Figma API operations including getting file information, nodes, images, comments, team projects, and more

  • Repository hosting for the project with workflows and actions integration

mcp工具箱

一个全面的工具包,用于通过模型上下文协议 (MCP) 增强 LLM 功能。该软件包提供了一系列工具,允许 LLM 与外部服务和 API 交互,从而将其功能扩展到文本生成之外。

特征

*nix 是我们的主要目标,但 Windows 也应该可以。

  • 命令行执行:通过 LLM 执行任何命令行指令
  • Figma 集成:访问 Figma 文件、组件、样式等
  • 可扩展架构:轻松添加新的 API 集成
  • MCP 协议支持:兼容 Claude Desktop 和其他支持 MCP 的 LLM
  • 全面测试:经过充分测试的代码库,具有较高的测试覆盖率

安装

使用 uv(推荐)

我们建议使用uv来管理您的环境。

# Install uv curl -LsSf https://astral.sh/uv/install.sh | sh # For macOS/Linux # or powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" # For Windows

然后,您可以使用uvx "mcp-toolbox@latest" stdio作为命令来运行最新版本的 MCP 服务器。**音频和内存工具不包含在默认安装中。**您可以通过安装all extra 来包含它们:

[audio] 用于音频工具,[memory] 用于内存工具,[all] 用于所有工具

uvx "mcp-toolbox[all]@latest" stdio

通过 Smithery 安装

要通过Smithery自动安装 Claude Desktop 的 LLM 增强工具箱:

npx -y @smithery/cli install @ai-zerolab/mcp-toolbox --client claude

使用 pip

pip install "mcp-toolbox[all]"

您可以使用mcp-toolbox stdio作为运行 MCP 服务器的命令。

配置

环境变量

可以配置以下环境变量:

  • FIGMA_API_KEY :Figma 集成的 API 密钥
  • TAVILY_API_KEY :Tavily 集成的 API 密钥
  • DUCKDUCKGO_API_KEY :DuckDuckGo 集成的 API 密钥
  • BFL_API_KEY :Flux 图像生成 API 的 API 密钥

内存存储

记忆工具将数据存储在以下位置:

  • macOS~/Documents/zerolab/mcp-toolbox/memory (通过 iCloud 跨设备同步)
  • 其他平台~/.zerolab/mcp-toolbox/memory

完整配置

要将 mcp-toolbox 与 Claude Desktop/Cline/Cursor/... 一起使用,请将以下内容添加到您的配置文件中:

{ "mcpServers": { "zerolab-toolbox": { "command": "uvx", "args": ["--prerelease=allow", "mcp-toolbox@latest", "stdio"], "env": { "FIGMA_API_KEY": "your-figma-api-key", "TAVILY_API_KEY": "your-tavily-api-key", "DUCKDUCKGO_API_KEY": "your-duckduckgo-api-key", "BFL_API_KEY": "your-bfl-api-key" } } } }

完整功能:

{ "mcpServers": { "zerolab-toolbox": { "command": "uvx", "args": [ "--prerelease=allow", "--python=3.12", "mcp-toolbox[all]@latest", "stdio" ], "env": { "FIGMA_API_KEY": "your-figma-api-key", "TAVILY_API_KEY": "your-tavily-api-key", "DUCKDUCKGO_API_KEY": "your-duckduckgo-api-key", "BFL_API_KEY": "your-bfl-api-key" } } } }

您可以使用以下方式生成调试配置模板:

uv run generate_config_template.py

可用工具

命令行工具

工具描述
execute_command执行命令行指令

文件操作工具

工具描述
read_file_content从文件读取内容
write_file_content将内容写入文件
replace_in_file使用正则表达式替换文件中的内容
list_directory列出目录内容及其详细信息

Figma 工具

工具描述
figma_get_file通过键获取 Figma 文件
figma_get_file_nodes从 Figma 文件中获取特定节点
figma_get_image获取 Figma 文件中节点的图像
figma_get_image_fills获取 Figma 文件中使用的图像的 URL
figma_get_comments获取 Figma 文件的评论
figma_post_comment在 Figma 文件上发表评论
figma_delete_comment从 Figma 文件中删除评论
figma_get_team_projects为团队获取项目
figma_get_project_files获取项目文件
figma_get_team_components获取团队的组件
figma_get_file_components从文件中获取组件
figma_get_component通过 key 获取组件
figma_get_team_component_sets获取团队的组件集
figma_get_team_styles获取团队的风格
figma_get_file_styles从文件获取样式
figma_get_style按键获取样式

XiaoyuZhouFM工具

工具描述
xiaoyuzhoufm_download从 XiaoyuZhouFM 下载播客节目,可选择自动将 m4a 转换为 mp3

音频工具

工具描述
get_audio_length获取音频文件的长度(以秒为单位)
get_audio_text获取音频文件中特定时间范围内的转录文本

记忆工具

工具描述
think使用该工具思考某事并将想法附加到日志中
get_session_id获取当前会话 ID
remember将一段记忆(简短且详细)存储在记忆数据库中
recall使用语义搜索从数据库中查询记忆
forget清除记忆数据库中的所有记忆

Markitdown 工具

工具描述
convert_file_to_markdown使用 MarkItDown 将任何文件转换为 Markdown
convert_url_to_markdown使用 MarkItDown 将 URL 转换为 Markdown

Web 工具

工具描述
get_html从 URL 获取 HTML 内容
save_html将 HTML 从 URL 保存到文件
search_with_tavily使用 Tavily 搜索网页(需要 API 密钥)
search_with_duckduckgo使用 DuckDuckGo 搜索网页(需要 API 密钥)

Flux 图像生成工具

工具描述
flux_generate_image使用 Flux API 生成图像并将其保存到文件中

使用示例

运行 MCP 服务器

# Run with stdio transport (default) mcp-toolbox stdio # Run with SSE transport mcp-toolbox sse --host localhost --port 9871

与 Claude Desktop 一起使用

  1. 按照配置部分所示配置 Claude Desktop
  2. 启动 Claude Desktop
  3. 要求 Claude 与 Figma 文件进行交互:
    • “您能获取有关此 Figma 文件的信息:12345abcde吗?”
    • “向我展示此 Figma 文件中的组件:12345abcde”
    • “从此 Figma 文件中获取评论:12345abcde”
  4. 要求Claude执行命令行指令:
    • “当前目录中有哪些文件?”
    • “现在系统时间是多少?”
    • “显示特定文件的内容。”
  5. 要求 Claude 从 XiaoyuZhouFM 下载播客:
  6. 要求 Claude 处理音频文件:
    • “这个音频文件的长度是多少:audio.m4a?”
    • “将 audio.m4a 中 60 秒到 90 秒的音频转录下来”
    • “获取音频文件中 2:30 到 3:00 之间的文本”
  7. 要求 Claude 将文件或 URL 转换为 Markdown:
    • “将此文件转换为 Markdown:document.docx”
    • “将此网页转换为 Markdown 格式: https://example.com
  8. 要求 Claude 处理网络内容:
  9. 要求 Claude 使用 Flux 生成图像:
    • “生成一张美丽的山间日落图像”
    • “创建一幅未来城市的图像并将其保存到我的桌面”
    • “生成一只穿着宇航服的猫的肖像”
  10. 要求克劳德使用记忆工具:
  • “记住这个重要事实:法国的首都是巴黎”
  • “我当前的会话 ID 是什么?”
  • “回忆一下有关法国的任何信息”
  • “思考气候变化的影响”
  • “忘记所有存储的记忆”

发展

本地设置

分叉存储库并将其克隆到本地机器。

# Install in development mode make install # Activate a virtual environment source .venv/bin/activate # For macOS/Linux # or .venv\Scripts\activate # For Windows

运行测试

make test

运行检查

make check

建筑文档

make docs

添加新工具

要添加新的 API 集成:

  1. 使用任何所需的 API 密钥更新config.py
  2. mcp_toolbox/中创建一个新模块
  3. 实现您的 API 客户端和工具
  4. 为新功能添加测试
  5. 使用新的环境变量和工具更新 README.md

请参阅开发指南以获取更详细的说明。

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

  1. 分叉存储库
  2. 创建功能分支( git checkout -b feature/amazing-feature
  3. 提交您的更改( git commit -m 'Add some amazing feature'
  4. 推送到分支( git push origin feature/amazing-feature
  5. 打开拉取请求

执照

该项目是根据存储库中包含的许可条款进行授权的。

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

一个全面的工具包,通过模型上下文协议增强 LLM 功能,允许 LLM 与外部服务交互,包括命令行操作、文件管理、Figma 集成和音频处理。

  1. Features
    1. Installation
      1. Using uv (Recommended)
      2. Installing via Smithery
      3. Using pip
    2. Configuration
      1. Environment Variables
      2. Memory Storage
      3. Full Configuration
    3. Available Tools
      1. Command Line Tools
      2. File Operations Tools
      3. Figma Tools
      4. XiaoyuZhouFM Tools
      5. Audio Tools
      6. Memory Tools
      7. Markitdown Tools
      8. Web Tools
      9. Flux Image Generation Tools
    4. Usage Examples
      1. Running the MCP Server
      2. Using with Claude Desktop
    5. Development
      1. Local Setup
      2. Running Tests
      3. Running Checks
      4. Building Documentation
    6. Adding New Tools
      1. Contributing
        1. License

          Related MCP Servers

          • A
            security
            F
            license
            A
            quality
            Enables seamless interaction with Figma via the Model Context Protocol, allowing LLM applications to access, manipulate, and track Figma files, components, and variables.
            Last updated -
            2
            106
            TypeScript
            • Apple
          • -
            security
            F
            license
            -
            quality
            Enables LLMs to perform statistical analysis and generate ML predictions on user data from databases or CSV files through a Model Context Protocol server.
            Last updated -
            Python
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that wraps AutoIt functionality, enabling LLMs to automate Windows desktop tasks including mouse/keyboard operations, window management, and UI control interactions.
            Last updated -
            TypeScript
            MIT License
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server that enables LLMs to interact with databases (currently MongoDB) through natural language, supporting operations like querying, inserting, deleting documents, and running aggregation pipelines.
            Last updated -
            TypeScript
            MIT License
            • Apple

          View all related MCP servers

          ID: 19xn2uhi0e