M

MCP工具构建器

@hanweg/mcp-tool-builder
0 Stars 365 次浏览 hanweg 更新于 2026-08-23

根据用户请求通过创建新工具来构建自身的MCP服务器(需要重启克劳德桌面以使用新创建的工具)。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "tool-builder": {
      "args": [
        "--directory",
        "PATH_TO\\mcp-tool-builder",
        "run",
        "tool-builder"
      ],
      "command": "uv"
    }
  }
}

可用工具 (4 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

create_tool 3 个参数 需填 3 项

Create a new Python tool with specified functionality

必填参数:tool_name、description、code

list_available_tools

List all currently available tools

该工具无需必填参数,直接调用即可

get_bitcoin_price

Gets current Bitcoin price in USD from CoinGecko API

该工具无需必填参数,直接调用即可

get_weather_forecast 1 个参数 需填 1 项

Retrieves weather forecast for a given ZIP code using NWS API

必填参数:zip_code

服务介绍

工作进行中 - 请谨慎使用 - Windows

MCP Tool Builder

一个MCP服务器,它通过Claude Desktop等MCP客户端使大型语言模型能够动态创建新工具。

特性

  • 通过自然语言描述来创建新工具
    • 使用新工具需要重启客户端(Claude Desktop)
  • 新工具作为Python脚本保存在...\mcp-tool-builder\tools
  • 新工具定义保存在...\mcp-tool-builder\tools\tools.json

安装时包含的示例工具

  • get_bitcoin_price: 从CoinGecko获取当前比特币价格
  • get_weather_forecast: 获取美国邮政编码的天气预报(使用geopy)

创建新工具

使用Claude Desktop中的create_tool命令(或强烈建议!)来动态创建新工具

安装

  1. 克隆此仓库
  2. 安装依赖项:
cd mcp-tool-builder
uv venv
.venv\Scripts\activate
uv pip install -e .

与Claude Desktop一起使用

添加到claude_desktop_config.json

{
    "mcpServers": {
        "tool-builder": {
            "command": "uv",
            "args": [
                "--directory", 
                "PATH_TO\\mcp-tool-builder",
                "run",
                "tool-builder"
            ]
        }
    }
}

Screenshot 2024-12-24 105318

image

相关 MCP 服务