remote-skill-mcp
remote-skill-mcp
把远程 HTTP 服务上的技能文件(
skill.md及其子文件)动态暴露为 MCP(Model Context Protocol) 工具、资源与提示词,让任意 MCP 客户端(Claude Desktop、Cursor、LobeHub 等)通过 stdio 直接读取远程技能文档。
📖 English documentation / 英文文档: README.en.md
基于标准 MCP SDK 的 FastMCP 运行时实现(非手写 JSON-RPC 协议层),完全符合 MCP 规范,可直接被任意 MCP 客户端接入,并已适配 LobeHub MCP 市场(见 lhm.plugin.json)。
工作原理(懒加载,省上下文)
┌─────────────┐ stdio (newline-delimited JSON-RPC) ┌──────────────────┐
│ MCP 客户端 │ ◄────────────────────────────────────► │ server.py │
│ (Claude等) │ initialize / tools/* / │ (本仓库) │
└─────────────┘ resources/* / prompts/* └────────┬─────────┘
│ HTTP GET/HEAD
▼
┌─────────────────────┐
│ 远程 SimpleHTTP 服务 │
│ /skill.md │
│ /image/*.md 等子文件│
└─────────────────────┘启动时(lifespan,懒加载):
从
REMOTE_SKILL_BASE_URL拉取skill.md(轻量能力目录,描述有哪些技能方向);解析其中的 markdown 链接 / 图片 / 裸文件 token / 目录名,对每个引用做 HEAD 探测(不下载正文):
引用是文件 → 记录路径 + mime/size;
引用是目录 → GET 其 HTML 列表页,把列出的文件记录进来(不递归下载文件正文);
404 的裸文件名会在已知目录中自动重试;
动态生成 MCP 暴露物(description 只含路径清单,不含正文,避免上下文膨胀):
工具
get_skill_file(path)—— 按路径按需取文件内容;资源
skill://<相对路径>—— 每个发现的文件一个资源(read时才下载;文本内联,二进制转 base64);提示词
skill/list_skills—— 返回skill.md全文 / 能力目录摘要。
这样 agent 平时只看到"有哪些能力方向",真正用到某个技能时才拉取详细文档, 避免一次性把所有技能详情灌进上下文。若
skill.md不直接列全所有文件、需要钻取目录, 可设MCP_DISCOVER_DEPTH>=1递归 N 层(会下载中间层正文以解析更多引用)。
Related MCP server: skills-mcp-server
特性
✅ 基于标准 MCP SDK(
FastMCP)实现,完全符合 MCP 规范,stdio 传输✅ 懒加载:启动只读
skill.md,子文件仅记录路径,正文按需下载(省上下文)✅ 动态发现:HEAD 探测文件 + GET 目录列表页,解析
skill.md的链接/图片/裸文件/目录名✅ 404 重试:对失败路径在已知目录中自动重试
✅ MIME 推断:
content-type为application/octet-stream时按扩展名回退(.md等仍按文本)✅ 三种暴露方式:工具 / 资源 / 提示词(description 只含路径清单,不含正文)
✅ 大文件保护:超过
MCP_MAX_FILE_BYTES拒绝读取✅ 日志只走 stderr,stdout 仅用于协议消息
✅ 工具错误用
isError=True返回(符合 MCP 约定,客户端不抛异常)✅ 适配 LobeHub MCP 市场:含
lhm.plugin.json清单、pyproject.toml元数据、MIT 许可
提供的 MCP 能力
类型 | 名称 | 说明 |
工具 |
| 按路径读取文件内容(文本/图片/二进制 base64) |
资源 |
| 每个发现的文件一个资源 URI,可 |
提示词 |
| 返回 |
提示词 |
| 返回可用技能方向摘要(文件清单) |
安装
cd remote_skill_mcp
pip install -r requirements.txt依赖:mcp(协议类型 + stdio 传输 + FastMCP 运行时)、httpx(HTTP 客户端)。
配置(环境变量)
变量 | 默认值 | 说明 |
|
| 远程服务根地址 |
|
| 技能入口文件(相对 BASE_URL) |
|
| 单文件最大字节,超过则拒绝 |
|
| 记录文件数上限 |
|
| 单次 HTTP 超时(秒) |
|
| 发现深度: |
|
| 是否缓存已读取文件内容(省重复请求,但占内存) |
运行
直接运行(调试)
export REMOTE_SKILL_BASE_URL=http://192.168.2.6:4000
python server.py服务启动后会阻塞等待 stdio 输入。
接入 MCP 客户端
Claude Desktop(claude_desktop_config.json):
{
"mcpServers": {
"remote-skill": {
"command": "python",
"args": ["/绝对路径/remote_skill_mcp/server.py"],
"env": {
"REMOTE_SKILL_BASE_URL": "http://192.168.2.6:4000"
}
}
}
}Cursor / 其他支持 stdio MCP 的客户端同理,把 server.py 作为子进程启动即可。
发布到 LobeHub MCP 市场
本仓库已包含市场清单 lhm.plugin.json(identifier/name/version/author/homepage/icon/category/tags/description/tools/prompts/resources 齐全)。
确保仓库已 push 到 GitHub(
origin=git@github.com:Congenital/remote_skill_mcp.git);安装市场 CLI(需 Node.js ≥ 22)并登录:
npx -y @lobehub/market-cli login npx -y @lobehub/market-cli github connect发布(读取本仓库根目录的
lhm.plugin.json):npx -y @lobehub/market-cli plugin publish https://github.com/Congenital/remote_skill_mcp后续版本更新:
npx -y @lobehub/market-cli plugin update(改lhm.plugin.json的version即可)。
市场按 活跃度 / 稳定性 / 社区反馈 等维度排名。本清单已补齐 作者、主页、图标、分类、标签、工具/提示词/资源 等字段以提升完整度评分。
测试
python tests/e2e_test.py端到端测试通过 mcp.ClientSession 启动 server,验证 initialize / tools/list / tools/call(含非法路径报错)/ resources/list / resources/read / prompts/list / prompts/get(skill + list_skills)全链路。
目录结构
remote_skill_mcp/
├── server.py # MCP 服务(FastMCP 运行时 + 发现 + 工具/资源/提示词)
├── lhm.plugin.json # LobeHub MCP 市场清单
├── pyproject.toml # 项目元数据(名称/版本/作者/许可/入口点)
├── LICENSE # MIT 许可
├── requirements.txt
├── README.md # 中文文档
├── README.en.md # 英文文档
└── tests/
└── e2e_test.py # 端到端测试远程服务要求
一个可静态列出/下载文件的 HTTP 服务(如
python -m http.server);根目录下有
skill.md(或用SKILL_FILE指定入口);子文件用相对路径引用(支持 markdown 链接、图片、裸文件名、
目录名:形式)。
许可
MIT © Congenital
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceConverts AI Skills (following Claude Skills format) into MCP server resources, enabling LLM applications to discover, access, and utilize self-contained skill directories through the Model Context Protocol. Provides tools to list available skills, retrieve skill details and content, and read supporting files with security protections.327Apache 2.0
- AlicenseAqualityDmaintenanceExposes Cursor-style skill packs (SKILL.md trees) via MCP resources, tools, and prompts, enabling any MCP client to list, get, search skills, and retrieve skill context.320ISC
- AlicenseAqualityCmaintenanceMCP server that serves agent skills (SKILL.md bundles) to any MCP client, exposing them via tools and resources for tool-oriented and resource-aware clients.320ISC
- AlicenseNot gradedqualityCmaintenanceServes SKILL.md-based skills as MCP resources and tools over streamable HTTP, enabling remote discovery and retrieval of skill files with full YAML frontmatter parsing.Apache 2.0
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Access Kernel's cloud-based browsers and app actions via MCP (remote HTTP + OAuth).
MCP server for skill documentation, generated by doc2mcp.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Congenital/remote_skill_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server