Token导航 LogoToken导航TokenDH.com
MCP Custom Command Line logo
开发工具未说明官方级别未说明来源级核验

MCP Custom Command Line

MCP Server

一个强大的模型上下文协议(MCP)服务器,通过灵活的JSON配置使AI助手能够执行命令行工具。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
命令行工具跨平台TypeScriptClaudeClaude

安装说明

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

作者 / 组织

nick-pape

提供方

nick-pape

最后核验

2026/5/17 20:20

快速接入

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

详细介绍

MCP CLI服务器🚀

一个强大的 模型上下文协议(MCP)服务器 它使AI助手能够通过灵活的配置驱动界面执行命令行工具。通过简单的JSON配置,将任何命令行实用程序转换为AI可访问的工具。

![License: MIT](https://opensource.org/licenses/MIT) ](https://nodejs.org/) ![TypeScript](https://www.typescriptlang.org/)

✨ 特性

  • 🔧 配置驱动:通过JSON配置文件定义命令
  • 🛡️ Type-Safe:使用TypeScript构建,并使用Zod和AJV进行全面验证
  • 📋 灵活的论点:默认情况下支持字符串、数字和布尔参数
  • 🔍 调试支持:具有调试和详细模式的全面日志记录
  • ⚡ 快速可靠:基于官方MCP SDK构建,具有强大的错误处理功能
  • 🌐 交叉平台的:适用于Windows、macOS和Linux

🚀 快速开始

安装

# Install globally via npm
npm install -g mcp-cli

基本用法

  1. 创建配置文件 (config.json):
{
  "version": "1.0",
  "commands": [
    {
      "name": "echo",
      "description": "Echo a message to the console",
      "command": "echo",
      "arguments": [
        {
          "name": "message",
          "description": "The message to echo",
          "type": "string",
          "required": true
        }
      ]
    },
    {
      "name": "list-files",
      "description": "List files in a directory",
      "command": "dir",
      "arguments": [
        {
          "name": "path",
          "description": "The directory path to list",
          "type": "string",
          "required": false,
          "defaultValue": "."
        }
      ]
    }
  ]
}
  1. 运行MCP服务器:
# Using config file
mcp-cli --config-file ./config.json

# Using inline JSON config
mcp-cli --config '{"version":"1.0","commands":[...]}'

# With environment variable (config file path)
set MCP_CLI_CONFIG_PATH=./config.json
mcp-cli

# With environment variable (raw JSON config)
set MCP_CLI_CONFIG_JSON={"version":"1.0","commands":[{"name":"echo","description":"Echo a message","command":"echo","arguments":[{"name":"message","description":"The message to echo","type":"string","required":true}]}]}
mcp-cli

# Streaming config via pipe (Windows)
type config.json | mcp-cli

# Streaming config via pipe (Unix/Linux/macOS)
cat config.json | mcp-cli
  1. 连接您的AI助手 连接到MCP服务器并开始执行命令!

📖 配置参考

配置文件结构

{
  "version": "1.0",
  "commands": [
    {
      "name": "command-name",
      "description": "Description of what this command does",
      "command": "actual-cli-command",
      "arguments": [
        {
          "name": "arg-name",
          "description": "Argument description",
          "type": "string|number|boolean",
          "required": true|false,
          "defaultValue": "optional-default"
        }
      ]
    }
  ]
}

命令参数

属性类型必填描述
namestring参数名称
descriptionstring人类可读的描述
type"string""number""boolean"参数数据类型
requiredboolean该论点是否具有强制性
defaultValuestringnumberboolean默认值(如果未提供)

🤝 贡献

有兴趣贡献吗?查看我们的 贡献指南 用于开发设置、构建说明和指南。

� 许可证

Git命令

{
  "version": "1.0",
  "commands": [
    {
      "name": "git-status",
      "description": "Check Git repository status",
      "command": "git status",
      "arguments": []
    },
    {
      "name": "git-commit",
      "description": "Commit changes with a message",
      "command": "git commit",
      "arguments": [
        {
          "name": "message",
          "description": "Commit message",
          "type": "string",
          "required": true
        },
        {
          "name": "all",
          "description": "Stage all changes",
          "type": "boolean",
          "required": false,
          "defaultValue": false
        }
      ]
    }
  ]
}

系统信息

{
  "version": "1.0",
  "commands": [
    {
      "name": "system-info",
      "description": "Display system information",
      "command": "systeminfo",
      "arguments": []
    },
    {
      "name": "disk-usage",
      "description": "Show disk usage",
      "command": "dir",
      "arguments": [
        {
          "name": "drive",
          "description": "Drive letter to check",
          "type": "string",
          "required": false,
          "defaultValue": "C:\\"
        }
      ]
    }
  ]
}

🤝 贡献

有兴趣贡献吗?查看我们的 贡献指南 用于开发设置、构建说明和指南。

📄 许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

🙏 致谢

📚 相关项目

______________________________________________________________________

由以下材料制成❤️ 对于AI社区

目录标签

目录标签

命令行工具跨平台TypeScriptClaude本地部署AI集成配置驱动

支持客户端

Claude

接入字段

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

未说明

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

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明none部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP