Token导航 LogoToken导航

MCP Server · 开发工具

mcptocli (Maxime Rivest)

将任何MCP服务器转换为命令行工具,方便终端用户使用。

未说明官方级别未说明来源级核验工具 2
命令行工具GoClaudeClaude Desktop

快速开始

公开资料没有提供安装命令,按仓库或官方文档接入。
作者 / 组织
MaximeRivest
提供方
MaximeRivest

工具数量

2

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

13

仓库热度

收录来源

1 个

MCP World

选型结论

mcptocli (Maxime Rivest) 属于开发工具类 MCP Server,公开资料标注 2 个工具,通过传输方式未标注接入,适配 Claude Desktop、Claude,没有现成的安装命令;接入前要先准备 OAuth 授权。

分类

开发工具

传输方式

未说明

认证方式

OAuth 授权

部署方式

公开资料未说明

安装与配置

公开目录没有给出安装命令,需要按仓库 README安装;下面按同类条目的通用流程说明。

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    先确认运行方式

    公开资料没有标注传输方式,先看仓库 README,确认是本地进程还是远程地址。

  2. 2

    获取服务

    公开目录没有给出安装命令,按仓库 README里的步骤安装或获取服务。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 2 个工具,随便调一个只读工具确认能返回结果。

接入前确认

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

公开资料仍需确认:安装命令

详细介绍

mcptocli:将任何MCP服务器转换为CLI

📖 文档

如果 mcp2py 将MCP服务器转换为Python模块, mcptocli 将MCP服务器转换为可以从任何终端使用的命令行工具。

什么是MCP?

MCP(模型上下文协议)是一种新兴的标准,它允许人工智能工具、API和本地应用程序以机器可读的方式描述它们可以做什么。越来越多的服务正在公开MCP接口。当他们这样做时,你不必学习他们定制的API——你只需要指出 mcptocli 在他们面前,开始从你的终端使用他们的工具。

你不需要理解协议。 你需要知道的是:

如果服务具有MCP服务器, mcptocli 让您像使用普通的命令行工具一样使用它。

______________________________________________________________________

安装

macOS和Linux

curl -fsSL https://raw.githubusercontent.com/MaximeRivest/mcptocli/main/install.sh | sh

这将为您的平台下载正确的二进制文件,安装它,并设置shell补全——所有这些都在一个步骤中完成。

视窗

irm https://raw.githubusercontent.com/MaximeRivest/mcptocli/main/install.ps1 | iex

验证

打开A 新 终端和运行:

mcptocli version

Manual install (if you prefer)

mcptocli 是一个单一的二进制文件。从以下网址下载适合您平台的版本 发布页面,使其可执行,并将其放入您的 PATH.

______________________________________________________________________

快速开始

两个步骤: 添加 一次服务器,然后 使用 它的名字。

步骤1:添加服务器

mcptocli add time 'uvx mcp-server-time'

就是这样。第二个参数是启动服务器的命令。URL会自动检测:

mcptocli add notion https://mcp.notion.com/mcp --auth oauth

第二步:使用它

mcptocli time tools
Tools (2):

  convert-time      Convert time between timezones.
  get-current-time  Get current time in a specific timezone.

Inspect:  mcptocli tools time 
Invoke:   mcptocli time  [args...]
mcptocli time get-current-time --timezone 'America/New_York'

服务器名称 是 命令。不 tool 对比 tools 记住——只是服务器名称后面跟着你想做的事情。

______________________________________________________________________

日常使用

添加服务器后,您需要的一切如下:

mcptocli time tools                                              # list tools
mcptocli time get-current-time --timezone 'America/New_York'      # call a tool
mcptocli time get-current-time 'Europe/London'                    # positional args work too
mcptocli time resources                                          # list resources
mcptocli time prompts                                            # list prompts
mcptocli time shell                                              # interactive mode
mcptocli time doctor                                             # diagnose problems

在调用工具之前检查它

mcptocli time tools get-current-time
NAME
  get-current-time - Get current time in a specific timezone

USAGE
  time get-current-time --timezone 

ARGS
  --timezone string  Required. IANA timezone name (e.g., 'America/New_York', 'Europe/London').

保持服务器运行以获得即时响应

mcptocli time up                                        # start in background
mcptocli time get-current-time 'America/New_York'        # ~10ms instead of ~2s
mcptocli time get-current-time 'Europe/London'            # instant
mcptocli time down                                       # stop when done

跨多个客户端共享一台服务器

mcptocli time up --share                                # start in HTTP mode
mcptocli time get-current-time 'America/New_York'        # mcptocli uses it automatically
# Other MCP clients (Claude Desktop, notebooks) can connect to the same server
mcptocli time down                                       # stop when done

交互式 shell

mcptocli time shell
time> tools
time> get-current-time 'America/New_York'
time> convert-time --source-timezone 'America/New_York' --time '14:30' --target-timezone 'Europe/London'
time> set output json
time> get-current-time 'Europe/London'
time> exit

shell保持连接打开,支持历史记录和标签完成,并允许您动态切换输出格式。

______________________________________________________________________

远程服务器

使用不记名代币

export ACME_TOKEN="your-api-key"
mcptocli add acme https://api.acme.dev/mcp --bearer-env ACME_TOKEN
mcptocli acme tools
mcptocli acme search --query invoices

使用OAuth(浏览器登录)

mcptocli add notion https://mcp.notion.com/mcp --auth oauth
mcptocli notion tools
# Browser opens automatically the first time

______________________________________________________________________

输出格式

mcptocli time get-current-time 'America/New_York'            # human-readable (default)
mcptocli time get-current-time 'America/New_York' -o json     # exact JSON for scripts
mcptocli time get-current-time 'America/New_York' -o yaml     # YAML

-o json 始终是脚本安全的:输出转到 stdout,诊断转到 stderr,出口代码稳定。

______________________________________________________________________

参数

mcptocli 读取工具的模式并自动生成CLI标志。

# Named flags (always work)
mcptocli time get-current-time --timezone 'America/New_York'

# Positional arguments (for required scalar args, in schema order)
mcptocli time get-current-time 'America/New_York'

# Booleans
mcptocli api update --dry-run
mcptocli api update --no-dry-run

# Repeated values for arrays
mcptocli api search --tag cli --tag go --tag mcp

# Structured JSON from a file
mcptocli api create --payload @data.json

# Or from stdin
cat data.json | mcptocli api create --payload @-

对于复杂的模式,你总是可以回到原始JSON:

mcptocli api complex-tool --input '{"nested": {"key": "value"}}'

______________________________________________________________________

一次性使用(无需注册)

您无需注册服务器即可使用它:

mcptocli tools --command 'uvx mcp-server-time'
mcptocli tool --command 'uvx mcp-server-time' get-current-time 'America/New_York'
mcptocli tool --url https://api.example.com/mcp --bearer-env TOKEN search --query test

______________________________________________________________________

暴露的命令

当您添加服务器时, mcptocli 自动为其创建独立命令:

mcptocli add time 'uvx mcp-server-time'
# → creates mcp-time

mcp-time tools
mcp-time get-current-time 'America/New_York'

想要一个更短的名字吗?

mcptocli expose time --as t
t tools
t get-current-time 'America/New_York'

删除暴露的命令:

mcptocli expose --remove time

这些是你的真实命令 PATH,所以 mcp- 在你的壳里工作。

______________________________________________________________________

管理服务器

mcptocli add time 'uvx mcp-server-time'                        # save
mcptocli ls                                                     # list all
mcptocli rm time                                                # remove (cleans up exposed commands too)

ls 输出:

time (up)  uvx mcp-server-time
notion     https://mcp.notion.com/mcp

配置会自动保存:

  • 全球的: ~/.config/mcptocli/config.yaml
  • 每个项目: .mcptocli.yaml (使用 --local 旗帜)

______________________________________________________________________

诊断问题

mcptocli time doctor
CHECK    STATUS  DETAIL
resolve  ok      time
command  ok      /home/maxime/.local/bin/uvx
auth     ok      no auth required
connect  ok      initialize handshake succeeded
tools    ok      2 tool(s) available

______________________________________________________________________

壳体完井

# bash
echo 'source > ~/.bashrc

# zsh
echo 'source > ~/.zshrc

# fish
mcptocli completion fish | source

______________________________________________________________________

如何 mcptocli 与...相关 mcp2py

mcp2py 将MCP服务器转变为 Python模块 --非常适合Python中的笔记本电脑、脚本和数据分析。

mcptocli 将MCP服务器转变为 Shell 命令 --非常适合终端用户、shell脚本、CI管道和任何喜欢命令行的人。

它们相辅相成。如果服务有MCP服务器:

  • 使用 mcp2py 从Python调用它
  • 使用 mcptocli 从bash、zsh、fish、PowerShell或任何终端调用它

______________________________________________________________________

从源代码构建

git clone https://github.com/MaximeRivest/mcptocli.git
cd mcptocli
go build -o mcptocli ./cmd/mcptocli
./mcptocli version

______________________________________________________________________

当前状态

这是一个alpha版本。今天有效的方法:

  • ✅ 本地stdio MCP服务器
  • ✅ 远程HTTP JSON-RPC MCP服务器
  • ✅ 承载令牌和自定义标头身份验证
  • ✅ 使用浏览器流和令牌持久性的OAuth登录
  • ✅ 工具、资源和提示
  • ✅ 模式驱动的CLI标志和位置参数
  • ✅ 服务器名称作为隐式子命令(mcptocli time tools)
  • ✅ 用于即时响应的后台守护进程(mcptocli time up)
  • ✅ 暴露的独立命令(mcp-time, t)
  • ✅ 具有历史和完成的交互式shell模式
  • ✅ 终端启发(服务器发起的用户提示)
  • ✅ 流式HTTP(SSE)传输
  • ✅ 用于快速完成的元数据缓存
  • ✅ doctor 诊断

仍将到来:

  • ✅ 共享HTTP守护进程模式(up --share)
  • ⬜ 采样(LLM支持的服务器请求)

______________________________________________________________________

如果 mcp2py 使MCP感觉像一个原生Python库, mcptocli 让MCP感觉它从第一天就为码头而建。

工具与能力

工具数量

2

资源数量

0

提示词数量

0

能力标签

命令行工具Go本地部署MCP协议终端集成自动化脚本交互式终端

支持客户端

Claude DesktopClaude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

让助手直接读代码

把仓库、提交记录和 issue 交给模型检索,补全和重构时不用来回复制文件。

在对话里跑命令

触发构建、测试和脚本,执行结果直接回到上下文,省去切终端。

接进开发流程

把 PR、CI 状态和代码审查接进助手,减少在几个工具之间跳。

选择建议

值得选的地方

  • 只提供 2 个工具,职责集中,接入后不容易误操作。
  • 已经适配 Claude Desktop、Claude,换客户端不用重新研究配置。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • 公开资料没有可直接复制的安装命令,第一次接入要自己找入口。
  • 需要自备OAuth 授权,没有凭据没法直接试。
  • 公开摘要偏短,具体能力和限制要回到仓库确认。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 愿意照着官方文档一步步配环境的人。

不太适合

  • 暂时拿不到OAuth 授权的人。
  • 希望一条命令就装好、不想看文档的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
mcptocli (Maxime Rivest)

MCP World · 本页

2未说明未标注1 个2026-05-17
Git 838e2ec1

MCP World

12stdio有2 个2026-05-17
Markitdown MCP 2c653a5f

MCP World

1stdio有1 个2026-05-17
Context7 MCP C671e75a

MCP World

0stdio有1 个2026-05-17
Context7 831acf40

MCP World

0stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

mcptocli (Maxime Rivest) 怎么安装?

公开目录没有给出可以直接复制的安装命令,需要按仓库 README里的步骤安装;装好后写进客户端的 MCP 配置再重启。

mcptocli (Maxime Rivest) 怎么在 Claude Desktop、Cursor 里配置?

它是传输方式未标注,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

mcptocli (Maxime Rivest) 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

mcptocli (Maxime Rivest) 需要 API Key 吗?

公开资料标注的认证方式是OAuth 授权,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

mcptocli (Maxime Rivest) 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

来源标签

命令行工具Go本地部署MCP协议终端集成自动化脚本交互式终端

来源分类路径

命令行工具

继续浏览同类 MCP