MCPixy🚀
MCPixy是一个用于开发或本地工作的零配置MCP(模型上下文协议)服务器构建器,允许您仅使用YAML配置创建MCP服务器。无需编写代码,即可在几分钟内将任何工具连接到LLM。
 
✨ 特性
🔧 三种简单的工具类型
- CLI工具 ⚙️ - 执行命令、运行脚本、访问系统实用程序
- HTTP工具 🌐 - 进行API调用,处理身份验证,管理web请求
- Web剪贴 🕷️ - 使用CSS选择器从网站中提取数据
🛡️ 安全与信任
- 数字签名 -签署并验证安全工具
- 认证 -具有可配置模式的基于JWT的身份验证
- 审计日志 -跟踪所有工具的使用和访问
- 可信密钥 -管理已验证工具的公钥
🚀 零配置
- Bootstrap设置 -使用一个命令开始
- YAML配置 -无需编码即可定义工具
- 自动发现 -自动从目录加载工具
🚀 快速开始
先决条件
- 锈蚀1.70+(安装Rust)
- Git
安装
# Clone the repository
git clone https://github.com/jondot/mcpixy.git
cd mcpgw
# Build the project
cargo build --release
# Bootstrap with default configuration
mcpixy bootstrap引导会创建默认配置、示例工具文件和用于在中签名工具的密钥对 ~/.mcpixy.
下次跑步时 mcpixy 所有这些都会被自动拾取。
第一个工具
编辑在中引导的工具 ~/.mcpixy/tools/sample_tools.yaml,并添加以下示例:
tools:
- id: http_get_example
type: http
name: "HTTP GET Example"
description: "Simple GET request to any URL"
method: GET
url: "{{input.url}}"
headers:
User-Agent: "MCPixy/1.0"
input_schema:
type: object
properties:
url:
type: string
description: "URL to make GET request to"
required: [url]签署此工具:
mcpixy sign-tool --file ~/.mcpixy/tools/sample_tools.yaml --tool-id http_get_example或签署所有工具:
mcpixy sign-tool --file ~/.mcpixy/tools/sample_tools.yaml配置游标IDE
在您的 mcp.json:
{
"mcpServers": {
"mcpixy": {
"url": "http://localhost:3033/mcp"
}
}
}记住,如果你跑了 mcpixy 通常,这只会提供 *签名工具*,允许未签名的工具与一起运行 mcpixy --allow-unsigned.
要使用JWT身份验证,请配置 gateway.toml:
[auth]
mode = "jwt"
algorithm = "HS256" # or "RS256"
secret = "your-super-secret-key-here" # for HS256使用密钥签署JWT,并通过您的 mcp.json 配置:
{
"mcpServers": {
"mcpixy": {
"url": "http://localhost:3033/mcp",
"headers": {
"Authorization": "Bearer eyJ..."
}
}
}
}🛠️ CLI命令
核心命令
# Bootstrap with default configuration
mcpixy bootstrap
# Sign tools for security
mcpixy sign-tool --file tools.yaml --tool-id my_tool
# Verify tool signatures
mcpixy verify-tool --file tools.yaml --tool-id my_tool服务器选项
# Start with custom config
mcpixy --config my_config.toml
# Override port
mcpixy --port 8080
# Set log level
mcpixy --log-level debug
# Check configuration
mcpixy --check-config🔐 安全功能
数字签名
- 版本25519 用于工具验证的密钥对
- 公钥管理 对于可信来源
- 签名验证 工具执行前
身份验证模式
- 无 -无身份验证
- JWT公司 -JSON Web令牌身份验证
审计日志
- 综合录井 所有工具执行
- 用户跟踪 以及访问监控
- 性能指标 以及错误报告
🌐 测试UI
访问web UI http:///ui 启动网关后:
- 工具管理 -查看、编辑和配置工具
- 实时监控 -实时观看工具执行
- 配置编辑器 -可视化YAML编辑
- 使用情况分析 -性能和使用见解
🤝 贡献
我们欢迎捐款!请参阅我们的投稿指南:
- 分叉存储库
- 创建要素分支
- 进行更改
- 如果适用,添加测试
- 提交拉取请求
📄 许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
