article
README
🚀 emcee 中文翻译
emcee 是一款服务于 MCP 协议 的工具,其核心功能在于提供并管理各类工具。而且,它支持借助 OpenAPI 定义的接口来拓展工具集。
🚀 快速开始
基本命令
- 列出所有工具:
emcee tools/list
- 调用特定工具:
emcee tools/call --name tool_name --arguments '{"argument_key": "argument_value"}'
✨ 主要特性
- 支持通过 OpenAPI 定义的接口扩展工具集。
- 提供 MCP 功能,可通过多种方式安装。
- 支持 Docker 安装。
- 有完善的配置文件机制。
- 具备 JSON - RPC 接口。
- 提供调试工具。
📦 安装指南
1. 使用 emcee 提供 MCP 功能
- 安装方式:
- 下载并解压 最新版本。
- 按照终端中的说明进行操作。
- 验证安装:
emcee --version
2. 使用 Docker 安装
docker pull loopworkai/emcee:latest
💻 使用示例
基础用法
列出工具
emcee tools/list
调用特定工具
emcee tools/call --name tool_name --arguments '{"argument_key": "argument_value"}'
高级用法
指定配置文件运行
emcee --config /path/to/config.yaml tools/list
📚 详细文档
配置文件
- 创建配置文件(默认路径为
$HOME/.config/emcee/config.yaml):
log_level: info
cache_dir: $HOME/.cache/emcee
- 指定配置文件运行:
emcee --config /path/to/config.yaml tools/list
开发环境
克隆仓库
git clone https://github.com/loopwork-ai/emcee.git
cd emcee
安装依赖
go mod tidy
运行测试
go test ./...
深入理解
OpenAPI 支持
- OpenAPI 文件结构:
openapi: "3.0"
info:
title: Example API
version: 1.0.0
paths:
/example:
get:
summary: Returns a list of examples.
responses:
'200':
description: Successfully retrieved examples.
- 工具定义:
tools:
- name: example_tool
description: 描述示例工具的功能。
input_schema:
type: object
properties:
input_key:
type: string
JSON - RPC 接口
- 请求格式:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "example_tool",
"arguments": {
"input_key": "input_value"
}
},
"id": 1
}
- 响应格式:
{
"jsonrpc": "2.0",
"result": {
"content": [
{
"type": "text/plain",
"text": "响应内容"
}
]
},
"id": 1
}
调试工具
MCP 检查器
- 安装:
npm install -g @modelcontextprotocol/inspector
- 使用:
emcee-inspector emcee --port 5173
- 访问地址:
http://localhost:5173
📄 许可证
emcee 采用 Apache License, Version 2.0 许可证。
扫码联系在线客服