Skill MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Skill MCP Server
基于 MCP (Model Context Protocol) 协议的技能管理服务端。支持 AI Agent(如 Claude Code、OpenCode)通过 MCP 协议动态获取授权的 Skills。
特性
MCP 协议支持: 通过 HTTP Streamable 传输层暴露 MCP 接口
用户认证: API Key 认证,每个用户独立的 Key
权限控制: 基于用户的 Skill 授权,实时生效
REST API: 完整的管理接口(用户、技能、授权)
调用审计: 记录所有 Skill 调用日志
权限过滤:
tools/list仅返回用户授权的 Skills安全防护: 支持压缩包炸弹检测、路径遍历防护
MCP 依赖: 支持声明技能所需的外部 MCP 服务依赖
Related MCP server: SkillMCP
快速开始
1. 安装依赖
pip install -r requirements.txt2. 配置环境变量
创建 .env 文件,配置数据库和 Redis:
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=skill_mcp
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
REDIS_PASSWORD=
SECRET_KEY=change-me-in-production
DEBUG=true
PORT=8000
LOG_LEVEL=INFO3. 初始化数据库
python scripts/seed_data.py --with-samples4. 启动服务
python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000服务启动后:
REST API:
http://localhost:8000MCP 端点:
http://localhost:8000/mcp健康检查:
http://localhost:8000/healthAPI 文档:
http://localhost:8000/docs
OpenCode 配置
在 OpenCode 的 config.json 中添加:
{
"mcpServers": {
"skill-server": {
"url": "http://localhost:8000/mcp?key=YOUR_API_KEY",
"transport": "streamable-http"
}
}
}获取 API Key: 登录后访问
http://localhost:8000/docs查看用户 API
API 接口
用户管理
方法 | 路径 | 描述 | 权限 |
POST |
| 创建用户 | admin |
GET |
| 用户列表(分页) | admin |
技能管理
方法 | 路径 | 描述 | 权限 |
POST |
| 从文件创建技能 | admin |
POST |
| 从 JSON 创建技能 | admin |
GET |
| 技能列表 | admin |
PUT |
| 更新技能元数据 | admin |
PUT |
| 更新技能内容 | admin |
PUT |
| 上传技能文件 | admin |
POST |
| 同步文件系统到数据库 | admin |
DELETE |
| 删除技能 | admin |
GET |
| 获取技能内容 | admin |
GET |
| 列出技能文件 | admin |
GET |
| 下载技能文件 | admin |
GET |
| 获取 MCP 依赖 | admin |
授权管理
方法 | 路径 | 描述 | 权限 |
POST |
| 授权技能 | admin |
DELETE |
| 撤销授权 | admin |
调用日志
方法 | 路径 | 描述 | 权限 |
GET |
| 调用日志列表 | admin |
MCP 工具
tools/list
返回当前用户授权的所有技能(含全局工具和技能专用工具)。
全局工具:
get_skill_index- 获取技能的文件索引get_skill_file- 读取技能指定文件的内容
技能工具:
get_skill_{name}- 获��指定技能完整内容(向后兼容)
get_skill_index
获取技能的文件索引(文件名和大小,不含内容)。
输入:
{
"skill_name": "code-review"
}输出: JSON 格式的文件索引
get_skill_file
读取技能指定文件的内容。
输入:
{
"skill_name": "code-review",
"file_path": "SKILL.md"
}输出: 文件内容
get_skill_{name}
获取指定技能完整内容(向后兼容)。
输入:
{
"skill_name": "code-review"
}输出: Skill 内容 (JSON 格式)
MCP 依赖配置
技能可以声明所需的外部 MCP 服务依赖。在创建技能时,通过 mcp_config 参数传入:
{
"mcpServers": {
"sorftime": {
"url": "https://mcp.sorftime.com",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}系统会自动提取 URL 并存储,调用技能时会返回详细的 MCP 配置检查指南。
安全特性
API Key 认证: 通过
X-API-Keyheader 或?key=query param路径遍历防护: 防止
..攻击压缩包炸弹检测: 检测恶意压缩比(>100:1)
文件大小限制: 单文件最大 100MB,总提取最大 100MB
文件数量限制: 最多 1000 个文件
测试
# 单元测试(需要服务运行)
python -m pytest tests/ -v技术栈
Web 框架: FastAPI
MCP 协议: mcp Python SDK
数据库: MySQL (aiomysql)
缓存: Redis
认证: API Key (X-API-Key header 或 ?key= query param)
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Governed AI agent skills — one library, distributed to devs and exposed to remote agents over MCP.
One place to build, share, and govern the skills and tools your AI agents use at work.
Search & install 13,000+ AI agent skills from skills-hub.ai inside any MCP tool.
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI agents to manage, search, plan, and execute reusable skills while automatically enforcing always-on coding and reasoning guidelines. It provides workflow orchestration, permission-controlled execution, dynamic skill registration, and feedback-based ranking.915 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables centralized, versioned management and distribution of AI agent skills through a horizontally scalable MCP server, allowing agents to dynamically discover, search, and retrieve skills over HTTP/SSE.MIT
- AlicenseNot gradedqualityBmaintenanceEnables enterprise AI agents to discover and invoke MCP tools, resources, and prompts across GitHub, ITSM, and business systems through a policy-controlled gateway with human approval and auditability.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to discover, load, and recommend versioned skills from a self-hosted library over MCP, with scoped access and immutable revisions.18 npm277MIT