MCP Catalogs
首页cli-use screenshot

cli-use

by JustVugg·16·综合分 42

一个将任何MCP服务器转换为CLI的工具,可减少60-80%的令牌消耗,无需运行时依赖。

developer-toolsproductivityfile-system
3
Forks
1
活跃 Issue
1 个月前
最近提交
2 天前
收录于

概述

Cli-use通过单个命令将任何MCP服务器转换为原生命令行界面,显著减少AI代理的令牌消耗。它通过将冗长的JSON-RPC调用转换为简洁的CLI命令,消除了模式发现、请求框架和响应解析的开销。该工具支持一次性执行和守护进程模式以提高性能,并提供调用缓存、批处理/管道模式、shell自动补全和OpenAPI导出等功能。使用纯Python标准库构建,兼容Linux、macOS和Windows。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:通过用高效的CLI替代MCP工具调用来减少AI工作流中的令牌消耗
:从MCP服务器为shell脚本和自动化管道创建可重用的CLI接口
:构建自动生成SKILL.md文档的代理友好型工具集
:Cli-use提供多少令牌减少?
:哪些MCP服务器已预配置?

什么时候选它

当您需要降低 MCP 工具调用的令牌成本,或希望将 MCP 服务器作为原生 Unix 风格 CLI 命令在 shell 脚本中使用时,选择 cli-use。

什么时候不要选它

如果您需要基本工具调用之外的完整 MCP 协议功能,或要求低于 10 毫秒的实时响应时间,则不要选择 cli-use。

此 server 暴露的工具

从 README 抽取出 12 个工具
  • addadd <alias> <path>

    Install and register an MCP server as a CLI alias

  • list

    List available MCP servers in the built-in registry

  • daemon

    Manage MCP server daemons for faster repeated calls

  • openapi

    Generate OpenAPI spec from cached MCP server tools

  • completions

    Generate shell completion scripts for MCP tools

  • batch

    Run JSON pipeline across multiple MCP server aliases

  • run

    Run a specific MCP tool directly from command line

  • mcp-list

    List tools available from an MCP server

  • convert

    Convert MCP server to standalone CLI script

  • fs

    Filesystem operations: read, write, list, and search files

  • gh

    GitHub operations: issues, PRs, and repos

  • sqlite

    Query and inspect SQLite databases

可对比工具

mcpshell-mcpmcp-server-filesystemmcp-server-git

安装

git clone https://github.com/cli-use/cli-use.git
cd cli-use
pip install -e .

对于Claude Desktop集成:

{
  "mcpServers": {
    "cli-use": {
      "command": "python",
      "args": ["-m", "cli_use.server"]
    }
  }
}

FAQ

Cli-use提供多少令牌减少?
测试显示在不同会话规模下可减少60-80%的令牌消耗,在模式发现方面节省80%,在每次调用I/O方面节省59%。
哪些MCP服务器已预配置?
Cli-use内置支持10个服务器:fs(文件系统)、memory(知识图谱)、gh(GitHub)、git、sqlite、time、fetch、puppeteer、brave(网络搜索)和slack。

cli-use 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。