Token导航 LogoToken导航TokenDH.com
mcp2skill (Fenwei Dev) logo
开发工具未说明官方级别未说明来源级核验

mcp2skill (Fenwei Dev)

MCP Server

一个将Model Context Protocol (MCP)服务器转换为agent skills的命令行工具,自动生成SKILL.md和工具引用。

工具数

0

提示词数

0

GitHub Stars

50

资源数

0
命令行工具GoClaude开发工具Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

fenwei-dev

提供方

fenwei-dev

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

mcp2skill

](https://golang.org/dl/) ![CI](https://github.com/fenwei-dev/mcp2skill/actions) ![Release](https://github.com/fenwei-dev/mcp2skill/releases)

一个CLI工具,用于转换 模型上下文协议(MCP) 服务器进入 代理技能它从MCP服务器元数据自动生成SKILL.md和工具引用,并提供一个CLI工具与MCP服务器交互。

演示

![mcp2skill Demo](https://youtu.be/OTx5USiRqJE)

安装

快速安装

Linux/macOS

curl -sSL https://raw.githubusercontent.com/fenwei-dev/mcp2skill/main/install.sh | bash

要卸载,请执行以下操作: rm ~/.local/bin/mcp2skill

视窗

  1. 下载二进制文件 mcp2skill_windows_{arch}.tar.gz 从 :
  2. 提取存档并添加 mcp2skill.exe 到你的路径。

来源

go install github.com/fenwei-dev/mcp2skill/cmd/mcp2skill@latest

开发版本

git clone https://github.com/fenwei-dev/mcp2skill.git
cd mcp2skill
go build ./cmd/mcp2skill

编译后的二进制文件将是 ./mcp2skill.

快速开始

  1. 配置您的MCP服务器~/.mcp2skill/config.json:
{
  "mcp": {
    "fetch": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "mcp/fetch"
      ]
    },
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer {github_pat}"
      }
    }
  }
}
  1. 生成技能包:
mcp2skill generate-skill --server github --output ~/.claude/skills
  1. 使用生成的技能 在您的编码代理中:

- OpenCode - 克劳德代码 - 法典 - Gemini CLI - Qwen代码

配置

配置文件位置

该工具按以下顺序查找配置(项目覆盖全局):

  1. 自定义配置:通过指定的路径 --config 旗帜
  2. 项目配置: .mcp2skill/config.json 在当前目录或任何父目录中
  3. 全局配置: ~/.mcp2skill/config.json

配置架构

{
  "mcp": {
    "server-name": {
      "type": "stdio|http",
      // For stdio transport:
      "command": "path/to/executable",
      "args": ["arg1", "arg2"],
      "env": {
        "VAR_NAME": "value"
      },
      // For http transport:
      "url": "https://api.example.com/mcp",
      "headers": {
        "Authorization": "Bearer token"
      }
    }
  }
}

运输类型

标准

适用于通过标准输入/输出进行通信的MCP服务器。

{
  "type": "stdio",
  "command": "uvx",
  "args": ["mcp-server-fetch"],
  "env": {
    "FETCH_API_KEY": "sk-..."
  }
}

超文本传输协议

对于可通过HTTP/S访问的MCP服务器。

{
  "type": "http",
  "url": "https://api.githubcopilot.com/mcp/",
  "headers": {
    "Authorization": "Bearer ghp_..."
  }
}

OAuth

尚未实施。

命令

docs/commands.md 获取详细的命令文档。

生成的技能包结构

my-skill/
├── SKILL.md              # Main skill documentation with frontmatter
├── references/
│   ├── TOOLS.md          # Generated tool reference (if applicable)
│   └── RESOURCES.md      # Generated resource reference (if applicable)
└── bin/
    └── mcp2skill         # Embedded binary (if applicable)

技能.md

生成的SKILL.md遵循 代理技能规范 带标准正面:

---
name: my-server
description: Provides access to My MCP Server (v1.0.0) MCP server with tools: tool1, tool2. Use when the user requests My MCP Server functionality.
---

# My MCP Server

This skill provides access to the My MCP Server MCP server.

## MCP Server Info

- **MCP Server:** my-server
- **Server Version:** 1.0.0
- **Server Title:** My MCP Server Title
- **Protocol Version:** 2024-11-05

## Available Tools

This skill provides the following tools:

- **tool1**: Description of tool1
- **tool2**: Description of tool2

## Usage

This skill is automatically invoked when tools from this MCP server are required.

For detailed documentation on each tool's parameters and usage, see [TOOLS.md](references/TOOLS.md).

常见用例

从stdio MCP服务器创建技能

# Configure
cat > ~/.mcp2skill/config.json  ~/.mcp2skill/config.json <<'EOF'
{
  "mcp": {
    "github": {
      "type": "http",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "Authorization": "Bearer ghp_..."
      }
    }
  }
}
EOF

# Generate
mcp2skill generate-skill --server github --output ./skills/github

当MCP服务器发生变化时更新技能

# Check for updates
mcp2skill update-skill --skill ./skills/fetch

# Review changes in ./skills/fetch/update/

# Apply if satisfied
mcp2skill update-skill --skill ./skills/fetch --confirm

创建没有嵌入二进制文件的技能

mcp2skill generate-skill --server fetch --output ./skills/fetch --no-embed

这会生成一种引用您全局安装的技能 mcp2skill 二进制而不是嵌入它。

发展

项目结构

mcp2skill/
├── cmd/
│   └── mcp2skill/         # Main CLI entry point
├── internal/
│   ├── cliapp/            # CLI command implementations
│   ├── config/            # Configuration management
│   ├── mcp/               # MCP client wrapper
│   └── skill/             # Skill generation logic
├── go.mod
└── README.md

建筑

# Standard build
go build ./cmd/mcp2skill

# Static binary for distribution
CGO_ENABLED=0 go build -ldflags="-s -w" ./cmd/mcp2skill

测试

# Run all tests
go test ./...

# Run tests with coverage
go test -cover ./...

# Run specific package tests
go test ./internal/config
go test ./internal/mcp
go test ./internal/cliapp

故障排除

“在配置中找不到服务器”

确保您的MCP服务器在配置文件中定义在以下位置之一:

  • ~/.mcp2skill/config.json (全球)
  • .mcp2skill/config.json 在您的项目目录中
  • 通过指定的路径 --config 旗帜

“无法连接到MCP服务器”

常见原因:

  • stdio传输的命令路径不正确
  • 缺少必需的环境变量
  • http传输的URL或标头无效
  • 网络连接问题(针对http)

使用 --verbose 标记以获取更详细的错误消息:

mcp2skill generate-skill --server my-server --verbose

“输出目录不为空”

目标目录已包含文件。使用 --force 要覆盖:

mcp2skill generate-skill --server my-server --output ./skills/my-server --force

更新不可用

如果 update-skill 报告“无可用更新”,则该技能已与MCP服务器的当前状态同步。

关于现有更新目录的警告

这表示之前的更新已启动但未完成。要么:

  • 与一起跑步 --confirm 应用待处理的更新
  • 与一起跑步 --discard 取消它们,重新开始

许可证

许可证 了解详情。

目录标签

目录标签

命令行工具GoClaude开发工具本地部署协议转换技能生成自动化

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

oauth

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明oauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP