Pare
by Dave-London·★ 121·综合分 49
将 CLI 工具转换为结构化 JSON 输出的 MCP 服务器,可为 AI 代理减少高达 95% 的 token 使用量。
概述
Pare 提供了一套 MCP 服务器,封装了常见开发工具(git、npm、docker、测试运行器等),并返回结构化的 JSON 数据而非原始终端文本。这消除了脆弱的字符串解析需要,同时大幅减少 token 消耗。服务器同时提供人类可读文本和结构化 JSON 内容,使代理能够使用可靠、类型化的数据,且这些数据在不同平台、工具版本和语言环境下保持一致。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当需要从开发工具中为 AI 代理提供可靠、结构化的输出时,特别是在令牌效率重要或跨平台工作时,选择 Pare。
什么时候不要选它
如果你的工作流需要依赖解析特定的终端文本模式而这些模式在 JSON 转换中会丢失,或者你需要保留完整格式的原始终端输出,不要选择 Pare。
此 server 暴露的工具
从 README 抽取出 12 个工具git:statusGet structured git status information
git:logGet structured git commit history
git:diffGet structured git diff output
git:showGet structured information about a specific commit
npm:installGet structured output from npm install
npm:testGet structured output from npm test
docker:buildGet structured output from docker build
test:runGet structured output from test runners
lint:runGet structured output from linters
k8s:getGet structured output from kubectl get
infra:planGet structured output from terraform plan
security:scanGet structured output from security scanners
说明:Tool names inferred from category table and examples. No explicit tool listing in README.
可对比工具
安装
使用以下命令安装 Pare MCP 服务器:
# 快速设置(非交互模式)
npx @paretools/init --client claude-code --preset web
# 将代理规则添加到项目
cat node_modules/@paretools/init/rules/CLAUDE.md >> CLAUDE.md
# 验证安装
npx @paretools/init doctor对于 Claude Desktop,添加到 config.json:
{
"mcpServers": {
"pare-git": {
"command": "npx",
"args": ["-y", "@paretools/git"]
},
"pare-npm": {
"command": "npx",
"args": ["-y", "@paretools/npm"]
}
}
}FAQ
- Pare 如何减少 token 使用量?
- Pare 将冗长的 CLI 输出转换为结构化 JSON,通常比原始终端文本节省 46-95% 的 token。例如,输出 373 个 raw token 的 'docker build' 命令通过 Pare 处理后只产生 20 个 token。
- 我可以选择注册哪些工具吗?
- 是的,您可以使用环境变量如 PARE_GIT_TOOLS=status,log 或 PARE_TOOLS=git:status,npm:install 来限制代理可用的工具。
Pare 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。