Token导航 LogoToken导航

MCP Server · 开发工具

mcp2cli (Am1n3e)

unmcp是一个直接从终端访问MCP服务器工具的命令行接口,适用于脚本编写、自动化和代理工作流,避免了MCP协议的令牌开销和速度问题。

stdio官方级别未说明来源级核验工具 2
命令行工具Python自动化

快速开始

作者 / 组织
Am1n3e
提供方
Am1n3e
运行时
Python

工具数量

2

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

9

仓库热度

收录来源

1 个

MCP World

选型结论

mcp2cli (Am1n3e) 属于开发工具类 MCP Server,公开资料标注 2 个工具,通过stdio 本地进程接入,客户端适配情况以官方文档为准,有可以直接复制的安装命令;接入前要先准备 会话凭据。

分类

开发工具

传输方式

stdio

认证方式

会话凭据

部署方式

公开资料未说明

安装与配置

安装命令

uvx unmcp clt init <server>

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

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

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

  4. 4

    验证是否可用

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

接入前确认

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

详细介绍

联合国儿童基金会

跳过MCP。享受CLI。

直接从终端使用MCP服务器工具。非常适合脚本、自动化和代理工作流。

兼容性: 预计可以开箱即用地与大多数MCP服务器配合使用——只需将其指向任何基于stdio的MCP服务器即可。

快速开始

# 1. Configure your MCP servers in .unmcp/.mcp.json
# 2. Initialize a server (discovers available tools)
uvx unmcp clt init 

# 3. Call tools directly
uvx unmcp   [OPTIONS]

为什么是unmcp?

MCP服务器提供强大的结构化工具。但是MCP协议将大型工具模式和详细数据加载到AI上下文中——令牌昂贵,实践缓慢。

CLI更精简。它避免了将工具模式和冗长的输出加载到模型上下文中。

unmcp允许您通过CLI直接访问MCP服务器工具。相同的工具,没有协议开销。

并非所有MCP服务器都有官方CLI。unmcp允许您立即将现有的MCP服务器用作CLI,而不是等待。

看 剧作家CLI与MCP 出于类似的动机。

用法

服务器管理

uvx unmcp clt init       # Initialize and discover tools (--force to reinitialize)
uvx unmcp clt list               # List servers with status
uvx unmcp clt start      # Start persistent daemon
uvx unmcp clt stop       # Stop daemon

呼叫工具

参数名称与MCP工具模式完全匹配(例如。, libraryId 成为 --libraryId).

# Basic call
uvx unmcp   --arg1 "value"

# Output as JSON (flag before tool name)
uvx unmcp  --json  --arg1 "value"

# Save to file (flag before tool name)
uvx unmcp  --output result.json  --arg1 "value"

# Save to directory (auto-generates filename: {server}_{tool}_{timestamp}.json)
uvx unmcp  --output ./output_dir/  --arg1 "value"

# View available tools
uvx unmcp  --help

# View tool options
uvx unmcp   --help

执行模式

按需模式

每次工具调用都会生成一个新的MCP服务器,执行该工具,然后退出。

何时使用: MCP服务器启动很快,工具调用不频繁,或者服务器是无状态的。避免保持额外进程运行。

sequenceDiagram
    participant CLI as uvx unmcp
    participant MCP as MCP Server

    CLI->>MCP: spawn process
    CLI->>MCP: initialize + call_tool()
    MCP-->>CLI: result
    CLI->>MCP: exit

守护程序模式

守护进程使MCP服务器保持运行。工具调用通过Unix套接字连接。

何时使用: 连续进行许多工具调用,服务器启动缓慢,或者服务器在调用之间保持状态。

sequenceDiagram
    participant CLI as uvx unmcp
    participant D as Daemon
    participant MCP as MCP Server

    Note over CLI,MCP: uvx unmcp clt start
    D->>MCP: spawn & initialize
    D->>D: listen on socket

    Note over CLI,MCP: uvx unmcp  
    CLI->>D: call via socket
    D->>MCP: call_tool()
    MCP-->>D: result
    D-->>CLI: result

    Note over CLI,MCP: uvx unmcp clt stop
    CLI->>D: shutdown
    D->>MCP: close

配置

MCP服务器配置(.unmcp/.mcp.json)

遵循标准MCP配置格式。根据需要添加尽可能多的服务器(本地或全局 ~/.unmcp/.mcp.json):

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": ["-y", "@anthropic/chrome-devtools-mcp@latest"]
    },
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp@latest"]
    }
  }
}

特性

自动倾卸

自动将大量输出保存到文件中,保持代理上下文(和您的终端)干净。

在中配置 .unmcp/.settings.json:

{
  "dump_dir": "unmcp_output",
  "servers": {
    "context7": {
      "dump_threshold": 500
    }
  }
}

当响应超过 dump_threshold 令牌(1个令牌≈4个字符),保存到 dump_dir 而不是印刷。设置为 0 总是倾倒。

对于小响应,转储到文件会增加开销——从文件读取可能比直接接收结果花费更多。设置一个对您的工作流程有意义的阈值。看 用例:上下文7.

在转储中包含调用参数

将工具调用参数添加到转储文件中,以实现可追溯性。

{
  "dump_call_args": true
}

当AI代理提取在运行过程中不会改变的数据(如文档)时很有用。转储成为代理可以引用回的缓存,而无需重新获取。

也可以通过以下方式为每台服务器设置 servers..dump_call_args.

用例:上下文7

背景7 是一个MCP服务器,它为库(React、Next.js等)提取最新的文档和代码示例。它输出 5000+代币 每个查询——非常适合上下文,在反复加载到AI提示中时成本很高。

问题: 每个查询都会将数千个令牌转储到AI的上下文窗口中。如果没有仔细的上下文管理(如子代理或常规压缩),上下文窗口将受到影响。

设置

// .unmcp/.mcp.json
{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp@latest"]
    }
  }
}
// .unmcp/.settings.json
{
  "servers": {
    "context7": {
      "dump_threshold": 500,
      "dump_call_args": true
    }
  }
}

用法

我们在这里使用按需模式,因为Context7在调用之间不保存有意义的状态——它只是获取文档。对于像Chrome DevTools MCP(维护浏览器会话状态)这样的有状态服务器,守护进程模式将是更好的选择。

# Initialize
uvx unmcp clt init context7

# Query docs - automatically saved to feature-x-tmp/
uvx unmcp context7 --output feature-x-tmp query-docs --libraryId "/vercel/next.js" --query "app router"
$ uvx unmcp context7 --help
Usage: unmcp context7 [OPTIONS] COMMAND [ARGS]...

  Tools for context7 server

Options:
  --json         Output raw JSON response.
  --output PATH  Write JSON result to file.
  --help         Show this message and exit.

Commands:
  query-docs          Retrieves and queries up-to-date documentation and...
  resolve-library-id  Resolves a package/product name to a...
$ uvx unmcp context7 --output feature-x-tmp query-docs --libraryId /vercel/next.js --query "How to set up authentication with JWT"
Tool executed successfully.
Tool output written to: feature-x-tmp/context7_query-docs_20260131_194608.json
// feature-x-tmp/context7_query-docs_20260131_194608.json
{
  "tool_call": {
    "server": "context7",
    "tool": "query-docs",
    "arguments": {
      "libraryId": "/vercel/next.js",
      "query": "How to set up authentication with JWT"
    }
  },
  "response": {
    "content": [
      {
        "type": "text",
        "text": "### Encrypt and Decrypt Sessions with Jose in Next.js\n\n
                Source: https://github.com/vercel/next.js/blob/canary/docs/...\n\n
                Implements JWT-based session encryption and decryption using
                the Jose library with HS256 algorithm...\n\n

from 'jose'\n...```\n\n --------------------------------\n\n ### Set Encrypted Session Cookie in Next.js...\n\n ... (5000+ tokens of documentation)" } ], "isError": false } }


随着 `dump_call_args: true`,输出包括确切的工具调用参数。这将输出文件转换为AI代理可以引用的缓存,无需在会话期间重新获取相同的文档。

$ uvx unmcp context7 query-docs --help Usage: unmcp context7 query-docs [OPTIONS]

Retrieves and queries up-to-date documentation and code examples from Context7 for any programming library or framework.

You must call 'resolve-library-id' first to obtain the exact Context7-compatible library ID required to use this tool, UNLESS the user explicitly provides a library ID in the format '/org/project' or '/org/project/version' in their query.

IMPORTANT: Do not call this tool more than 3 times per question. If you cannot find what you need after 3 calls, use the best information you have.

Options: --libraryId TEXT Exact Context7-compatible library ID (e.g., '/mongodb/docs', '/vercel/next.js', '/supabase/supabase', '/vercel/next.js/v14.3.0-canary.87') retrieved from 'resolve-library-id' or directly from user query in the format '/org/project' or '/org/project/version'. [required] --query TEXT The question or task you need help with. Be specific and include relevant details. Good: 'How to set up authentication with JWT in Express.js' or 'React useEffect cleanup function examples'. Bad: 'auth' or 'hooks'. IMPORTANT: Do not include any sensitive or confidential information such as API keys, passwords, credentials, or personal data in your query. [required] --help Show this message and exit.


随着 `dump_threshold: 0`,每个Context7响应都保存到 `docs_output/`,保持您的AI上下文简洁,同时保留完整的文档访问权限。

## 状态

正在积极发展中。

## 许可证

麻省理工学院

工具与能力

工具数量

2

资源数量

0

提示词数量

0

能力标签

命令行工具Python本地部署MCP协议自动化脚本编写代理工作流

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

典型使用场景

让助手直接读代码

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

在对话里跑命令

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

接进开发流程

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

选择建议

值得选的地方

  • 只提供 2 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • stdio 方式要求本地装好 Python,换机器要重新装一遍。
  • 需要自备会话凭据,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在开发工具场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到会话凭据的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

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

MCP World · 本页

2stdio有1 个2026-05-17
Git 838e2ec1

MCP World

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

MCP World

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

MCP World

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

MCP World

0stdio有1 个2026-05-17

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

常见问题

5 条

mcp2cli (Am1n3e) 怎么安装?

公开资料给出的安装命令是 uvx unmcp clt init <server>,运行环境为 Python。装完后按客户端要求写进 MCP 配置,重启客户端生效。

mcp2cli (Am1n3e) 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Python;保存后完全退出客户端再打开,配置才会生效。

mcp2cli (Am1n3e) 收费吗?

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

mcp2cli (Am1n3e) 需要 API Key 吗?

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

mcp2cli (Am1n3e) 支持哪些客户端?

公开资料没有标注具体客户端;能配置本地 MCP 命令的客户端都能接,配置方式参照官方文档。

来源信息

继续浏览同类 MCP