Token导航 LogoToken导航TokenDH.com
Tool Bridge MCP logo
AI代理stdio官方级别未说明来源级核验

Tool Bridge MCP

MCP Server

ToolBridge-MCP是一个通用MCP服务器,可将任何语言的工具暴露给任何AI调用,支持PowerShell、Python、Bash、Node.js等多种语言,通过JSON清单文件实现无代码集成。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
多语言支持PythonClaude自动化ClaudeCursorVS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

larro1991

提供方

larro1991

最后核验

2026/5/17 20:20

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python generate_manifest.py --powershell AD-SecurityAudit M365-SecurityBaseline EntraID-SecurityAudit

详细介绍

ToolBridge MCP

一个通用的MCP服务器,从 任何语言任何AI.用PowerShell、Python、Bash、Node.js或任何CLI编写工具——ToolBridge使它们可以通过模型上下文协议调用。

想法

这座桥是故意装聋作哑的。它读取描述工具(名称、参数、如何调用它们)的JSON清单,并通过MCP提供服务。它不知道也不关心这些工具是用什么语言编写的。

任何一方都可以改变。这座桥具有普遍性。

  • 想要公开PowerShell模块吗?生成清单。
  • 想要包装Bash脚本吗?写一个10行的清单。
  • 想从Claude切换到另一个AI吗?工具不会改变。
  • 想添加新工具吗?将JSON文件放入manifests文件夹中。没有代码更改。

建筑

┌──────────────┐     ┌──────────────────┐     ┌────────────────────┐
│   AI Client  │────▶│    ToolBridge     │────▶│   Your Tools       │
│              │ MCP │   (the bridge)    │     │                    │
│  Claude Code │◀────│                   │◀────│  PowerShell modules│
│  Cursor      │     │  Reads manifests  │     │  Python scripts    │
│  VS Code     │     │  Routes execution │     │  Bash commands     │
│  Custom app  │     │  Returns results  │     │  Node.js           │
└──────────────┘     └──────────────────┘     │  Any CLI tool      │
                                               └────────────────────┘

清单是合同:

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│   Adapter    │────▶│   Manifest   │◀────│   Bridge     │
│              │     │   (JSON)     │     │              │
│  Auto-scans  │     │              │     │  Reads these │
│  PS modules  │     │  - name      │     │  Serves via  │
│  Py packages │     │  - params    │     │  MCP         │
│  Or: by hand │     │  - runtime   │     │              │
└──────────────┘     │  - command   │     └──────────────┘
                     └──────────────┘

快速开始

1.从PowerShell模块生成清单

python generate_manifest.py --powershell AD-SecurityAudit M365-SecurityBaseline EntraID-SecurityAudit

此自动发现每个导出的函数,读取参数类型、ValidateSet值、ValidateRange边界、强制标志和帮助文本,然后为每个模块保存一个JSON清单。

2.启动MCP服务器

python run_server.py

3.从克劳德代码连接

添加到您的Claude Code MCP配置中(~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "toolbridge": {
      "command": "python",
      "args": ["C:/Users/larro/Projects/ToolBridge-MCP/run_server.py"]
    }
  }
}

现在,Claude可以直接调用您的PowerShell工具。

手写清单

对于任何CLI工具,编写一个清单——不需要适配器:

{
  "version": "1.0",
  "description": "Network diagnostic tools",
  "tools": [
    {
      "name": "ping-host",
      "description": "Ping a host and return results",
      "runtime": "cli",
      "command": "ping -c 4 {host}",
      "parameters": {
        "host": {
          "type": "string",
          "description": "Hostname or IP to ping",
          "required": true
        }
      }
    },
    {
      "name": "check-ssl",
      "description": "Check SSL certificate expiration",
      "runtime": "bash",
      "command": "echo | openssl s_client -connect {host}:443 2>/dev/null | openssl x509 -noout -dates",
      "parameters": {
        "host": {
          "type": "string",
          "description": "Hostname to check",
          "required": true
        }
      }
    }
  ]
}

另存为 manifests/network-tools.json 并重新启动服务器。完成。

清单格式

{
  "version": "1.0",
  "description": "What this manifest contains",
  "defaults": {
    "runtime": "powershell",
    "module": "My-Module",
    "timeout": 120
  },
  "tools": [
    {
      "name": "Get-Something",
      "description": "Human-readable description shown to AI",
      "runtime": "powershell|python|bash|node|cli",
      "module": "Module-Name",
      "function": "Function-Name",
      "command": "cli command with {param} placeholders",
      "script": "path/to/script.py",
      "timeout": 120,
      "output_format": "text|json",
      "parameters": {
        "ParamName": {
          "type": "string|integer|number|boolean|array",
          "description": "Shown to AI for context",
          "required": true,
          "default": "default-value",
          "enum": ["Option1", "Option2"],
          "minimum": 1,
          "maximum": 100
        }
      }
    }
  ]
}

支持的运行库

运行时通过调用最适合
powershellmodule + functionPowerShell模块和cmdlet
pythonmodule + functionscriptPython包和脚本
bashcommandscriptShell命令、Linux工具
nodescriptcommandNode.js脚本
clicommand任何命令行工具

自动发现适配器

适配器扫描现有工具源并自动生成清单:

# PowerShell: reads Get-Command, parameter metadata, Get-Help
python generate_manifest.py --powershell Module-Name

# From a specific path (module not installed globally)
python generate_manifest.py --powershell Module-Name --path "/path/to/module"

设计原则

  1. 这座桥具有普遍性。 它知道MCP协议和清单格式。它永远不知道PowerShell、Python或任何特定的工具。
  1. 货单就是合同。 工具表明了它们的作用。桥为它们服务。双方都不需要了解对方。
  1. 零运行时依赖关系。 该桥仅使用Python标准库。没有pip安装,没有版本冲突,没有供应链风险。
  1. 自动发现是可选的。 适配器生成清单是为了方便。您始终可以用任何语言为任何工具手工编写清单。
  1. 设计安全。 网桥仅执行本地清单文件中定义的工具。参数值是shell转义的。暂停是强制执行的。

项目结构

ToolBridge-MCP/
├── toolbridge/
│   ├── __init__.py             # Package version
│   ├── server.py               # MCP server (the bridge)
│   ├── manifest.py             # Manifest models and loader
│   ├── executor.py             # Runtime execution engine
│   └── adapters/
│       ├── __init__.py
│       └── powershell.py       # PS module → manifest generator
├── manifests/                  # Drop manifest JSONs here
├── generate_manifest.py        # CLI: auto-generate manifests
├── run_server.py               # CLI: start the server
├── tests/
│   └── test_toolbridge.py      # pytest suite
├── pyproject.toml
├── requirements.txt            # Zero dependencies
├── LICENSE
└── README.md

需求

  • Python 3.10+ (仅限标准库,不依赖pip)
  • PowerShell 5.1+或7+ (仅当使用PowerShell工具时)
  • 您的工具需要的任何其他运行时

反馈与贡献

该工具旨在解决真正的管理员痛点。如果你有改进的想法,发现一个bug,或者想建议一个功能:

  • 打开一个问题 关于此回购-- 问题
  • 欢迎功能请求、错误报告和一般反馈
  • 如果您想直接做出贡献,我们将不胜感激

如果你觉得这很有用,请查看我的其他工具

许可证

MIT许可证-请参阅 许可证 了解详情。

目录标签

目录标签

多语言支持PythonClaude自动化工具桥接本地部署AI集成自动化工具MCP协议

支持客户端

ClaudeCursorVS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP